VB-1548: A day owed that ends on the road home drops its load: the task is stuck, its work done, never taken again
Status: done (2026-11-25)
Priority: 1
Size: S
Arch: plans
Phase: implement
Design ref: src/sim/days.js:133; backlog/VB-1546.md
Touches: sim/days (step); sim/day (weigh); tests/days.js
Goal: a load in hand is delivered before a day owed sends its pawn home; no task with its work done stands unclaimed
Acceptance criteria:
A pawn on a day owed whose hours are booked while it carries the creditor’s load (phase back) delivers it before it goes home; the goHome of sim/days (line 133) waits for the delivery, or the delivery is made first. Nothing teleports.
A task whose work is done and that no one holds is not left for ever: allot (sim/jobs) passes it over as “only its load is on the road”, which is true only while a hand carries it. Say what becomes of one with no carrier (posted again, finished as delivered, or taken down), and why.
A check on a small constructed state (tests/tiny.js): a day owed ends with the load on the road; the load reaches the creditor’s pile and the task is gone.
Before and after on founders small seeds 3 and 7, 4 years, and populous small seed 7, 3 years: tasks stuck over 48 hours (VB-1546’s script counted 2, 3 and 9, the same before and after VB-1546), and the households’ wood and health.
Notes
Found by VB-1546 (23 November), tracing founders small seed 7: on day 133 pawn 9 (household 4’s holder, on a day owed to household 0) cut household 0’s second wood job (wood:h0b), turned for home with the load at 16:1 (phase back, load 90); the next step its 8 hours were booked (daysToday.by[9] = [8, 8, 1]) and sim/days issued goHome (phase home, job and load still held). At 17:3 it was home, phase null, job held; at 18:00 the claim went, undelivered. Both of household 0’s wood jobs were then stuck (the first since day 39, the same way), so its pile stood at 0 through year 4: no cooking, a cold house, the farmer’s health from 79 to 18 and the wife’s 94 to 48 (no hunger). Founders seed 3: household 2 the same, both wood jobs stuck (days 86 and 136).
The defect is older than VB-1546: the count of stuck tasks is the same before and after it; which household it strikes, and when, moves with the run.
25 Nov 2026 (arch plans, VB-1742): folded into the arch as path step 1 (the review of 25 Nov, option A), and kept ready at priority 1: a stuck task is a defect today, and the task that removes sim/days’ own way home, VB-1749, is far down the path. Mend it in the phase machine; its check on a constructed state stays and must pass under VB-1749 (which waits for this task).
Built (VB-1548)
sim/days step: a day’s goHome waits while the hand’s phase is back with a load and a job; the next step after delivery sends it home. The check is in tests/days.js (step called on a booked hand with a load, then without); a full-road check was not built (the phase is forced).
No-carrier tasks: not changed in allot. After the fix the one way to a done task with no carrier was goHome’s release; other releases (death, dissolving) already lay the load for the owner to fetch (sim/agents release), so the task stays posted for a fetch rather than being taken down. Left as is, why: a rule for it without a witness would be a guess.
Measured (my own script, 0.5 h steps, jobs with work done and no claim for over 48 h; not VB-1546’s, which is not in the repo): founders 3 / 7 and populous 7: before 1 / 0 / 14, after 1 / 1 / 14 (all fish/hunt/rackfish/drove kinds, not wood: the counter is loose); wood 384 / 697 / 27887 -> 384 / 688 / 27887; mean health 97.3 / 99.6 / 98.6 the same. The runs I made did not reproduce the wood stuck of the trace (the runs diverge from VB-1546’s); criterion 4 is reported, not shown to move.