Repository navigation
Conversation
Keep the string-ID fallback for untagged and unknown values, but do not let it reinterpret an explicitly boolean value. Cover the setter, initial session options, and generated v1 schemas in Rust instead of a JavaScript test matrix.
benbrandt
enabled auto-merge (squash)
November 23, 2026 11:31
Merged
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.
The completed Boolean Config Option Type RFD and the config options guide require a boolean
valuefortype: "boolean". However, both published v1 schemas accept this setter payload:{ "sessionId": "s", "configId": "fast", "type": "boolean", "value": "false" }The boolean branch rejects the string, but the untagged ID branch accepts it. Both v2 schemas already reject it. This also affects initial config values in the unstable v1 schema.
Exclude the known
booleandiscriminator from the v1 ID fallback in JSON Schema. Untyped string IDs, explicit ID values, and unknown string value types retain their existing schema behavior. Rust serialization and lenient deserialization stay unchanged, including the existing test that reads a malformed boolean as an ID. The protocol requirement itself does not change. Regenerate the two v1 JSON Schemas. The guides already state the required value shape, and their generated reference pages and all v2 artifacts are unchanged.Related implementation: #576, stabilized in #1604.
Regression and validation:
node --test scripts/schema-tests/config-values.test.mjsagainst the upstream schemas: 3 failures and 7 passes. After regeneration: all 10 pass.npm run generateandnpm run checkpass. The latter includes Clippy, formatting, spelling, all-feature Rust tests, and all 39 schema/protocol-example tests.unstable, andunstable_protocol_v2. Schema crate tests also pass withunstable_protocol_v2without the unstable umbrella.Validation scope: v1 assertions use the published method params definitions. Its root envelope schema does not dispatch params by method. The v2 assertions also cover full JSON-RPC request validation. No live Agent calls were made.
AI assistance: OpenAI Codex was used to implement and validate this change.