Repository navigation
Conversation
Signed-off-by: Carlos Hernandez <carloshvp@gmail.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 of 5 tasks
carloshvp
marked this pull request as ready for review
November 9, 2026 15:58
carloshvp
requested review from
a team,
qubeena07,
rajnisht7 and
zohebk8s
as code owners
November 9, 2026 15:58
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.
What
Use
rfc8785.dumps()in all four hashing examples in the tool-catalog authoring tutorial, and hash the returned bytes directly. Explain the JCS serialization requirement for definition and catalog hashes.Why
The existing
json.dumps(..., sort_keys=True, ensure_ascii=True)examples produce different bytes from RFC 8785 for non-ASCII text and some numbers. With the runtime correction in #838, those examples can produce a rejected definition hash or catalog pin.Merge dependency: merge #838 (or an equivalent catalog canonicalization fix) first. Current
mainstill uses the previous catalog serialization, so these updated examples are validated against #838 atf2e3c2ddf74202ce0136b742f50dcefb2b520d66. This patch retains the existingtool_namesorting behavior; it does not resolve the separate ordering question on #838.Security impact
Documentation only. The examples compute hashes using the canonical bytes expected by the runtime correction; runtime validation and enforcement are unchanged.
Test plan
pytestpassesruff check src/ tests/passesmypy src/passes (77 source files)bandit -r src/ -c pyproject.toml -qpassesRésumé recordsand the numeric value1e-7; verify matching definition and catalog hashes and successfulload_catalog(expected_hash=...). Confirm that the old definition hash and old catalog pin are rejected for the same fixture.On
mainplus this documentation patch,pytest tests/unit/ -q --tb=shortreported 2,532 passed, 21 skipped, 10 failed, and 48 errors. Nine failures and all 48 errors came from socket creation/binding denied by the network-disabled sandbox. The remaining failure was the distribution smoke test becausecmcp-runtimepackage metadata was not installed in the source-path test environment. A fully passing hosted test run remains required before merge.git diff --checkpasses. The documentation site was not built locally.DCO sign-off