Code Farm: per-plot auto-replant pause and crop-lock check; community sync and node work

Continuous Delivery could never be turned off once a crop was planted. Add a
one-shot per-plot "stop after harvest" flag (POST /game/plot/stop, Devii tool
game_plot_stop, game_plots.stop_after_harvest), cleared by the next plant,
autoreplant claim or Refactor. Autoreplant now also respects crop locks through
the shared _crop_lock predicate. Plan and measurements in happyplanting.md.

Also includes the pending community sync, node network and related work in the
tree; the full suite passed (4999) with all of it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 02:23:43 +02:00
co-authored by Claude Sonnet 5.5
parent ce899fc5e1
commit 02ab747cd0
203 changed files with 11624 additions and 301 deletions
+28
View File
@@ -496,3 +496,31 @@ def test_mobile_no_horizontal_overflow(mobile_page):
client_w = page.evaluate("document.documentElement.clientWidth")
assert scroll_w - client_w <= 1, f"horizontal overflow: {scroll_w} vs {client_w}"
assert page.locator("[data-game-grid]").first.is_visible()
def test_plot_stop_toggle_hidden_without_continuous_delivery(alice):
page, _ = alice
reset_farm("alice_test")
open_game(page)
page.select_option("[data-slot='0'] select[name='crop']", "shell")
page.click("[data-slot='0'] button:has-text('Plant')")
page.locator("[data-slot='0'].game-plot-growing").wait_for(state="visible")
assert page.locator("form[data-game-action='plot-stop']").count() == 0
def test_plot_stop_toggle_flips_and_leaves_plot_empty_after_harvest(alice):
page, _ = alice
reset_farm("alice_test")
set_farm("alice_test", mastery_autoreplant=1)
open_game(page)
page.select_option("[data-slot='0'] select[name='crop']", "shell")
page.click("[data-slot='0'] button:has-text('Plant')")
toggle = page.locator("[data-slot='0'] form[data-game-action='plot-stop'] button")
toggle.wait_for(state="visible")
expect(toggle).to_contain_text("Stop after harvest")
toggle.click()
expect(toggle).to_contain_text("Resume auto-replant")
warp_ready("alice_test")
open_game(page)
page.locator("[data-slot='0'] form[data-game-action='harvest'] button").click()
page.locator("[data-slot='0'].game-plot-empty").wait_for(state="visible")