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
+21
View File
@@ -209,6 +209,27 @@ def test_password_is_stored_but_never_returned(client, admin, fake_world):
assert store.get("forum-test")["login_password"] == ""
def test_the_authenticator_secret_is_stored_but_never_returned(client, admin, fake_world):
client.post(
"/admin/communities",
data={"query": "https://forum.test/api/posts", "login_username": "bot", "login_password": "s3cret-pw", "login_totp_secret": "JBSWY3DPEHPK3PXP"},
headers=admin["headers"],
)
row = wait_for(lambda: (found := store.get("forum-test")) and found["status"] == "ready" and found)
assert row["login_totp_secret"] == "JBSWY3DPEHPK3PXP"
assert store.credentials(row)["totp"] == "JBSWY3DPEHPK3PXP"
for url in ("/admin/communities", "/admin/communities/forum-test", "/admin/communities/forum-test/ledger"):
for headers in (admin["headers"], {"X-API-KEY": admin["headers"]["X-API-KEY"]}):
body = client.get(url, headers=headers)
assert "JBSWY3DPEHPK3PXP" not in body.text
as_json = client.get("/admin/communities/forum-test", headers=admin["headers"]).json()
assert as_json["community"]["has_totp"] is True and "login_totp_secret" not in as_json["community"]
client.post("/admin/communities/forum-test/update", data={"interval_seconds": "7200", "login_username": "other"}, headers=admin["headers"])
assert store.get("forum-test")["login_totp_secret"] == "JBSWY3DPEHPK3PXP"
client.post("/admin/communities/forum-test/update", data={"interval_seconds": "7200", "clear_login": "on"}, headers=admin["headers"])
assert store.get("forum-test")["login_totp_secret"] == ""
def test_devii_tools_are_admin_only_and_delete_needs_confirmation():
from devplacepy.services.devii.actions.catalog.community import COMMUNITY_ACTIONS
from devplacepy.services.devii.actions.dispatcher import CONFIRM_REQUIRED