jcp-receipt: move an orphaned doc comment onto the test it describes #209
2026-10-10
jcp-receipt: move an orphaned doc comment onto the test it describes
All checks were successful
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 6m49s
standards workspaces build + test / aac-rs (pull_request) Successful in 3m40s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m37s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 1m9s
standards workspaces build + test / map-rs (pull_request) Successful in 1m10s
standards workspaces build + test / mesh-rs (pull_request) Successful in 1m10s
standards workspaces build + test / openpay (pull_request) Successful in 7m28s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m9s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m58s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m31s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m10s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m11s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m14s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 6m27s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m15s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m6s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m53s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 8m31s
A paragraph headed "**The migration guarantee**" sits between two tests in
`jcp-receipt/src/lib.rs` with no item of its own. Rust therefore merges it into
the doc of the *next* item, `an_absent_environment_leaves_the_bytes_untouched` —
a test about environment bindings, which has nothing to do with legacy
receipts. It reads as documentation for a deleted test, and that is exactly how
I first read it.
It also names the wrong file. It says the bytes are "published in
`conformance/v1/vectors.json`"; they are in `conformance/v1/legacy_jcp1.json`,
and are byte-identical to the hex constant in `published_v1_receipts_still_verify`
(checked).
The paragraph now documents `published_v1_receipts_still_verify`, which is the
test that actually carries the guarantee, names `legacy_jcp1.json`, and notes
that the inlined constant is a copy of the file's **allow** envelope while the
file also carries a **deny** — both of which `jcp-conformance`'s
`tests/pack.rs` verifies against the file itself, via `extract` and so
`verify_cose_sign1`, requiring both verdicts to be present.
Doc comments only; `jcp-receipt` green.
This PR originally also added a `jcp-conformance/tests/pack.rs` reading the five
pack files nothing read. Main closed that independently in 1b3e3907, reading the
same files and reaching the same legacy-deny finding, so that half is dropped
rather than merged alongside. This correction is the part main did not make.
Co-Authored-By: Claude Opus 5.5 <[email protected]>