Conversation
… stream Antigravity's local agy_acp_server proxy can drop a streamGenerateContent call mid-turn. Today that raw Go transport error (e.g. "model unreachable: doRequest: error sending request: Post ...: EOF") reaches the user unchanged, because mapAcpToAdapterError's fallback sets detail to error.message with no branch for this class of error. Users read "model unreachable" and assume the network or model is down, when it is the local proxy dropping the stream. mapAntigravityError now recognizes AcpRequestError messages that contain both "streamGenerateContent" and "EOF" and replaces them with a short, readable message before they reach the chat. This is a partial fix. The issue's triage identified a second, separate problem in a different code path: a clean WebSocket close during session recovery (ProviderService.recoverSessionForThread) surfaces as a fatal "Failed to rebuild agent: received 1000 (OK)" with no retry, forcing the user to resend the prompt. That requires session-lifecycle and retry changes well beyond a small, surgical fix, and is left open here. Validation: added a test that fails a native prompt with the exact reported raw string via Deferred.fail, drives it through the real sendTurn -> mapAntigravityError path, and asserts the surfaced message contains the new text and no longer contains "doRequest"/"EOF". Verified this test fails on the pre-fix code and passes after the fix. Ran `vp test run apps/server/src/provider/Layers/AntigravityAdapter.test.ts` (28/29 pass; the one other failure is a pre-existing macOS temp-directory symlink issue unrelated to this change, reproduces identically on main) and `vp -C apps/server run typecheck` and `vp lint` on both changed files (both clean). Report: pingdotgg#11670 Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com> Assisted-by: claude-sonnet-5 (via Claude Code)
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained Antigravity error-message fix with unchanged behavior for other errors and targeted test coverage. It introduces no schema, configuration, deployment, security, billing, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Antigravity adapter now detects ChangesAntigravity stream error handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The targeted stream EOF error is presented as a readable retry message without breaking the adapter error shape. No concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation Issue
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
This is approved with green CI and no outstanding comments as far as I can tell — ready whenever you have a moment. Happy to rebase first if you'd like it freshened. |
|
Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work. Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look. |
What Changed
When Antigravity's local
agy_acp_serverproxy drops astreamGenerateContentcall mid-turn, the adapter now shows a short, readable message instead of forwarding the raw Go transport string.mapAntigravityErrorinapps/server/src/provider/Layers/AntigravityAdapter.tsgains a branch that recognizes that specific error text (AcpRequestErrormessages containing bothstreamGenerateContentandEOF) and replaces it with a friendly "Antigravity lost its connection to the model. Send your message again to retry." message before it reaches the user.Why
#11670 reports that a dropped Antigravity stream surfaces to the user as:
That raw string comes straight from the proxy binary (not this repo) via
mapAcpToAdapterError's fallback branch, which setsdetail: error.messageunchanged for anyAcpRequestError. Users read "model unreachable" and assume the network or model is down, when it's actually the local proxy dropping the stream.Scope note — this is a partial fix. The maintainer's triage on the issue identified three separate problems and a three-part fix: (1) classify this class of error and show a readable message, (2) retry
startSessionwith backoff, (3) treat a clean in-runtime WebSocket close as a recoverable disconnect instead of a fatal one-way latch. This PR implements only part (1), for the specificstreamGenerateContent ... EOFstring reported in the issue. It does not add retry/backoff, and does not touch the separateFailed to rebuild agent: received 1000 (OK)failure, which happens inProviderService.recoverSessionForThreadduring session recovery — a different, larger code path that a maintainer flagged needs session-lifecycle changes beyond a small, surgical fix. That half of the issue (no automatic reconnect, still have to resend the prompt) remains open after this PR.Validation
vp test run apps/server/src/provider/Layers/AntigravityAdapter.test.ts— added a test, "replaces a dropped streamGenerateContent transport error with a readable message", that fails a native prompt with the exact reported raw string viaDeferred.failon the harness's prompt result, drives it through the realsendTurn→mapAntigravityErrorpath, and asserts the surfaced message contains the new friendly text and no longer containsdoRequest/EOF. Confirmed this test fails on the pre-fix code (assertion mismatch showing the raw string) and passes after the fix — a true failing-then-passing reproduction, not just an assertion of the implementation.vp test run apps/server/src/provider/Layers/AntigravityAdapter.test.ts— 28 of 29 tests pass (all except my new test, then all 29 including it after the fix). The one other failure, "serves client file reads and writes only inside the session roots", fails identically onmainwith no changes applied (confirmed viagit stash) — a pre-existing macOS/varvs/private/vartemp-directory symlink mismatch in that test's own setup, unrelated to this change.vp -C apps/server run typecheck— clean (no errors; only pre-existing repo-wide lint suggestions unrelated to the changed lines).vp lint --report-unused-disable-directiveson both changed files — clean.agy_acp_serverbinary and a live Gemini backend, not available in this environment). The fix is a pure string-classification change with no behavior depending on live network conditions, so the targeted test above is a full reproduction of the code path in question.UI Changes
None — this changes which text reaches an existing error surface, not any UI structure. No screenshots.
Checklist
Fixes #11670
Summary by CodeRabbit