fix(machine): republish cassettes-state after dispense + on reload #65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cassette-state-republish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Operator-requested fix from the 2026-06-21 cash-out leg (
~/dev/coordination/smoke-bunker-pairing-sintra.md, 15:30Z spec §2 — the cassette half, which stands; the cash-in half was superseded for security and is tracked separately in spirekeeper#31).Problem
The
bitspire-cassettes-statebeacon was published once at bootstrap only (operator-config.tsv1 one-shot). After a cash-out dispense the ATM decrements its local HAL counts but never republishes, so the operator's Cassettes view stays frozen at the bootstrap snapshot (still 20×4 / 50×7 after dispensing 20×1 + 50×1).Fix
operator-config.ts— extractpublishCassettesState()(the live, ungated publish) out of the one-shot bootstrap; expose it onOperatorConfigService; also fire it after an operator-config apply (the "on reload" case — different d-tag from the operator's config event, so no echo loop).atm.ts— republish after each cash-out dispense (complete + partial), once the decremented counts are persisted viarecordTransaction→reloadPersistedInventory. Cash-incompleteis skipped (doesn't touch cassettes).kind-30078 is replaceable (latest wins) and the operator already consumes every update — no operator-side change. typecheck 12/12, machine 29 tests green.
Validates live on the next cash-out
The Sintra is paired (
679ac2a8) with cassette rows populated (20×4 / 50×7). Once this deploys, the next cash-out dispense will republish the decremented counts and the operator view should track it — a good leg to fold into the in-progress cash-in/out test.Do NOT use the MCP merge endpoint — merge via the Forgejo UI after review.
🤖 Generated with Claude Code
8b7098a4b0to762b0def5c