Repository navigation
fix: preserve MCP request IDs in success and error responses - #7
Merged
Merged
Conversation
…s and error responses
obey-agent
approved these changes
Oct 5, 2026
obey-agent
left a comment
Member
There was a problem hiding this comment.
Reviewed head b488299afbdc79a8f8521eb8bc427974742d28ce. No actionable findings.
Traced JSON token validation, raw string ownership, ID lifetime through synchronous replies, and success/error buffer sizing. The Linux build passed with warnings treated as errors, and all five camera-free protocol tests passed, including long, escaped, Unicode, control, and numeric IDs and malformed-token recovery. Did not exercise macOS builds or camera hardware. The existing general string-decoding behavior and string length limit are outside this change.
2 tasks
lancekrogers
added a commit
that referenced
this pull request
Oct 6, 2026
## Summary The `linux` workflow on `main` (`dbb040d`, run 37263099985) failed in `deps` before any gaze test ran. `sudo apt-get update` exited 100 because the Ubuntu runner image preinstalls `packages.microsoft.com`, and that repo returned `403 Forbidden` (`noble InRelease` is no longer signed). The same step is in `release-linux.yml`, so the next tag push would fail the same way. Gaze installs `gcc`, `libjpeg-dev`, and `just` from Ubuntu. Both workflows now remove `microsoft-prod.list` and `microsoft-prod.sources` before `apt-get update`. The `protocol` workflow on that commit passed. The same `linux` job passed on PR #7 about ten minutes earlier, which matches the known intermittent Microsoft apt failure on hosted runners. ## Test plan - [ ] `linux` workflow `deps` completes `apt-get update` and `test-protocol` runs - [ ] `protocol` workflow still passes
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.
MCP clients could not correlate responses when a request ID exceeded 63 bytes or contained escaped characters: long IDs produced invalid JSON, while Unicode, controls, and large numeric IDs were changed. Both successful replies and JSON-RPC errors now echo the complete original ID token.
The parser retains an owned string lexeme for response IDs, validates escape and number syntax before echoing it, and accepts exponent-form numeric IDs. Error responses allocate space for the complete ID instead of truncating at 1024 bytes.
Validation:
GAZE_DEV=ffff:ffff just test-protocolpassed (5 protocol tests and 14 plugin tests, including 30 ID round trips and 9 malformed-token cases). The new round-trip regression failed on the original code with 12 mismatches and 3 malformed responses before the fix. No camera movement or capture was performed; hardware tests were not run.Work item: WI-211b78.