Repository navigation
[PR] fix: transform complete CloudCode SSE event payloads - #6603
Merged
ranxianglei merged 1 commit intoNov 14, 2026
Merged
Conversation
This was referenced Nov 13, 2026
This was referenced Nov 14, 2026
Owner
|
Superseded by #6677 (merged as Landed into master via the real merge commit The fix for #6600 is now in master. Closing this PR as superseded — thanks for the careful, well-tested fix. |
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.
Problem
CloudCode/Antigravity SSE envelopes can contain one JSON payload spread across several
data:fields.mapDataPayloadpreviously parsed only the first field, so an opening{failed parsing and the envelope reached the Gemini adapter unchanged.A real-HTTP regression through
startServerreproduces the consequence on mastere1f31ad9d5b47500362699a9867819b861c7de96: a complete upstream reply becomes empty client-visible model text, and the proxy sends a second upstream request. With this fix, the client receiveshello from cloudcodeexactly once and only one upstream request is made. This fixture demonstrates the supported wire shape; it does not assert that Google's production service currently emits pretty-printed SSE by default.Change
Assemble the complete SSE data payload before applying the existing CloudCode envelope helper. Replace transformed data fields with one complete JSON field and retain event, id, comment and retry fields. Unchanged or unsupported payloads pass through verbatim.
Both inbound unwrapping and outbound wrapping use the correction. JSON-body handling, request envelopes, session identity and compression policy are unchanged.
Validation
v1internal-multiline-sse,issue3129-v1internal,issue3280-v1internal-loop-roundsandadapter-google.npm run typecheck,npm run build,npm run check:unused-exports,npm run check:test-import-graphandgit diff --checkpass.Local tests used Node v24.22.1 and the repository's test/storage preloads. The full-suite verdict remains with CI on this pushed head.
Prior work
All-state issue/PR searches found no existing complete-event envelope fix. #3372 handles CRLF boundaries, #3282 handles later loop rounds, and my earlier #6102 handles summary extraction. This change corrects the separate CloudCode envelope boundary exercised by the live proxy.
Suggested triage:
bug,p2,scope/wiring; Topic I — other host lanes.Fixes #6600