Skip to content

$ teller: the exit spends the hold by the one figure it settles at (TODO L1689) - #929

Draft
MattJackson wants to merge 1 commit into
predevfrom
lane-money-teller-one-figure
Draft

MattJackson wants to merge 1 commit into
predevfrom
lane-money-teller-one-figure

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

TODO L1689-1692 (docs/design/1.6.0-TODO.md): crates/busbar-kernel/src/teller.rs exit spent the hold by run.meter.total() and settled it by the settlement writer's amount.

Fix: hold.spend(amount, 0) — one figure spends and settles the hold. AccrualMeter::offer_headroom/headroom deleted (no caller anywhere). The root test harness records the posting's settled figure instead of the meter.

Production postings are unchanged: no production leg accrues onto the meter (only busbar-kernel/tests/common/mod.rs:497), the root door reserves zero (crates/busbar/src/root/door_steps.rs "The door reserves nothing") and children accrue zero, so both spellings give overdraft = settled - reserved. Ruling: owner 2026-10-14 queue rule 21 ("money - ledger * ratecard").

RED: crates/busbar-kernel/tests/loop_battery.rs the_hold_is_spent_by_the_figure_it_settles_at_not_by_a_second_count — meter 150, reported 80, reserved 100: posted overdraft 50 + OVERDRAFT flag before, 0 after.

Remaining: AccrualMeter/Run.meter are now test-rig only; deleting them touches files open PRs edit (#787 kernel tests/common, #923 root plane_node.rs, #902/#870, #912/#824, #778/#561) — follow-up once those land.

$ PR: DRAFT per queue rule 15.

…O L1689)

The exit spent the hold by the run's AccrualMeter total and settled it by the
settlement writer's amount. Two numbers: an end that settled 80 inside a
reservation of 100 posted an OVERDRAFT of 50 the meter alone ran up, and the
exit, the sweep and recovery disagreed on the overdraft figure. No production
leg accrues onto the meter or offers headroom, so production postings are
unchanged: the door reserves zero and children accrue zero, where both
spellings give overdraft = settled - reserved.

- exit: hold.spend(amount, 0); offer_headroom/headroom deleted (no caller)
- root harness records the posting's settled figure, not the meter
- RED: loop_battery the_hold_is_spent_by_the_figure_it_settles_at_not_by_a_second_count
  (meter 150, reported 80, reserved 100: overdraft 50 before, 0 after)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant