open-standards/jcp/jcp-rs/crates/jcp-action-receipt/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 7f41c9a807 jcp-action-receipt: end_to_end authorises at an estimate, not a reading
The end_to_end example decides its action before the work runs and
debited Energy::measured(250_000), so the authority receipt it seals and
binds into the AR-1 receipt claimed a 0.25 J hardware reading of work
that had not happened. Its own docs promise HwShunt "only when every
record the meter returned is a hardware reading".

The decision now debits `authorised_cost()`, the action's 0.25 J
estimate graded Estimator with no measured figure, and the docs say the
work's reading is step 3's. The work receipt and the AR-1 receipt are
unchanged: they already carry the meter's own grade.

tests/end_to_end_example.rs compiles the example in as a module and
checks the authorised cost is Estimator with no measured figure.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-10 17:47:12 -04:00
..
conformance.rs jcp-action-receipt: AR-1, the composition envelope 2026-08-28 08:44:07 -04:00
end_to_end_example.rs jcp-action-receipt: end_to_end authorises at an estimate, not a reading 2026-10-10 17:47:12 -04:00