open-standards/jcp/jcp-rs/crates/jcp-openpay
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 5485834d35
All checks were successful
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 10m56s
Payments: a capture the rail declines is reversed, in the gate, the books and the receipts
A partial capture is decided at the gate before the money moves. When
the rail then declined it, the driver reported the gate ahead of the rail
and asked for a retry under the same key, which a definite decline can
only refuse again: the gate kept a record of money that never moved.

- Runtime::reverse_capture returns a capture's money to its hold's
  reservation and takes it off the spend: no more than captures drew from
  that hold, never after it resolves, joules kept since the work ran. A
  hold now tracks what captures drew from it.
- A reversal is a receipt stating reverses (the capture) and, allowed,
  reversed_minor. The replay — the reference's and the second reader's —
  reads a reversed capture as debiting that much less money and drawing
  that much less from its hold. The crash-point test reverses at random
  and a restart at every prefix still stands where the live runtime did.
- MeteredGate::reverse_capture on the reference gate, the ledger-backed
  gate (which posts the draw's reverse) and the signing gate. The card
  driver reverses on a definite decline and keeps the retry for an
  unanswered capture; a retry that is then declined is reversed too.
  GateAheadOfRail carries the capture so a later reversal can name it.
- The published lifecycle log gains a reversed capture on a settled hold,
  one on a hold left outstanding, and a refused second reversal; both
  readers restore it as published. SPEC 8.1 and C32, metered-settlement
  6.5. The whole-stack test has the acquirer decline a capture, and the
  rail, the books and the receipts still agree.

Six seeded faults are caught.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-11 13:55:06 -05:00
..
src Payments: a capture the rail declines is reversed, in the gate, the books and the receipts 2026-11-11 13:55:06 -05:00
Cargo.toml jcp-openpay: the gate for the card and instant rails, and a mandate becomes its ceilings 2026-11-10 16:21:18 -05:00