ADR-005 slice 2: operator alert, settle off-machine, glossary + guide #50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/dispense-outcome-slice2"
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?
Second half of bitspire ADR-005 (#49 was the first). Pairs with bitspire
feat/settle-transaction-op, which teaches the machine the new op — merge order doesn't matter, an unknown op type is skipped and stays pending until the machine learns it.Operator alert (m017,
notify.py). When a settlement lands incash_owedorpartial_pending, the operator gets a NIP-17 gift-wrapped DM (kind 14 → 13 → 1059) to their own account pubkey, or to the newsuper_config.alerts_pubkey. Signed through the operator's signer, so nothing new sits at rest. Best-effort: a failed publish is logged and the dispense report is still acked;operator_notified_atstops a resend from re-alerting.Settle off-machine.
POST /api/v1/dca/settlements/{id}/settle-cash-owedwith a provenance note: the settlement distributes at the full amount (the customer is whole) and a machine-widesettle_transaction {txid, note}op is published so the machine marks its own row remediated. Until now the only way to close an owed row was to dispense more cash from the machine that had just jammed. Action is on the worklist buckets and the settlements table.Docs.
static/docs/errors.html(glossary keyed by raw code —78 42,82 00, … — with class, meaning, what you'll find inside) andstatic/docs/operator-guide.html, both linked from the dashboard header; the worklist's error cell deep-links to the glossary entry.Not in this PR: the
cash_out_enabledswitch — it carries its own machine-side state and is additive to Resume; filed separately.Tests: 294 pass (28 new). ruff/mypy findings are the pre-existing set on main.
Fits #40.
POST /api/v1/dca/settlements/{id}/settle-cash-owed: the operator paid the customer by hand. Appends the provenance note, distributes at the full amount (the customer is whole), and publishes a settle_transaction op so the machine flips its own dispense_error/partial row to remediated. Until now the only way to close an owed row was to dispense more cash from the machine that had just jammed.