Skip to content

fix(provider): show diagnostics for failed runtime verification - #38416

Open
primevishnu wants to merge 6 commits into
pingdotgg:mainfrom
primevishnu:fix/provider-installation-diagnostics-restored
Open

primevishnu wants to merge 6 commits into
pingdotgg:mainfrom
primevishnu:fix/provider-installation-diagnostics-restored

Conversation

@primevishnu

@primevishnu primevishnu commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Managed Codex and Antigravity runtime verification can fail or time out while setup shows a generic error and tells the user to check server logs. Antigravity retains startup stderr internally but does not send it with the timeout's installation state. Codex drains and discards validation stderr. A remote client cannot recover output that the server discarded.

For example, a child that writes Startup library missing and then hangs currently produces a timeout message without that diagnostic. The expected behavior is to retain a bounded, redacted diagnostic for that failed attempt and make it available where setup failed.

Change

  • Capture validation stderr while preserving the existing stream drainage and timeout behavior. Return at most 2,000 characters; omit oversized lines and report truncation.
  • Attach the validation step, observed exit status, known OS spawn-error category, and redacted stderr to optional installation-state diagnostics. Do not report timeout cleanup as the original failure's exit cause.
  • Log the installation operation ID, verification step, status, and the length of the sanitized output. Setup shows the attempt ID for correlation and the bounded excerpt from installation state.
  • Show installation details in Antigravity setup, Codex onboarding/settings, and native mobile's existing provider-account view. Retry, cancellation, and removal clear the previous attempt's diagnostics.
  • Remove terminal escape sequences and redact known credential formats, sensitive environment values, URLs, and home paths, including Windows case/separator variations. Protocol stdout is not included in diagnostics.

Capture happens in the environment running the validator. Existing environment-scoped RPCs deliver the bounded result to local, SSH, direct-remote, and relay clients; there is no new arbitrary log-file reader. Older server messages remain accepted because diagnostics are optional on the wire. Runtime platform support is unchanged.

Scope

Restores the work from #38185 after its automatic open-PR-limit closure. Reopening the original was rejected by GitHub after a slot was freed. This replacement started from the original head commit cceabac9e1e4f07515dda320918ccb7708c02bec; the original review history remains linked there.

This follows #37896 by fixing loss of the startup diagnostic behind its verification-timeout message. There is no separate issue; the failure is reproduced below. The server, contract, and client changes all serve the same failed-installation result.

Related work: #31050 adds Antigravity's exit code/signal to its summary message; #35021 preserves readiness failures after CLI updates. This change carries per-attempt managed-runtime verification diagnostics to setup clients. It does not diagnose every provider failure or infer a cause when the runtime supplies no diagnostic.

Verification

Recorded on Windows with Node 26.13.1, at head cceabac9e1e4f07515dda320918ccb7708c02bec:

  • Before the fix, three installer regressions fail because installation state lacks diagnostics: an Antigravity initialization timeout and Codex cached-update/reverification timeouts. After the fix, startup text survives the timeout, credentials are redacted, retry/cancel clears details, and the previous installation remains active.

  • Antigravity installer and capture suites: 42 passed, 6 existing platform skips. Selected portable Codex installer cases: 5 passed. Contract/auth compatibility suite: 3 passed. These are 50 focused passing cases; the final targeted installer/capture recheck also passed 11 cases.

  • Capture tests cover continued drainage after truncation, split UTF-8, oversized lines, incomplete quoted secrets, credential headers, sensitive environment values, home paths, typed spawn failures, and a real child process.

  • A separate credential-free runtime driver used real Node subprocesses and the actual capture helper:

    stderr + exit 3 -> Missing startup library; Authorization: [redacted]; exitCode 3
    silent exit 3 -> empty stderr; exitCode 3
    missing executable -> The runtime executable could not be found.
    protocol stdout absent from all diagnostics
    
  • Server and web typechecks passed independently with exit code 0. Changed-file lint, formatting, and git diff --check passed. The branch merges cleanly with upstream bee9c3b7 in git merge-tree.

Verification limits: the browser runner could not connect to its Chromium session, so UI assertions and before/after screenshots were not completed. Native mobile typecheck is blocked by missing Expo/React Native dependencies; no device was exercised. macOS/Linux execution and live remote deployment were not performed. The required check:changed --concurrency 1 --timeout 30 attempt passed formatting, timed out on several workspace steps, and failed affected-workspace typecheck on missing marketing Astro setup; it is not a full workspace pass. The runtime examples use synthetic fixtures, not a production provider outage. UI diagnostic state is not persisted across server restart; the server-log metadata follows existing logger retention.

AI-assisted implementation and verification: GPT-6.1 Sol through Codex in T3 Code.

Review follow-up

The follow-up at a16f8708 keeps startup excerpts in failed installation state and records only normalized metadata in server warnings. Terminal control sequences are removed before exact-value redaction. The Antigravity fixture completes browser-suppression preflight, then verifies the ACP initialization timeout. Both troubleshooting guides account for installations without details.

The updated Windows run passed 42 Antigravity and diagnostic-capture tests with six platform skips, plus five portable Codex cases. Server typecheck, changed-file lint, formatting, and whitespace checks passed. The full Codex suite had the same 30 Windows fixture failures at the original head and after the follow-up.

Review follow-up implemented and verified with GPT-6.2 Sol through Codex in T3 Code.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. size:XXL 1,000+ changed lines (additions + deletions). takeover:needs-julius Takeover done; route gate says Julius decides vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants