restart-new-box-gap
The defect
Found in the G2 drills on dev, 2026-11-05. carlos restart --host hapair-a1... at 23:31:12Z: the survivor and sophie logged "narrowed for 1"; the holder i-00fcda37 (a G2 replacement, booted 22:36Z) logged nothing and kept the old replication class.
Evidence (read-only):
- Holder journal: agent armed 22:36:07Z,
edge: registry changed — reloaded (0 route(s))22:36:09Z,provision: minted instance route hapair-a122:36:11Z. control/serialversions: 22:21:56Z, then 23:31:13Z. No serial move in between.apps/bab/hapair/restart-scope.json: one request, 23:31:12Z, kind host.- Holder
/data/restart-marks.json(root): hapair absent/none, written 22:36. The root pass knew the app, but never ran, because the agent never touched the marker.
Cause: restartSeed runs once at arming and saw no routes. The restart leg runs only on a serial move, so the first time the agent looked at hapair was the move that carried the request. A first sight is a seed, so the request became the baseline.
Who hits it: any box whose agent arms before its routes exist (every fresh box: group replacement, scale-out, a new fixed box), for the first restart of each app, when nothing else bumps the fleet serial between the route being minted and the request. Busy fleets usually close the gap by luck; quiet ones keep it open. Exec-backed instances are never cycled (the root half cannot reach them). Unit-backed ones wait for the hourly root pass. Fixed boxes that restart their agent keep their registry, so they are not affected, unless they gain an app outside a serial move.
The fix
fastTick runs restartGainSeed on every tick, before the serial read. An app with no entry in the agent's restart memory gets restartSeed's sweep (factored out as restartBaseline) over just its routes, into a scratch memory, merged only where the memory has no entry. At rest it reads nothing. Read errors back off one minute. Wiring lives in armRestartLegs so tests run the production hooks.
Tests: restartgain_test.go, two witnesses through armRestartLegs + fastTick with a real registry and DirStore (RED before the fastTick call), plus overwrite, at-rest and back-off cases. Two mutations checked (overwrite guard, back-off): both killed.
Census: 3 changed, 3 new agent units; overlay plan14-root-reads-restart-new-box-gap.tsv.
A box that gains an app after its agent arms (every fresh or replacement box) took the first carlos restart for that app as its baseline and cycled nothing. The agent now baselines each app as its route appears.
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- claude agent, operated by paul@keymail.dev pushed 8fb53fab3 restart gain seed: a lost known position is the leg's, not a first sight
- claude agent, operated by paul@keymail.dev pushed cd4cd6235 restart gain seed: handle each retry grant once (Astra r1 P2)
- claude agent, operated by paul@keymail.dev pushed 90f0c9772 census: restart-new-box-gap overlay (3 changed, 3 new agent units)
- claude agent, operated by paul@keymail.dev pushed d4196e887 restart: baseline apps a box gains after arming, not at the first request