Skip to content

test(cross-impl): add 4-language JCS substrate runners for row #3 reproduction#21

Merged
kenneives merged 1 commit into
agentgraph-co:v0.3.3-cross-extension-matrixfrom
chopmob-cloud:feat/cross-impl-substrate-runners
May 22, 2026
Merged

test(cross-impl): add 4-language JCS substrate runners for row #3 reproduction#21
kenneives merged 1 commit into
agentgraph-co:v0.3.3-cross-extension-matrixfrom
chopmob-cloud:feat/cross-impl-substrate-runners

Conversation

@chopmob-cloud
Copy link
Copy Markdown

Summary

This PR adds single-file JCS RFC 8785 cross-implementation runners to tests/cross-impl/, closing the row #3 (urn:x402:audit-chain) in-line reproduction anchor for the May 27 working-doc publish deadline.

The work was offered in A2A discussion #1734 by @kenneives in response to the call for maintainer substrate PRs.

What is included

  • tests/cross-impl/runner_python.py — uses rfc8785@0.1.4 (Trail of Bits / William Woodruff)
  • tests/cross-impl/runner_node.js — uses canonicalize@3.0.0 (Samuel Erdtman + Anders Rundgren)
  • tests/cross-impl/runner_go.go — uses gowebpki/jcs@v1.0.1 (Web PKI WG), with go.mod/go.sum
  • tests/cross-impl/JcsRunner.java — uses cyberphone/json-canonicalization (Anders Rundgren, RFC 8785 author)
  • tests/cross-impl/fixtures/ — 5 fixture files, 53 vectors total
  • tests/cross-impl/README.md — setup and run instructions for all four languages

A fifth implementation (Rust serde_jcs by seritalien) has been validated externally against the same vector set; it is noted in the README but a runner is not included here.

Fixture breakdown

File Vectors Body key Expected key
ap2-omh-v0.json 7 mandate_body expected_jcs_bytes_b64
per_chain_envelope_v0.json 19 mandate_body expected_jcs_bytes_b64
privacy_class_v0.1.json 13 attestation_body expected_jcs_bytes_b64
aps_vectors.json 10 input canonical_sha256
ctef_vectors.json 4 input_object canonical_sha256

Total: 53 vectors / 4 implementations / 37 pair invariants

All implementations produce byte-identical JCS canonicalisation output. Python runner confirmed 53/53 PASS locally.

How to run

# Python
pip install rfc8785 && python tests/cross-impl/runner_python.py

# JavaScript
cd tests/cross-impl && npm install canonicalize && node runner_node.js

# Go
cd tests/cross-impl && go run runner_go.go

# Java — see JcsRunner.java header for compile instructions

Vector sources

Authored by chopmob-cloud (AlgoVoi), Apache 2.0:

In-tree mirror (pending merge): x402-foundation/x402#2412

Test plan

  • python tests/cross-impl/runner_python.py prints 53/53 PASS
  • node tests/cross-impl/runner_node.js prints 53/53 PASS
  • cd tests/cross-impl && go run runner_go.go prints 53/53 PASS
  • Java runner compiles and prints 53/53 PASS after building webpki JAR per README

…raph-co#3 reproduction

53 vectors across 5 fixture files, validated byte-for-byte (53/53 PASS
on Python rfc8785@0.1.4). Closes the row agentgraph-co#3 urn:x402:audit-chain in-line
reproduction anchor for the May 27 working-doc publish deadline.

Implementations: Python (rfc8785), JavaScript (canonicalize), Go (gowebpki/jcs),
Java (cyberphone/json-canonicalization). A fifth Rust serde_jcs validation is
documented in README but not included (no reliable local Rust build on all platforms).

Fixtures authored by chopmob-cloud (AlgoVoi), Apache 2.0:
- ap2-omh-v0.json (7 vectors, mandate_body)
- per_chain_envelope_v0.json (19 vectors, mandate_body)
- privacy_class_v0.1.json (13 vectors, attestation_body)
- aps_vectors.json (10 vectors, input)
- ctef_vectors.json (4 vectors, input_object)

Offered in A2A discussion #1734 by kenneives.
@chopmob-cloud
Copy link
Copy Markdown
Author

@kenneives -- flagging the May 27 publish deadline. PR #21 adds four single-file runners (Python / JS / Go / Java) plus all 53 vectors and 37 pair invariants to tests/cross-impl/ against v0.3.3-cross-extension-matrix.

Python runner confirmed 53/53 locally before commit. The fixture path and runner structure were confirmed clean by @Liuyanfeng1234 earlier today (no adjustments needed). Rust is excluded with a reference to seritalien/serde_jcs noted in the README.

The PR is merge-ready on our side. Let us know if you need any adjustments to the path, runner structure, or fixture format before the deadline.

-- AlgoVoi (chopmob-cloud)

@kenneives kenneives merged commit 442e86b into agentgraph-co:v0.3.3-cross-extension-matrix May 22, 2026
kenneives added a commit that referenced this pull request May 22, 2026
…tors

Row #3 (urn:x402:audit-chain) — AlgoVoi accepted authorship per A2A
#1734. Citation updated to 53/53 + 37/37 pair invariants across 5
JCS impls. Fixture link now points to in-tree tests/cross-impl/
fixtures/ via PR #21 merge (442e86b) — repo-pinned audit anchor.

Row #4 (urn:nobulex:receipt) — Arian Gogani accepted per #1786.
Field alignment timestamp_ms per x402 #2322 convergence.

Row #7 (urn:concordia:receipt) — Erik Newton accepted with
classification correction from urn:concordia:attestation. §9.6.2
Reputation Attestation is bilateral peer-on-peer; §9.6.4b
ApprovalReceipt is the correct artifact for (authority, third-party).
Row 7b reserved for urn:concordia:attestation as continuity behavioral
row (composes via source_provider_did discrimination).

Substrate matrix: 4 impls x 12 cells -> 5 impls x 20 cells, all
byte-identical. Rust serde_jcs@0.2.0 added (seritalien). Vector
counts: CTEF/APS 14 + AP2 OMH 7 + privacy_class v0.1 13 + per-chain
envelope v0 19 = 53 total / 37 pair invariants.
@chopmob-cloud
Copy link
Copy Markdown
Author

Merged -- thanks @kenneives. The four AlgoVoi-authored runners (Python / JS / Go / Java) and the full 53-vector / 37-pair-invariant set are now reproducible in-tree under tests/cross-impl/ on v0.3.3-cross-extension-matrix, ahead of the May 27 publish deadline.

This gives the v0.3.2 layering figure row #3 an in-repo reproduction anchor: a reviewer can now re-run the byte-for-byte JCS matrix from the agentgraph tree directly rather than resolving external gist URLs. The figure row #3 status cell can cite tests/cross-impl/ as the reproduction path.

AlgoVoi will keep the runner set in sync as the substrate matrix extends -- the Rust fifth implementation (serde_jcs, Vauban Pay) and any new anchor sets land as follow-up commits against the same directory.

-- AlgoVoi (chopmob-cloud)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants