Skip to content

Show why a downloaded chat runtime failed to install - #34167

Closed
Jinwoo-H wants to merge 4 commits into
mainfrom
fix/managed-runtime-install-failure-reason
Closed

Jinwoo-H wants to merge 4 commits into
mainfrom
fix/managed-runtime-install-failure-reason

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​130 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​126
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​138 $\color{#cf222e}{\Huge{\mathbf{−}}}$​19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​119

What changes for users

When Orca downloads a chat runtime (today: Antigravity's chat server) and the runtime fails its start check, the install message now says why. The headline stays the same, and one short cause follows it:

  • It timed out after 60 seconds.
  • It exited with code 1: <one-line stderr excerpt>, redacted with the existing secret and path redaction, and capped in length.
  • It answered as version 1.2.9, expected 1.3.0.

Other failures (for example, a spawn error) still show only the headline.

Why

Every failed start check showed "Antigravity couldn't start on this host, so it wasn't installed. This host may not support it." The real cause was written only to the main-process log, so reports like #33188 (Intel Mac) and #32818 (Linux) could not say what went wrong. This PR doesn't fix those issues. It surfaces the cause so they can be diagnosed.

How

  • managed-runtime-release.ts: adds a runtime-agnostic ManagedRuntimeStartError that carries what the check observed (timeout, exit, or version).
  • antigravity-acp-runtime-probe.ts: fills that in. The exit code and stderr come from the connection's own exit event, and only when the exit was not caused by Orca closing the probe. The timeout comes from the existing request-timeout marker. In practice the 60 s initialize request deadline fires before the probe's 90 s deadline, so the message reports 60.
  • managed-runtime-release-install.ts: phrases the cause after the headline. It reuses the excerpt, sanitize, and redact helpers the Codex RPC exit message already uses.

The message is still a plain string in operation.error, so older desktop, remote, and mobile clients show it unchanged.

Evidence

This used an isolated dev build and profile. The pin was pointed at a local fake 1 MB archive through a temporary, uncommitted override. The real runtime was not downloaded. CDP screenshots show the chat install message.

Before (any failure):

before

After, a server that exits 1 with stderr (the fake stderr carries a token to show redaction):

after exit

After, a server that answers initialize with the wrong version:

after version

After, a server that never answers:

after timeout

@Jinwoo-H
Jinwoo-H requested a review from brennanb2025 October 27, 2026 00:48
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 701224eb-b8fa-48c1-805d-063d4d9cff7b
Commits

Reviewing files that changed from the base of the PR and between f4612b6 and df295b0.

Files selected for processing: 3
  • src/main/acp/acp-agent-connection.ts
  • src/main/antigravity/antigravity-acp-runtime-probe-lifecycle.test.ts
  • src/main/antigravity/antigravity-acp-runtime-probe.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The change adds structured timeout, process-exit, and version-mismatch startup failures. The Antigravity ACP probe records and classifies supported failures, and runtime validation includes recognized failure details in its error message. The connection can wait for stderr output to drain after process exit. Tests cover failure details, late stderr, timeout handling, bounded stderr draining, and redaction of token-like stderr.

Priority: Normal

Merge Risk: Moderate · up to df295

A long credential in a failed runtime’s stderr can still appear in the installation error shown to clients. Address that exposure before merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the user impact, motivation, implementation, and evidence. However, it omits the required Linked Issue section and does not complete the Testing, AI Disclosure, Review, Agent … Add the required template sections. Include an actual linked issue, testing steps and platforms, checklist status, cross-platform and compatibility considerations, AI disclosure when applicable, and the remaining required confirmations.
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: exposing the reason a downloaded chat runtime failed to install.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the user impact, motivation, implementation, and evidence. However, it omits the required Linked Issue section and does not complete the Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections.

Resolution

Add the required template sections. Include an actual linked issue, testing steps and platforms, checklist status, cross-platform and compatibility considerations, AI disclosure when applicable, and the remaining required confirmations.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 7 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d7c28efd-3c7c-4892-93eb-29fd457c5940
Commits

Reviewing files that changed from the base of the PR and between 7a9abe4 and 3444f11.

Files selected for processing: 4
  • src/main/antigravity/antigravity-acp-runtime-probe.test.ts
  • src/main/antigravity/antigravity-acp-runtime-probe.ts
  • src/main/node-runtime/managed-runtime-release-install.ts
  • src/main/node-runtime/managed-runtime-release.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cd6234da-66cc-497d-bc82-fc3934c05df6
Commits

Reviewing files that changed from the base of the PR and between 3444f11 and f4612b6.

Files selected for processing: 4
  • src/main/antigravity/antigravity-acp-runtime-probe.test.ts
  • src/main/antigravity/antigravity-acp-runtime-probe.ts
  • src/main/node-runtime/managed-runtime-installation.test.ts
  • src/main/node-runtime/managed-runtime-release-install.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

nwparker pushed a commit that referenced this pull request Nov 7, 2026
…check

The managed-runtime install message now names the observed cause after the
existing headline: a timeout, an exit code with a redacted stderr excerpt, or
the version the server answered as. The host agy check that shares the
initialize helper is unchanged.

Takes over #34167 by @Jinwoo-H (away), ported onto main after #39006.
nwparker added a commit that referenced this pull request Nov 7, 2026
…check (#39456)

The managed-runtime install message now names the observed cause after the
existing headline: a timeout, an exit code with a redacted stderr excerpt, or
the version the server answered as. The host agy check that shares the
initialize helper is unchanged.

Takes over #34167 by @Jinwoo-H (away), ported onto main after #39006.

Co-authored-by: Jinwoo-H <[email protected]>
@nwparker

nwparker commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Thanks @Jinwoo-H. While you were away I took this over in #39456, which is now merged (squash e7b0e40) with you as the commit author. I ported it onto current main: after #39006 and #39452 the initialize step is shared with the host agy acp check, so the cause is only collected for the managed-runtime install probe, and the host check behaves as before. The stderr wait reuses main's exit-drain bound. I also tightened the late-stderr test so it fails without the fix. Closing this in favor of #39456.

@nwparker nwparker closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants