Repository navigation
test(ledger): guard the accepted filter of the bootstrap pending count - #30
Conversation
production_bootstrap counts pending shadow reservations against the issuance cap with `accepted IS NULL`. An accepted reservation is already in balances().issued, so dropping the filter double counts it and refuses a bootstrap that exactly fits the cap. Lens found no test failed when the filter was removed. Add one with an accepted reservation at an exact fit; it fails with the filter removed. Tests only, nothing under src/. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Why
Lens review of #27 found a surviving mutant: removing
accepted IS NULLfrom the pending-reservation count inproduction_bootstrapleft all tests green.What
One test,
test_bootstrap_ignores_accepted_shadow_reservation: an accepted reservation row plus a cap that exactly fits the bootstrap. The bootstrap must be accepted. Tests only, nothing undersrc/.Evidence
pytest tests/ledger/test_production_bootstrap_v2.py: 16 passed.escrow_v2.py): 1 failed, the new test; 15 passed.ruff checkandruff format: clean.Risk / rollback
Tests only. The missed case fails closed (refuses a bootstrap, never over-issues). Revert the merge.
Summary by CodeRabbit