feat(test-vectors): KU interop fixtures for APS cross-verify#6
Merged
Conversation
Ships the three test-vector files referenced in issue #2 so the agent-passport-system round-trip can run against a reachable target. - jcs-test-vectors.json: 9 JCS conformance cases (empty, nested sort, array order, numbers, primitives, unicode values, receipt-shaped, and the AIP-0001 ASCII-only key restriction as the explicit rejection case aeoess asked for). - cross-verify-bundle.json: one complete Knowledge Unit — 4 models × 2 rounds + 1 synthesis + 1 aggregate = 10 Ed25519 receipts, hash- chained via previousReceiptHash, with an external_receipts.aps slot for a DecisionLineageReceipt to drop in. Verifies clean with `npx @veritasacta/verify --bundle`. - selective-disclosure-salted-commit.json: AIP-0002 reference. The Grok-4.20 round-1 dissenting response is published with position + confidence as salted SHA-256 commitments; the unsigned witness block carries the salts + plaintext. Complementary to APS's Merkle-tree approach, not a substitute. generate.mjs is deterministic — same seed, byte-identical output — so regressions in @veritasacta/artifacts canonicalization will surface as test-vector diffs. Refs: #2
This was referenced Apr 18, 2026
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 the ask in #2: ship
test-vectors/jcs-test-vectors.json,test-vectors/cross-verify-bundle.json, andtest-vectors/selective-disclosure-salted-commit.jsonso the agent-passport-system round-trip described by @aeoess is runnable.What's in the box
test-vectors/jcs-test-vectors.json— 9 JCS conformance cases. Each has{name, input, canonical, sha256}. Case #9 is the AIP-0001 ASCII-only key restriction (expected to throw on non-ASCII keys — matches APS v1.41.0 canonicalizer behavior).test-vectors/cross-verify-bundle.json— one complete Knowledge Unit:Every receipt Ed25519-signed, hash-chained via
payload.previousReceiptHashover JCS-canonical bytes. Includesexternal_receipts.apsslot — an APSDecisionLineageReceiptpointing atku_id=ku_4b3f7c2a9d8e1f05drops in directly.Verifies clean:
test-vectors/selective-disclosure-salted-commit.json— AIP-0002 reference. Grok-4.20's Round 1 dissenting response is published withresponse.positionandresponse.confidencereplaced by salted SHA-256 commitments. Unsignedwitnessblock carries salts + plaintext. Commitment algorithm issha256(salt + ":" + JSON.stringify(plaintext))— stable across JSON-shape plaintexts (strings and numbers both work).Per the conversation on #2, this lives alongside (not instead of) a future Merkle-tree reference contribution from the APS side. Different disclosure models, same bundle.
Determinism
test-vectors/generate.mjsderives all Ed25519 keys from a fixed seed via SHA-256, uses constant salts and timestamps, and produces byte-identical output across runs. If@veritasacta/artifactscanonicalization changes incompatibly, these fixtures surface it as a diff.Interop procedure @aeoess proposed
jcs-canonicalize, compare bytes + SHA-256.cross-verify-bundle.jsonthrough both verifiers independently — both should exit 0 over the same 10 receipts.DecisionLineageReceiptwithku_id=ku_4b3f7c2a9d8e1f05intoexternal_receipts.aps.receipt; the second verifier run covers it.selective-disclosure-salted-commit.jsonare independently checkable from the witness — no signing-key access needed beyond verifying the redacted receipt's Ed25519 signature.Refs #2.
🤖 Generated with Claude Code