VB-1495: Repair: tests/browser-editor places no empty farm near the village
Status: done (2026-11-27)
Priority: 1
Size: S
Design ref: tests/browser-editor.js; src/page/editor.js; src/page/editplace.js; docs/testing.md
Goal: tests/browser-editor.js passes again: the cause of ‘no empty farm could be placed near the village’ is found, and either the editor or the check is mended.
Acceptance criteria:
Notes:
- 23 Nov 2026: seen while VB-1491 was built. Five failures, the last four following from the first: “no empty farm could be placed near the village”; “an empty farm”; “a person placed in an empty farm”; “Play, placed by hand” (4 farms for 5); “the editor lost what was placed when a game was played”.
- Fails the same way at 5e69f31 (main before VB-1491, by its agent’s run) and on VB-1491’s branch; the terrain-brush checks of the same script pass. Not one of the checks a pull request runs, so main went red unseen.
- Not yet looked into: the journey scale (VB-780, VB-786, merged the same day) changed the ground’s costs and the site search, which may bear on where a farm can be placed. A guess, unverified.
- 27 Nov: already mended by VB-1907 (886b3a29), before this run. Cause: VB-780 (#249; the forested island) leaves no meadow 4-8 steps from the green once the household and its field take it, so the check was wrong, not the editor; the first failing commit is VB-780’s merge. The check now searches to 11 steps. Confirmed: tests/browser-editor.js passes on night-base (it needs over 300 s on this machine).