Repository navigation
test(cloud-lab): pin that an outage-refused payment never burns the token - #512
Conversation
…oken The #423-class property, pinned at the tollgate HTTP surface. New three-phase lane run from the host (the client has no docker control, and 'compose run' would restart a stopped mint through depends_on — the outage phase runs with --no-deps): - A1 (mint up): fund and stash the token - A2 (mint down): payment refused without a crash; a 1022 here would mean offline acceptance exists and must be consciously re-pinned - B (mint back): every proof UNSPENT at the mint (NUT-07) and the same token still buys a session, byte for byte Plus a default-lane replay test: a token that already bought a session never buys another. test_mint_failure covers degradation with fresh tokens per attempt; the same-token-across-outage leg was pinned nowhere.
Verification: PR #512 (rejection-safety cloud-lab lane)Tested as-is at head The trap: shared image cache can silently test someone else's binaryMy first lane run passed (A1/A2/B), but the What I ran (all in an isolated project:
|
Pins the #423-class property at the tollgate HTTP surface, in the lab that already found #480 and #481 this week.
The property
Whatever refuses a payment, the customer's ecash must survive it. Concretely for a mint outage: a token refused while the mint is down must be fully UNSPENT at the mint (NUT-07) and must still buy a session, byte for byte, once the mint recovers.
Shape
Three-phase lane, host-driven (
./run-rejection-safety.sh, therun-keyset-rotation.shpattern — the client container has no docker control, and a plaincompose runwould restart the stopped mint through the client'sdepends_on, so the outage phase runs--no-deps; that trap is why this lane did not exist as an in-container test):Plus a default-lane test (runs in every
clientinvocation): a replayed token never buys a second session, and the replay doesn't crash the tollgate.Verified
main: A1/A2/B all pass (A2's 35s wall is the health-tracker detection latency)1 passed, 3 skipped(phases correctly gated)make go-battery: 16 modules green (no Go changes)What this adds beyond existing coverage
test_mint_failureexercises degradation with fresh tokens per attempt (and its docker-gated legs skip in-container);test_swap_feespins the below-fee refusal's spentness. The same-token-across-outage leg and the replay leg were pinned nowhere — #423 reports the burn class from the clientd side; this lane holds the line at the merchant surface.