Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): preserve antigravity ipv6 startup diagnostics #15629

Mergedmaria-rcksmerged 9 commits intomain fromrefs/pull/15629/headmerged by juliusmarminge View on GitHub

maria-rckscommented

Antigravity can abort before ACP initialization when IPv6 loopback is unavailable. Signal exits previously became transport errors, bypassing stderr enrichment, and installation reported only a generic failure.

Preserve signal identity through the shared ACP exit/stderr path, redact Google sign-in URLs, and recognize the IPv6 diagnostic during installation. Installation state contains fixed guidance for IPv6 failures and a fixed generic message otherwise; underlying diagnostics remain in the cause. Failed validation keeps the previous release active.

Maintainer takeover of #15629, credit to @maria-rcks. The historical unsafe cause.message concatenation was removed.

Verification:

  • Added test cases 3 → 3: replaced two fabricated signal cases with one real-child runtime case, and added the generic diagnostic case beside IPv6 installation coverage. Extended the existing sanitizer test.
  • All 94 tests across ACP runtime (45), installation (44), stderr (3), and stdio (2) pass. Main fails the signal, IPv6 and OAuth-redaction regressions. The original PR failed the new generic-detail assertion; this head passes.
  • Server, effect-acp and provider-acp typechecks plus scoped lint/format pass. Both independent full-PR reviews (Claude Opus 5.5 and GPT-6 Sol) found no code blockers; stale description claims were corrected.
  • Headless Linux proof uses the official pinned Antigravity 1.3.0 archive, verified against its SHA256. It initializes with IPv6 available and aborts with SIGABRT when IPv6 is disabled only in an isolated network namespace. Feeding that real abort through T3 installation validation changes the generic main message into fixed IPv6 guidance and verifies the previous fixture release remains active. Temporary instrumentation was removed.

Before/after runtime and installation proof

The installation service was exercised headlessly with fixture archive staging and the real runtime child; the Settings UI and a production account were not exercised. WSL-specific recovery instructions, macOS, Windows, iOS, Android, Electron desktop and real signal exits in other ACP providers remain unverified. Current-head CI jobs that ran passed; skipped jobs are recorded normally. Macroscope Approvability is neutral and explicitly requires human approval for shared error propagation and authentication-sensitive stderr handling. The historical unsafe-detail finding is fixed, replied to, and its review thread is resolved. This PR is unmerged.

Implemented with Codex GPT-6.1 Sol in T3 Code; tests by GPT-6 Astra.

    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      Warning

      Review limit reached

      Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

      Next included review available in 4 minutes.

      Check out review usage here.

      View limit details

      Limit details: You’ve used all 10 included reviews currently available.

      Learn how review limits work.

      Review configuration:

      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: d6f98871-1ccc-4040-bc35-6757c6bae51b
      📥 Commits

      Reviewing files that changed from the base of the PR and between d811c704cf544619ca3d93c03347d1ef80ca521c and cfdf307edfc363b20e508244ad2e46b80adf9cc8.

      📒 Files selected for processing: 8
      • apps/server/src/provider/AntigravityInstallation.test.ts
      • apps/server/src/provider/AntigravityInstallation.ts
      • apps/server/src/provider/acp/AcpJsonRpcConnection.test.ts
      • packages/effect-acp/src/_internal/stdio.ts
      • packages/effect-acp/src/errors.ts
      • packages/provider-acp/src/server/AcpSessionRuntime.ts
      • packages/provider-acp/src/server/stderr.test.ts
      • packages/provider-acp/src/server/stderr.ts

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 9c7a20d1-a618-4bb7-82ec-bf2c48c40657
      📥 Commits

      Reviewing files that changed from the base of the PR and between 2ee80c1f6c9d34ac83ce9687504750c78c18ba4a and d811c704cf544619ca3d93c03347d1ef80ca521c.

      📒 Files selected for processing (4)
      • apps/server/src/provider/AntigravityInstallation.test.ts
      • packages/provider-acp/src/server/AcpSessionRuntime.ts
      • packages/provider-acp/src/server/stderr.test.ts
      • packages/provider-acp/src/server/stderr.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.

      📝 Walkthrough

      ACP process-exit errors now retain signal details used during Antigravity startup validation. Installation errors identify recognized IPv6 startup failures and include WSL guidance. ACP stderr sanitization replaces Google Accounts sign-in URLs with a placeholder.

      Changes: Startup failure diagnostics

      Layer / File(s)Summary
      Signal-aware ACP exit errors
      packages/effect-acp/src/errors.ts, packages/effect-acp/src/_internal/stdio.ts, packages/provider-acp/src/server/AcpSessionRuntime.ts, packages/effect-acp/src/_internal/stdio.test.ts
      Signal-based child-process exit failures produce AcpProcessExitedError values that retain the signal and PID. Runtime enrichment preserves the signal with captured stderr. Tests cover SIGABRT and SIGTERM.
      Antigravity validation diagnostics
      apps/server/src/provider/AntigravityInstallation.ts, apps/server/src/provider/AntigravityInstallation.test.ts
      Installation validation maps recognized IPv6 startup diagnostics to guidance and includes other ACP process-exit messages. The test checks the error message, staging cleanup, and availability of the previous release.

      ACP stderr URL redaction

      Layer / File(s)Summary
      Google sign-in URL redaction
      packages/provider-acp/src/server/stderr.ts, packages/provider-acp/src/server/stderr.test.ts
      The stderr sanitizer replaces HTTP and HTTPS URLs on accounts.google.com with [sign-in-url]. The test checks that the OAuth state value is excluded.

      Priority: ➖ Normal

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Change: Bug fix · Severity of issue fixed: Medium

      Sequence Diagram(s)

      sequenceDiagram
        participant AntigravityInstallation
        participant AntigravityRuntime
        participant makeTerminationError
        participant AcpSessionRuntime
        AntigravityInstallation->>AntigravityRuntime: verify runtime startup
        AntigravityRuntime->>makeTerminationError: report child-process signal exit
        makeTerminationError->>AcpSessionRuntime: provide process-exit error with signal
        AcpSessionRuntime->>AntigravityInstallation: return process-exit error with stderr
        AntigravityInstallation->>AntigravityInstallation: map IPv6 diagnostic to guidance

      Suggested reviewers: juliusmarminge

      Merge Risk: ⚪ Minimal · up to d811c

      No actionable issue is established that should delay merging this diagnostics change. A real Antigravity run on an IPv6-disabled WSL host remains unverified.

      Security architecture risk: 🔵 Low · up to d811c

      Startup failures expose more diagnostic detail, but retain bounded redaction and validation before activation. No concrete security regression was identified. Coverage does not establish that every newly surfaced diagnostic is free of sensitive data.

      Retained concerns No architecture-level concerns identified.

      Security review details

      Security Blast Radius

      • observed — The affected source is spawned ACP child stderr. The inspected outputs are process-exit errors, connection-termination events, and Antigravity installation failure state. Captured stderr is limited to 4,096 characters per runtime; tenant-wide or cross-service exposure is not established by this evidence.

      Security Findings and Attack Paths

      • inferred — A child can influence newly visible startup diagnostics through stderr. The inspected enrichment path applies bounded capture and sanitization, and no concrete redaction bypass or authority escalation was established. This conclusion does not establish confidentiality for unrecognized sensitive output.

      Trust Boundaries and Controls

      • observed — Signal classification requires matching child-process platform-error metadata and an exact signal-message format; it is not parsed from stderr. IPv6 recognition uses stderr only to select explanatory text. It neither changes host configuration automatically nor converts validation failure into success.

      Resilience and Maintainability Implications

      • observed — Termination recording retains a first-writer guard before emitting a connection-termination event. The termination callback still ensures runtime-scope closure. Adding signal context does not replace these existing failure-containment mechanisms.
      Pre-merge checks: Passed 4
      Check nameStatusExplanation
      Linked Issues checkPassedIssue #9800 requires Antigravity installation to preserve the IPv6 startup diagnostic and provide actionable guidance. makeTerminationError now creates AcpProcessExitedError for signal exits. The …
      Out of Scope Changes checkPassedThe signal handling, stderr propagation, stderr redaction, and tests support issue #9800. Google sign-in URL redaction limits exposure when startup stderr is shown. No unrelated change is established …
      Title checkPassedThe title clearly identifies the primary change: preserving Antigravity IPv6 startup diagnostics on the server.
      Description checkPassedThe description covers the problem, implementation, scope, verification results, limitations, and approval context. It explains the signal-exit handling, IPv6 guidance, stderr redaction, and preservat…
      Full details: Linked Issues check

      Explanation

      Issue #9800 requires Antigravity installation to preserve the IPv6 startup diagnostic and provide actionable guidance. makeTerminationError now creates AcpProcessExitedError for signal exits. The session runtime preserves the signal and attaches redacted stderr. AntigravityInstallation detects AF_INET6 and enforce_kernel_ipv6_support diagnostics and reports IPv6 and WSL remediation. The installation test covers SIGABRT, the diagnostic, and retention of the previous release. References #9839 and #13387 are not direct linked targets.

      Full details: Out of Scope Changes check

      Explanation

      The signal handling, stderr propagation, stderr redaction, and tests support issue #9800. Google sign-in URL redaction limits exposure when startup stderr is shown. No unrelated change is established by the available whole-PR summary or focused file evidence.

      Full details: Description check

      Explanation

      The description covers the problem, implementation, scope, verification results, limitations, and approval context. It explains the signal-exit handling, IPv6 guidance, stderr redaction, and preservation of the previous release.

      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create a new PR
      • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs Human Approval

      Macroscope's review found this PR requires human approval — This is a focused startup-diagnostics fix that also changes shared ACP termination handling and redacts Google sign-in URLs that may carry OAuth state. Because the runtime and authentication-sensitive diagnostic handling are affected, human review is warranted.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge added labelsmacroscope-review

    5. juliusmarminge assignedjuliusmarminge

    6. Taking over this one. I'll bring the startup diagnostic path onto main, address the unsafe error-detail finding, and verify the signal/IPv6 behavior before pushing the reviewed result here.

    7. juliusmarminge merged this9f01c58

    8. juliusmarminge closed this

Sign in to join this conversation.