Repository navigation
Conversation
This branch has not been deployed
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
When a WebSocket peer sends
nullbefore a valid JSON-RPC response, the client treats it as EOF and rejects the pending request. Other non-object JSON values (for example[]) reachConnection._process_message()and fail on.get(), also dropping the valid response behind them.Return only decoded dictionaries from the WebSocket client transport, matching the existing WebSocket server and the stdio recovery behavior accepted in #153. Invalid JSON and binary frames remain ignored; a real socket close still returns
None. This does not add batch support or change JSON-RPC error responses. The transport docs now describe the recovery behavior.Related issues
Follow-up to #153, whose scope note explicitly left the WebSocket client path unchanged pending a live WebSocket reproduction. #166 covers server binary-frame warnings; #167 covers response IDs and remains separate.
Testing
create_websocket_stream()transport. Connection tests send an initialize request and verify that its response survives bothnulland[]preceding it. Transport tests cover arrays, strings, numbers, booleans, nested null/array values in an otherwise valid object, invalid JSON, binary frames and actual close.make check: passed (lockfile, pre-commit, Ruff,ty,deptry).ACP_ENABLE_GEMINI_TESTS=0 make test: 419 passed, 1 skipped.git diff --check: passed; final patch hash matches the reviewed patch.No model/provider calls or Gemini integration tests were enabled. Local validation is on macOS with Python 3.13.9; the upstream multi-Python CI matrix has not run locally.
Docs & screenshots
Updated
docs/web-transport.md; no API or schema generation changes.Checklist
AI-assisted development with OpenAI Codex, including a separate native Codex reviewer.