open-standards/jcp/jcp-rs/crates/jcp-conformance/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 1b3e390762
Some checks failed
standards workspaces build + test / jouleclaw-rs (push) Successful in 1m57s
standards workspaces build + test / aac-rs (push) Successful in 48s
standards workspaces build + test / joule-code-rs (push) Successful in 43s
standards workspaces build + test / joulecontract-rs (push) Successful in 38s
standards workspaces build + test / map-rs (push) Successful in 39s
standards workspaces build + test / mesh-rs (push) Successful in 30s
standards workspaces build + test / openpay (push) Successful in 2m18s
standards workspaces build + test / eoc-rs (push) Successful in 1m47s
standards workspaces build + test / jcp-rs (push) Successful in 1m18s
standards workspaces build + test / proof-rs (push) Successful in 1m15s
standards workspaces build + test / sandbox-rs (push) Successful in 2m9s
standards workspaces build + test / smart-byte-rs (push) Successful in 2m34s
standards workspaces build + test / arl-rs (push) Successful in 2m4s
standards workspaces build + test / joule-ui-rs (push) Successful in 2m14s
standards workspaces build + test / jouledesk-rs (push) Successful in 2m17s
standards workspaces build + test / joulehook-rs (push) Successful in 2m7s
standards workspaces build + test / sense-rs (push) Successful in 2m4s
standards workspaces build + test / macOS energy backend (jcp-energy) (push) Failing after 2m7s
jcp: read the three pack files nothing read
jcp was already the best-covered standard here -- jcp-action-receipt's
tests/conformance.rs genuinely reads action_receipt.json and its meta from disk --
but three published files had no reader: legacy_jcp1.json, dual_ceilings.json and
standing.json.

The legacy pack is the interesting one, and my first reading of it was wrong, so
the accurate version: the migration guarantee IS tested. jcp-receipt's
published_v1_receipts_still_verify checks that a jcp/1 receipt still verifies
after the payload_hash bump. What it checks is ONE INLINED hex constant, which is
a copy of this pack's allow receipt. The pack also publishes a legacy DENY
(untrusted-control) that no inlined constant covers, and the file itself is read
by nothing -- so the published bytes and the legacy refusal path were unverified.
Both verdicts are now required, so the refusal cannot quietly leave the pack.

Two smaller corrections while there. jcp-receipt's doc comment titled "The
migration guarantee" is misplaced: it sits ~80 lines above the test it describes,
over an unrelated environment-binding test. And it overstates the mechanism --
there is no version dispatch in jcr1.rs; payload_hash is simply optional, so its
absence leaves a legacy preimage byte-identical, which is what the neighbouring
comment actually says.

dual_ceilings.json carries §4.8's two refusals -- funds-exceeded and
currency-mismatch -- as negative vectors nothing executed. They are now replayed
and compared as the whole recorded verdict, reason included, because "it denied"
would pass a receipt that denied for the wrong reason. Replaying the spend also
has to reproduce the recorded joule total and stay inside the grant's ceiling.

standing.json links as far as the pack allows: minted_child descends from
standing_grant, and the continuation carries the amended budget. One link cannot
be closed -- continuation_grant.parent_hex is not among the ids the pack
publishes. Its budget matches the amendment, so the parent is plausibly the
post-amendment grant, but that grant is not in the pack. Asserted as the current
state with a message to replace it once the parent is published.

legacy_jcp1.json is deliberately excluded from the drift check: it is frozen
pre-payload_hash evidence, and regenerating it would erase what it exists to
prove. The test asserts the generator does not write it.

Falsified: making payload_hash required in extract -- the bump done wrong -- fails
the legacy test here. Stated honestly, it also fails jcp-receipt's own inlined
test, so that guarantee was not uncovered; what this adds is the published file
and the deny.

Unrelated pre-existing flake seen while running the workspace:
jcp-gateway::granted_tool_is_allowed_metered_and_debited fails intermittently
("a real span costs joules") -- fail/pass/fail over three runs. jcp-gateway does
not depend on jcp-conformance, so it is not from this change; it is the known
macOS IOReport 0 uJ issue.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-26 05:21:54 -04:00
..
pack.rs jcp: read the three pack files nothing read 2026-09-26 05:21:54 -04:00