Status: done (2026-10-30, dd34cb5)
Priority: 2
Size: S
Arch: tooling
Phase: implement
Design ref: Vision and scope (up to about 1,000 pawns); REVIEW.md, Performance.
Goal: planRound in src/sim/jobs.js bids every idle pawn against every open job: 818 pawns × 660 jobs is 127,000 bids per 6-minute step at 7:00, nearly all of them failing at mayTake. A pawn may only take jobs of its own household and village, about 5–15.
Acceptance criteria:
st.jobs keeps, besides the map by key, an index from owner (household:<id>, village:<id>) to its open jobs, updated wherever a job is posted or deleted (post, refreshJobs, complete, deposit, extinct). @state documented.planRound bids each idle pawn against its household’s and its village’s jobs only, in increasing job id, which is the order st.jobs iterates today, so the random draws in bid happen in the same order.npm run verify passes and tests/golden.json is unchanged.tools/sim.js if VB-068 is done).jobsBy is kept out of the golden fingerprint (DERIVED in tests/golden.js) as it only indexes st.jobs; golden.json is unchanged. populous medium, seed 7, 10 days: 324 ms per game day before, 330 after (818 pawns), so matching was not the cost at this size; the index is still in place for 1,000 pawns.