spirekeeper/tests
Padreug 8dad72a00d
Some checks failed
ci.yml / fix: complete the unpaired-machine sweep + regression test (pull_request) Failing after 0s
fix: complete the unpaired-machine sweep + regression test
Full sweep of every machine_npub deref found one more reachable crash:
_record_rejected (tasks.py) logs machine_npub[:12], and the
assert_nostr_attribution guard now routes an unpaired machine there, so
None[:12] -> TypeError. Fall back to machine.id.

Every other deref is safe by the attribution-gate invariant: a settlement only
flows past assert_nostr_attribution (now rejecting unpaired) for a paired
machine, so the downstream distribution / parse-path / "landed" logs can't see
None; the collision-loop display already uses `(m.machine_npub or m.id)`.

Adds tests/test_unpaired_machine_guards.py: attribution rejects an unpaired
machine with the domain SettlementAttributionError (not AttributeError), and
build_state_d_tags skips it. New tests + every guard-affected suite pass.

(Two pre-existing test_pair_endpoint failures — #29 drift: fake_pair lacks
bunker_relay, and the test DB lacks super_config — are out of scope; filed
separately.)
2026-06-22 16:55:33 +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 refactor: rename extension identity to spirekeeper 2026-06-13 22:30:05 +02:00
test_cassette_state_consumer.py chore(v2): lint pass — black + ruff auto-fix + mypy regressions (#29 v1.1) 2026-05-31 15:50:14 +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_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 feat(pairing): optional token TTL + revoke endpoint (#9/#12, #22) 2026-06-18 18:51:54 +02:00
test_pairing.py docs(pairing): TTL + token-revoke now enforced post-bind (nsecbunkerd#27) 2026-06-19 23:23:11 +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