Skip to content

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

Closed
primevishnu wants to merge 1 commit into
pingdotgg:mainfrom
primevishnu:fix/provider-installation-diagnostics
Closed

primevishnu wants to merge 1 commit into
pingdotgg:mainfrom
primevishnu:fix/provider-installation-diagnostics

Conversation

@primevishnu

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.
  • Record the same redacted diagnostic in the server log with the installation operation ID. Display that attempt ID in setup details for correlation.
  • 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

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 bounded server-log record follows existing logger retention.

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

@github-actions

Copy link
Copy Markdown
Contributor

Closing: primevishnu already has 3 or more open PRs here, which is the limit for contributors who are not vouched.

Once one of them is merged or closed, open this again. See the open PR limit.

@github-actions github-actions Bot closed this Nov 17, 2026
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Nov 17, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The change adds bounded, redacted runtime-verification details to provider setup. It also introduces a file-level nodeBuiltinImport:off diagnostic suppression in installationDiagnostics.ts:1, which requires human review.

You can add or adjust custom eligibility rules. Learn more.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant