This repository was archived by the owner on Oct 3, 2026. It is now read-only.
Conversation
This was referenced Oct 2, 2026
imran-siddique
added a commit
to agentrust-io/trace-spec
that referenced
this pull request
Oct 2, 2026
* test: preserve portable anchor vectors from trace-tests PR 137 Original contribution: dinakarjs, agentrust-io/trace-tests#137 Source head: 4614f4491ab0152403778fe7d600ad2c6ea42567 All 31 added files retain their original Git blob hashes under conformance/. * docs: write anchor fixture range in house style
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds 27 portable JSON vectors for TR-ANC-002, addressing agentrust-io/trace-spec#448 row 22. Nine positives cover both sibling directions, odd 3/5/9-leaf trees, right-edge promotion, ASCII escaping and recursive Unicode code-point key order. Eighteen negatives each identify an accepted twin, including changed body/signature, malformed or incomplete proofs, UTF-8 leaf encoding, UTF-16 key order, omitted leaf prefix and duplicated odd leaves.
Positive fixtures expose fixed canonical preimages, leaf hashes and ordered batch hashes. The standard-library generator imports no verifier code and builds trees/proofs using recursive RFC 6962 splits rather than the implementation's iterative fn/sn walk. The new harness checks the persisted fixtures against TR-ANC-002, exact positive bytes, reproducibility and positive twins.
The optional Node.js 18+ cross_check.mjs reads the persisted JSON directly. It implements anchor ASCII escaping and code-point ordering in JavaScript, reconstructs proofs recursively, and checks all 27 outcomes plus the nine positive preimages, leaf hashes, roots, counts and leaf positions. It imports neither Python implementation. Node is not added to package dependencies or Python CI. This targets the fixture set, not a general conformance verifier.
Validation: Python 3.12 focused checks 28 passed after the JavaScript addition. Full Python suite on the preceding commit: 706 passed, 5 existing xpassed; no Python code changed in the follow-up. Ruff on both new Python files and git diff --check passed. Node v24.19.0: 27/27 outcomes, 9/9 preimages and roots, syntax check passed. Temporary mutant runs detected UTF-16 sorting, UTF-8 leaf encoding, omitted leaf prefix, duplicated odd leaf, unconditional acceptance and unconditional rejection. Base: 7d220ee.
Expected outcomes concern inclusion only. The small claim objects and opaque signature strings do not claim complete record validity, signature authentication or a Level 2 verdict. No verifier behavior or spec text changes; this does not resolve #448 row 21's transparency self-reference. Draft pending independent verifier/maintainer review and upstream CI.