fix(antigravity): keep streaming request uploads replayable - #15033
Merged
diegosouzapw merged 5 commits intoSep 29, 2026
Conversation
The two new regressions pushed tests/unit/executor-antigravity.test.ts past the 1200-line test-file cap; they now live in tests/unit/antigravity-replayable-request-body.test.ts. The now-unused stream parameter of sendAntigravityRequest is renamed to _stream so eslint passes.
diegosouzapw
merged commit Sep 29, 2026
097429f
into
diegosouzapw:release/v3.8.51
11 of 16 checks passed
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ReadableStream+duplex: "half"upload path from the primary send, the 403 retry, and the Google One AI credits retry.This PR is intentionally scoped only to the request-upload behavior. It does not include memory tracing, stream-backpressure experiments, header changes, or account-rotation changes used during diagnosis.
Related Issues
#5770 correctly prevents retry/fallback of a non-replayable request body. This PR fixes the Antigravity caller side: the payload is already a complete serialized JSON string, so it does not need to be converted into a non-replayable request stream.
Validation
release/v3.8.51npm run lintProduction canary validation used large Native Codex / Responses requests with approximately 5.8M serialized request characters. Before this change, the streamed request-upload path reproduced runaway RSS approaching 20 GB and host OOM. With the fixed request body, three sequential requests completed with HTTP 200 while RSS remained roughly 1.6-1.85 GB.
The canary included temporary memory tracing; that instrumentation is deliberately excluded from this PR.
Tests Added Or Updated
tests/unit/executor-antigravity.test.tsduplexReviewer Notes
streamcontinues to control response handling; it no longer changes the finite JSON upload into aReadableStream.