spirekeeper/tests
Padreug 5f60b3fe31
Some checks failed
ci.yml / fix(cassettes): break the same-second tie with the machine's counter (pull_request) Failing after 0s
fix(cassettes): break the same-second tie with the machine's counter
The ordering gate compares created_at, which NIP-01 defines at one-second
granularity. A dispense and the publish that follows it land inside one
second routinely, so the report was dropped and the operator kept the
pre-dispense count until the next heartbeat five minutes later.

The machine bumps a counter on every local change to a bay count and
carries it in its state document. m015 stores it per row, and the gate
consults it only when the stamps are equal, where created_at carries no
information at all.

Only on equality, deliberately. A machine whose state.db was replaced
restarts its counter at zero while its wall clock keeps moving forward;
gating on the counter across different stamps would lock that machine out
for good. Equal stamps with no counter on either side stay closed, which
costs one heartbeat and risks nothing.
2026-09-23 12:58:04 +02:00
..
__init__.py feat: code quality 2024-08-13 08:20:45 +02:00
conftest.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_calculations.py refactor(v2): canonical sat-amount vocabulary + delete Lamassu-era reverse-derivation 2026-05-26 20:08:30 +02:00
test_cassette_configs.py fix(cassettes): break the same-second tie with the machine's counter 2026-09-23 12:58:04 +02:00
test_cassette_ops.py feat(cassettes): persist the machine's counts-uncertain marker 2026-09-23 12:47:30 +02:00
test_cassette_state_consumer.py fix(cassettes): order state events by created_at, not by one remembered id 2026-09-22 22:23:19 +02:00
test_collision_guard.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_deposit_currency.py feat(v2): lock deposit currency to machine.fiat_code (closes #26) 2026-05-16 18:03:34 +02:00
test_fee_cap_validation.py feat(v2): CRUD + per-direction fee cap validation (#38 2/5) 2026-06-01 10:42:03 +02:00
test_fee_mismatch_recording.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_fee_publish_triggers.py feat(v2): wire fee-config publish into machine + super-config triggers (#39 3/3) 2026-06-01 20:07:56 +02:00
test_fee_transport.py feat(v2): fee_transport — kind-30078 publisher for operator fee config (#39 2/3) 2026-06-01 20:00:29 +02:00
test_machine_config_transport.py feat(transport): get_machine_config RPC — server-delivered machine config (#41) 2026-07-02 21:54:40 +02:00
test_nip44_v2.py chore(v2): lint pass — black + ruff auto-fix + mypy regressions (#29 v1.1) 2026-05-31 15:50:14 +02:00
test_nostr_attribution.py refactor(v2): canonical sat-amount vocabulary + delete Lamassu-era reverse-derivation 2026-05-26 20:08:30 +02:00
test_operator_split_legs.py feat(v2): principal-based fee split — fixes super under-payment (#38 3/5) 2026-06-01 11:24:09 +02:00
test_pair_endpoint.py fix(pairing): retry all bunker admin RPCs past transient timeouts (#38) 2026-07-02 15:30:55 +02:00
test_pairing.py fix(pairing): retry all bunker admin RPCs past transient timeouts (#38) 2026-07-02 15:30:55 +02:00
test_principal_based_fees.py feat(v2): principal-based fee split — fixes super under-payment (#38 3/5) 2026-06-01 11:24:09 +02:00
test_roster_resolver.py refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_unpaired_machine_guards.py fix: complete the unpaired-machine sweep + regression test 2026-06-22 16:55:33 +02:00