VB-1836: The owner cache left on another farmstead’s tiles in the played populous seed 7 run
Status: ready
Priority: 2
Size: S
Design ref: docs/architecture/ownership.md (st.owner, a cache of sim/ownership); tests/lib/invariants.js, the owner cache
Touches: sim/ownership (setOwner, farmToVillage)
Goal: The owner cache always agrees with the farmsteads’ land
Acceptance criteria:
Found by VB-1753’s 2-year comparison: populous, small map, seed 7, pawn 0 (household 0’s head) inhabited and its switch on, 2 years
(Sim.advance(st, Sim.YEAR) twice): checkState reports farmsteads[61]: owner cache on tile 9830 is 63, expected 62 and the same on
tile 9650. The run with the same head unplayed (its controller, switch on) has no failure. The same at the base 79c22dd7, before VB-1753:
not its change. The played run diverges from the unplayed at day 33 (sim/player playerStep’s sleep reckon), so the failure is a chaotic
path any run might take, not a played-only rule.
The first hour the invariant fails in that run found, and the write that leaves st.owner on farmstead 61’s tiles at 63 named.
Mended at its owner, with a check on a tiny constructed state that fails before the mend.
The 2-year played run of populous small seed 7 passes checkState.