fix: use RFC 8785 ordering in conformance runner - #3
Draft
eriknewton wants to merge 1 commit into
Draft
Conversation
Signed-off-by: eriknewton <38265121+eriknewton@users.noreply.github.com>
8 tasks
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.
Closes #2143.
1. What kind of change is this
2. Which proposal does it land under
Proposal: pending the maintainer's short numbered correction proposal described in a2aproject/A2A#2143 (comment).
This PR is intentionally a draft until that proposal exists and can be cited here. It does not move the proposal stage.
3. What changed
The conformance runner now loads
reference/a202_reference/canonical.pyas its single canonicalization implementation instead of maintaining a secondjson.dumps(sort_keys=True)path. This makes non-ASCII object-member ordering follow RFC 8785 UTF-16 code-unit order.A focused fixture covers the key pair U+1F6A2 and U+E000 and also proves that
content_hash,signatures, andkernel_annotationsremain excluded from hashed bytes.4. Conformance
python3 conformance/run-conformance.py(148/148)python3 -m unittest discover -s tests -t .fromreference/(35/35)python3 -m unittest discover -s a202_mcp/tests -t .fromreference/(108 pass, 4 environment skips because the MCP SDK is not installed)Does any fixture change its pass or fail classification?
5. Compatibility
ASCII-only canonical output is unchanged. Implementations that reproduced the runner's previous Python code-point ordering for non-ASCII member names will compute different hashes for those objects; migration is to use RFC 8785 UTF-16 code-unit ordering, already implemented by the reference canonicalizer.
6. Scope
7. Review
Independent adversarial Claude Sonnet review returned
VERDICT: SOUND. The repository-required other-author review remains pending, so this PR stays draft.