Repository navigation
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/routes/jsonrpc_dispatcher.py | 85.50% | 85.71% | 🟢 +0.22% |
| Total | 93.14% | 93.14% | ⚪️ 0.00% |
Generated by coverage-comment.yml
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.
Description
JSON-RPC requests with
id: trueorid: falsecurrently reach the request handler and produce responses containing the same boolean ID. Python'sboolsatisfies the existing integer check, but JSON-RPC 2.0 distinguishes Boolean from Number and permits only String, Number or Null identifiers.Reject boolean IDs before dispatch with Invalid Request (
-32600) and a null response ID. Add request-level tests for both boolean values and passing controls for integer zero, a positive integer, an empty string and a nonempty string. The invalid requests must not invoke the handler.CONTRIBUTINGguide.No existing issue found for boolean request IDs.
Validation:
bash scripts/lint.sh: Ruff lint/format and ty pass. ty reports three unused-ignore warnings in unchanged optional gRPC imports.uv run pytest: 2,290 passed, 183 skipped, 3 xfailed and 1 xpassed on the repository-pinned Python 3.10.22.uv run pytest --cov=src --cov-report=term-missing --cov-fail-under=88: same results; 93.29% coverage, exceeding the 88% requirement.git diff --check: passed.The xfail/xpass cases are marked against #869. Skips include PostgreSQL/MySQL and externally configured multi-server cases. Local HTTP/gRPC and sample integration tests ran as part of the full suite; no live model-provider calls were used.
AI assistance: OpenAI Codex implementation, reproduction and validation.