Status: done (2026-11-15) Priority: 1 Size: S Design ref: docs/review-blocks.md; design.md section 7 (A leg, and its end, to The timetable); docs/mocks/blocks/README.md Goal: The closed forms exist and are shown to agree with the stepping before anything is taken away. Acceptance criteria:
sim/agents: walkHours(st, a), placeOf(st, a) (a pawn’s place now) and doneOf(st, j) (a task’s progress now), and a task’s due step; all read state and write none.tests/lib/invariants.js (run daily by tests/continuity.js) or a test on a small constructed state: every walk that arrives and every task whose work is finished ends within one step of what was foretold at its last change of hands or rate; a hand joining, leaving, the night and a meal are covered.placeOf agrees with a.x, a.y at every step of a day for every pawn that is not walking a field’s rows.node tools/same.js --base REF. npm run verify.
Notes / questions:docs/review-blocks.md, section 4, step 1). Kim, 15 Nov: scheduled blocks, a breaking change allowed.docs/mocks/blocks/mock.js) does this from outside the modules and found walks 100% and work 99.9% within a step; its walkHours and manning are the starting point. The cart’s part in carting (Carts.carting) is not in the mock’s rate and must be in this one.sim/agents: walkHours(st, a), placeOf(st, a), doneOf(st, j), dueOf(st, j) (the tick whose step finishes the work, null with no hands); read-only.
They read two new plain, saved fields written beside the stepping, which the stepping itself does not read (behaviour unchanged):
agent.leg {t, x, y, seg} (set by walkTo, and by a journey leg that goes on), and job.cast {t, done, rate, key} (set when the
hands or their rate differ, a hand is gone, or the hours began anew). The cart’s part in carting is in the rate (Carts.cartingRate, a
read-only twin of carting, which takes a cart).anchor); a walk begun by a side task’s
step likewise (stepAgents).tests/legs.js (in npm test), on the probe state over 12 days: walks 1506 steps, placeOf within 3e-13 of a.x, a.y; 321
tasks, 266 ended, every one within 1 step of what was foretold; doneOf within a step’s work of j.done (a hand leaving mid-step
is told after the hands before it). Nights, meals, hands joining and leaving, and journeys’ legs occur in the run; 80 days also pass.node tools/same.js --base 4ae3e1a (founders, heirs; 7, 42; tiny; 2 years): the only differing leaves are the new .leg and .cast.