carlos / platform Public

census: restart-new-box-gap overlay (3 changed, 3 new agent units)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 90f0c9772f789c6bdb69f61b49f3267787373caf parent d4196e8
3 files changed, +44 −0
  • docs/superpowers/notes/census-proposal-restart-new-box-gap.md +29 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-restart-new-box-gap.tsv +14 −0

CI passed — run details

diff --git a/docs/superpowers/notes/census-proposal-restart-new-box-gap.md b/docs/superpowers/notes/census-proposal-restart-new-box-gap.md
new file mode 100644
index 000000000..a326fbe49
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-restart-new-box-gap.md
@@ -0,0 +1,29 @@
+# Census approval: restart-new-box-gap
+
+Ruling `census-ruling-restart-new-box-gap`. The independent reviewer approves or rejects every change below, 3 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/host/agent.go` `fastTick` | body | unchanged (1) | calls the optional restartGain hook (restartGainSeed) once per existing tick before the serial read; no new root path, timer or read kind; nil hook is unchanged |
+| `internal/host/agent.go` `fastConvergeLoop` | sites | -whole:Route | restart leg closure moved into armRestartLegs (same reg.List + restartRequestLeg); also wires restartGain; read moved, not added |
+| `internal/host/restart.go` `restartSeed` | sites | -whole:Route ×4 | body split: list routes then restartBaseline (the former body, unchanged); the route reads move with it |
+
+Envelopes re-pinned: `internal/host`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/host/agent.go` `fastTick`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=observes the change index before any pass (observeIndex), runs the backstop's requested full pass and a scoped pass for moved app scopes (indexTick), and arms the canary pointer gate on the sweep (canaryPointerGate) only on a tick whose own index observation succeeded; read site unchanged, offset moved;rev3=census-ruling-stateless-replicas-1;basis=Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. Final review I3: signal the owned renewal worker instead of waiting for its sequential console HTTP calls. Existing convergence and record read unchanged.;rev3=census-ruling-region-ha-p3a;basis=Run the optional desired-role reader on the existing tick after observing the armed change index; no new root path or timer, nil reader is unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. merge of origin/main 7920cccf: Retain main box-role reader pass on the existing tick alongside the replica worker signal; merge-only body change, unchanged read sites.
+- `internal/host/agent.go` `fastConvergeLoop`: authority, task B3. Basis: rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): every pass context carries the box's lifetime judge (provision.WithLifetimes) and the reconcile config is boxProvisionConfig's; read sites unchanged, offsets moved; B3 authority retained;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 12: its pass config is now BoxProvisionConfig(reg, os.Getenv, judge, configure) (BoxProvisionConfig replaces boxProvisionConfig: the hub predicate hubArmed and, on the hub, ReconcileConfig.FleetOwners from hubFleetOwners); a call, no read site; read sites unchanged (2); B3 authority retained.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: wire the coordinator's nonblocking SignalTick to the existing fast tick. No new timer, polling read or authority.;rev3=census-ruling-region-ha-p3b;basis=Bind systemLeg to the existing cached reader fold and handle a nil leg on groups; names-2 rollback gate runs before artifact/request/marker work. Agent-memory evidence only, no new direct or cloud read and no autonomous group update.
+- `internal/host/restart.go` `restartSeed`: authority, task E1,E3,J1,J4. Basis: fix1-merge-review;basis=Baselines both request logs without applying historical ordinary restarts; signed retry grants remain independently verified.
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/host/restart.go:armRestartLegs`: reads +whole:Route ×2; written legacy, accepted-legacy, frozen
+- new `internal/host/restart.go:restartBaseline`: reads +whole:Route ×5; written legacy, accepted-legacy, frozen
+- new `internal/host/restart.go:restartGainSeed`: reads +registry:App, +whole:Route ×7; written legacy, accepted-legacy, frozen
+
+Seal: `c55b4a022b3d42f40a05b727f93e57dc9f76b6dc2251f7d3b777c34d7ffdee09` → `f7a78f567175fe0b6eed79095d3709c1c8ba0e85d66581af59c5ef2d755e7eac`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-restart-new-box-gap.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 578b1aef3..45811b84c 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -103,3 +103,4 @@ plan14-root-reads-agent-start-demo-analytics-fix.tsv 89841c50d08090185e24cb03c6b
plan14-root-reads-agent-start-demo-log-skip.tsv ed24b69243622fc702159e0b22c732f4f8297438b87f10c499887cd1a13f6fce
plan14-root-reads-demo-api-site-route.tsv 9bfd77d30d8e3deb5f3863cb6c272c2cb46ce32aa1370acbaa6e9181b71101b4
plan14-root-reads-region-ha-p3b2-rolls.tsv c55b4a022b3d42f40a05b727f93e57dc9f76b6dc2251f7d3b777c34d7ffdee09
+plan14-root-reads-restart-new-box-gap.tsv f7a78f567175fe0b6eed79095d3709c1c8ba0e85d66581af59c5ef2d755e7eac
diff --git a/internal/provision/testdata/plan14-root-reads-restart-new-box-gap.tsv b/internal/provision/testdata/plan14-root-reads-restart-new-box-gap.tsv
new file mode 100644
index 000000000..433604c92
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-restart-new-box-gap.tsv
@@ -0,0 +1,14 @@
+# Census overlay restart-new-box-gap, written by census-propose (#369). census-ruling-restart-new-box-gap, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-restart-new-box-gap.md.
+# 1 body, 2 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 3 new dispositions: 0 reads re-frozen at their disposition with the claim, 3 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy f9901119aae0b7e5bc177c1075a6561e3fc15c272ce24c1156eda08bc471c8fd internal/host/agent.go fastTick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=observes the change index before any pass (observeIndex), runs the backstop's requested full pass and a scoped pass for moved app scopes (indexTick), and arms the canary pointer gate on the sweep (canaryPointerGate) only on a tick whose own index observation succeeded; read site unchanged, offset moved;rev3=census-ruling-stateless-replicas-1;basis=Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. Final review I3: signal the owned renewal worker instead of waiting for its sequential console HTTP calls. Existing convergence and record read unchanged.;rev3=census-ruling-region-ha-p3a;basis=Run the optional desired-role reader on the existing tick after observing the armed change index; no new root path or timer, nil reader is unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. merge of origin/main 7920cccf: Retain main box-role reader pass on the existing tick alongside the replica worker signal; merge-only body change, unchanged read sites.;rev3=census-ruling-restart-new-box-gap;basis=calls the optional restartGain hook (restartGainSeed) once per existing tick before the serial read; no new root path, timer or read kind; nil hook is unchanged registry:Host@5265 139e8bee2561c0c4f5c5ff41594c87337f06904c9dc061ed647ffe506ae7f744
+@legacy 88f3281650a151b50649d98a03ff403d00e6b85168782683b8f5974b730988d8 internal/host/restart.go armRestartLegs legacy accepted-legacy accepted-legacy;rev3=census-ruling-restart-new-box-gap;basis=agent-side closures over reg.List for the gain seed and the existing restart leg; same reads the old fastConvergeLoop closure made whole:Route@448,whole:Route@766 1a6e4782f8769840153ed55f2851bde005cdcdaa17a4666b57e82269a29d12a9
+@legacy 01318bb14200b8e137212e4aaf567e5be7bfaa694975d81ba53ea339098d31f1 internal/host/restart.go restartBaseline legacy accepted-legacy accepted-legacy;rev3=census-ruling-restart-new-box-gap;basis=the former restartSeed body verbatim over a given route set (both logs, retry grants, seedRestartMarks/marker) whole:Route@1161,whole:Route@157,whole:Route@495,whole:Route@605,whole:Route@899 029f056bd1429151fdebee4b5ed677f1f7e0172b9494769c51308cda24e615ba
+@legacy a5645f257a6888daf73bf4d512dd3d89f23345176765c1bc2c064c8be9388160 internal/host/restart.go restartGainSeed legacy accepted-legacy accepted-legacy;rev3=census-ruling-restart-new-box-gap;basis=baselines apps gained since arming into a scratch memory via restartBaseline over those apps routes; merges only missing entries; throttles read errors; agent process, no root read registry:App@520,whole:Route@212,whole:Route@463,whole:Route@515,whole:Route@534,whole:Route@547,whole:Route@552,whole:Route@673 fed1606b4f6b75a38bd681699da616d3bf119aa3ed7a9f70f30e2a47bc560130
+internal/host/agent.go fastTick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=observes the change index before any pass (observeIndex), runs the backstop's requested full pass and a scoped pass for moved app scopes (indexTick), and arms the canary pointer gate on the sweep (canaryPointerGate) only on a tick whose own index observation succeeded; read site unchanged, offset moved;rev3=census-ruling-stateless-replicas-1;basis=Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. Final review I3: signal the owned renewal worker instead of waiting for its sequential console HTTP calls. Existing convergence and record read unchanged.;rev3=census-ruling-region-ha-p3a;basis=Run the optional desired-role reader on the existing tick after observing the armed change index; no new root path or timer, nil reader is unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. merge of origin/main 7920cccf: Retain main box-role reader pass on the existing tick alongside the replica worker signal; merge-only body change, unchanged read sites.;rev3=census-ruling-restart-new-box-gap;basis=calls the optional restartGain hook (restartGainSeed) once per existing tick before the serial read; no new root path, timer or read kind; nil hook is unchanged registry:Host@5265 139e8bee2561c0c4f5c5ff41594c87337f06904c9dc061ed647ffe506ae7f744
+internal/host/restart.go armRestartLegs legacy accepted-legacy accepted-legacy;rev3=census-ruling-restart-new-box-gap;basis=agent-side closures over reg.List for the gain seed and the existing restart leg; same reads the old fastConvergeLoop closure made whole:Route@448,whole:Route@766 1a6e4782f8769840153ed55f2851bde005cdcdaa17a4666b57e82269a29d12a9
+internal/host/restart.go restartBaseline legacy accepted-legacy accepted-legacy;rev3=census-ruling-restart-new-box-gap;basis=the former restartSeed body verbatim over a given route set (both logs, retry grants, seedRestartMarks/marker) whole:Route@1161,whole:Route@157,whole:Route@495,whole:Route@605,whole:Route@899 029f056bd1429151fdebee4b5ed677f1f7e0172b9494769c51308cda24e615ba
+internal/host/restart.go restartGainSeed legacy accepted-legacy accepted-legacy;rev3=census-ruling-restart-new-box-gap;basis=baselines apps gained since arming into a scratch memory via restartBaseline over those apps routes; merges only missing entries; throttles read errors; agent process, no root read registry:App@520,whole:Route@212,whole:Route@463,whole:Route@515,whole:Route@534,whole:Route@547,whole:Route@552,whole:Route@673 fed1606b4f6b75a38bd681699da616d3bf119aa3ed7a9f70f30e2a47bc560130
+internal/host/agent.go fastConvergeLoop authority B3 rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): every pass context carries the box's lifetime judge (provision.WithLifetimes) and the reconcile config is boxProvisionConfig's; read sites unchanged, offsets moved; B3 authority retained;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 12: its pass config is now BoxProvisionConfig(reg, os.Getenv, judge, configure) (BoxProvisionConfig replaces boxProvisionConfig: the hub predicate hubArmed and, on the hub, ReconcileConfig.FleetOwners from hubFleetOwners); a call, no read site; read sites unchanged (2); B3 authority retained.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: wire the coordinator's nonblocking SignalTick to the existing fast tick. No new timer, polling read or authority.;rev3=census-ruling-region-ha-p3b;basis=Bind systemLeg to the existing cached reader fold and handle a nil leg on groups; names-2 rollback gate runs before artifact/request/marker work. Agent-memory evidence only, no new direct or cloud read and no autonomous group update.;rev3=census-ruling-restart-new-box-gap;basis=restart leg closure moved into armRestartLegs (same reg.List + restartRequestLeg); also wires restartGain; read moved, not added whole:Route@8609 d10becd47ccedd2d01c6fdb3933882872932e6592410d7c318dbc1390685eb4c
+internal/host/restart.go restartSeed authority E1,E3,J1,J4 fix1-merge-review;basis=Baselines both request logs without applying historical ordinary restarts; signed retry grants remain independently verified.;rev3=census-ruling-restart-new-box-gap;basis=body split: list routes then restartBaseline (the former body, unchanged); the route reads move with it whole:Route@298 b89f5767a539a57160f27d58f80ae2904c5993eeb1177563ed80aec63da632e1
+@coverage internal/host bbfbbcc906ff3ac7a6d418f5f2c49272c3f385a162f9dbbb61bb270ffe5d57ba