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
+10 -1
View File
@@ -37,6 +37,12 @@ const (
MaxDonorMBPerDay = 20 * 1024
StableSessionSeconds = 30
FastRetryMillis = 1500
SuspendedReason = "suspended"
SuspendedMinSeconds = 60
SuspendedMaxSeconds = 24 * 60 * 60
SuspendedDefaultSeconds = 300
SuspendedJitterSeconds = 30
)
const (
@@ -48,6 +54,7 @@ const (
RefuseBandwidth = "bandwidth_exhausted"
RefuseConcurrency = "concurrency_exceeded"
RefuseHours = "outside_hours"
RefuseBattery = "on_battery"
RefuseTimeout = "timeout"
RefuseBadURL = "bad_url"
FailFetch = "fetch_failed"
@@ -71,7 +78,6 @@ const (
var FatalReasons = map[string]bool{
"revoked": true,
"suspended": true,
"kill_switch": true,
"no_consent": true,
"no_account": true,
@@ -117,6 +123,7 @@ type ServerSettings struct {
ActiveFrom string `json:"active_from"`
ActiveTo string `json:"active_to"`
Timezone string `json:"timezone"`
PauseOnBattery bool `json:"pause_on_battery"`
}
type Frame struct {
@@ -131,6 +138,8 @@ type Frame struct {
Port int `json:"port"`
B64 string `json:"b64"`
Reason string `json:"reason"`
Until string `json:"until"`
DeviceLabel string `json:"device_label"`
DeviceUID string `json:"device_uid"`
Limits *ServerLimits `json:"limits"`
Destinations []Destination `json:"destinations"`