Repository navigation
Token-by-reference store conformance tests (draft -03 Sections 8.2 and 10.4) - #41
Merged
Merged
Conversation
The cases follow a measurement of the reference store by Yasha Khandelwal on the IETF RATS list (2026-10-08).
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.
Adds
tests/security/token-reference-store.test.ts, conformance tests for the token-by-reference store against draft-helixar-hdp-agentic-delegation-03 Sections 8.2 and 10.4. No source changes.The existing tests in
tests/unit/transport.test.tscover digest mismatch, write-once references and idempotent retries one store operation at a time. The new file covers how references behave across a chain extension, and when the store is edited beneath theTokenStoreAPI, which is the substitution threat 8.2 names.Cases:
Cases 1, 2, 3 and 5 test behaviour the implementation enforces; cases 4, 6 and 7 document behaviour the draft describes. Cases 1 and 2 use
InMemoryTokenStorethrough its public API. The others use a test-onlyTokenStorewith no write-once check, so entries can be overwritten or the whole store restored without reaching into private fields.The cases follow a measurement of the reference store by Yasha Khandelwal on the IETF RATS list (2026-10-08).
Verification:
npm run typecheck,npm run build,npm test: 26 files, 139 tests pass (132 before this change). The new file also passes a strict standalonetsccheck, since the roottsconfig.jsonexcludestests/.resolveTokenis removed (noTokenReferenceIntegrityErrorraised).resolveTokenfalls back to the UUID entry for a missing content reference: with the digest check intact it rejects instead of returning null; with the check also skipped it returns the older two-hop token. Source was restored andgit diff --exit-codeconfirmed clean before the green run.