mirror of
https://github.com/block/buzz.git
synced 2026-10-29 21:41:33 +00:00
Two MINOR accuracy gaps from Thufir Pass 2:
1. Event-side trigger isolation
The denied-receipt-then-event negative in
denied_lifecycle_receipt_commits_without_audit_event queues both
deferred triggers in one transaction; it does not prove the event-side
trigger (authorization_event_receipt_cardinality) alone. Add
denied_lifecycle_receipt_event_side_trigger_isolated: commit a denied
receipt in auto-commit (no deferred trigger active), then open a new
transaction that inserts only the mapped success-transition event and
asserts COMMIT rejection with the exact constraint name. Rejection
must come from the event-side trigger only.
2. Applied lifecycle coverage at migration 42
No test exercised the outcome_code IN (1, 3) branch at migration 42.
Add applied_lifecycle_receipt_requires_exactly_one_event: an applied
enroll receipt + exactly one mapped event commits; the same setup
without the event rejects with
authorization_operation_receipt_event_cardinality. Uses the minimum
valid circular identity/lifecycle setup (policy + history + receipt +
binding + event), stops at migration 42 not 41.
3. Correct surrounding mutation/coverage comments
- denied_lifecycle_receipt_commits_without_audit_event: update
mutation note to name both new tests, remove the stale claim that
the receipt-then-event negative covers both trigger directions.
- The receipt-then-event negative comment is tightened to say only
the receipt-side trigger fires in that transaction.
No production SQL changes. All 11 NIP-FI ignored PostgreSQL regressions
green (--test-threads=1).
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Hayt <9e1c23a3fd83f61da34420e4e88ff1b16e45cafcc0cd9019eb07d4ecfa8ca9b0@buzz.block.builderlab.xyz>