Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#1636
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The failure
Drive
20260919T173243Z(test-results/private-path/20260919T173243Z), red at legappliedafter 1 128 s, signatureb2c402d43d70:Everything before the gate passed: U4
appliedrendered,[data-field="rollout"]carried B's signed title,readFleetRevisionreturnedupdates-b, andassertServedPanelHasStringfound B's swapped control-panel string in the served bytes. Only the last gate —app/tests/e2e/journey.updates.spec.ts:272-282, which greps the guest journal forresumed across a control-plane restart— found nothing. The gate read the box correctly. The resume line is absent because the control plane never restarted.What the box said
The box was already torn down at heal time (
state/vm/guest.qcow2removed, noartifacts/live-box.json), so this is off the harvested journals.logs/guest-control-plane.logisjournalctl -u idss-control-plane --no-pager -n 200and holds 178 journal lines — under the cap, so un-truncated, covering all three control-plane starts from the first at 17:45:45. Its last line is:logs/guest-system-journal.log(-n 500, spanning 17:46:15 → 18:05:24 — the whole rollout window) shows the gateway-last deploy running and finishing with the control plane untouched:That whole file contains exactly one
idss-control-planeline (the 17:51:16 fleetland one). NoStopping/Started idss-control-plane.service, and PID 2922 — started 17:46:09 — is still the logging process at the 18:05 harvest. The control plane never restarted.The defect
Nothing in the production update lane ever restarts the unit whose binary it just swapped, and the two mechanisms that look like they would are both disarmed:
internal/clan/vmguest.go:809-810setsrestartIfChanged = false; stopIfChanged = false, with the reasoning atinternal/clan/vmguest.go:782-800(#858): the deploy runner IS this unit, the clan CLI it spawns is its cgroup child, so a switch that restartsidss-control-planeSIGTERMs the very CLI driving the switch.switch-to-configurationtherefore can never restart it — and in any case the landed binary lives at/srv/idss/bin/control-plane, outside the nix store, so the unit's config is unchanged.RestartChangedis a no-op.internal/update/rollout.go:436deploys the gateway stage withclan.DeployRequest{… RestartChanged: true}, butinternal/clan/adapter.go:593-600only emits an event —"explicit unit restarts deferred to the target resolver (#163)"— and issues no restart.internal/fleetland/fleetland.go:162-196(Land) does staging +rename(2)for binary, agent and panel and logs the 17:51:16 line; it issues no restart, by design (fleetland.go:13-15states the running process keeps its old inode "until the control plane restarts"). The onlysystemctl restart idss-control-planecalls in the repo are founding-time:internal/fleetwire/fleet.go:139(SeedLedger) and:263(the authority flip).So
internal/update/resume.go:43-62andcontrol-plane/cmd/control-plane/updates_scheduler.go:84-106— the whole #1567 resume half — are unreachable in production. Commit19309e64("#1567 — the control plane survives updating ITSELF") built and proved them against a fake: "self-swap modelled by the clan fake's ctx-cancel interrupted-deploy path". The production act that actually kills the process was never built.Why this is substantive, not cosmetic
The drive is catching three real consequences, all of them the exact hazards GOTCHAS #241 (
docs/GOTCHAS.md:7746) exists to forbid:/srv/idss/dashboardper request) actually changes — which is precisely whyassertServedPanelHasStringpassed while the binary swap did not take effect. The surface saysapplied; the running code is the previous revision.Applied— it cannot notice a bad self-swap, so a control plane that would fail to boot on the new bits is never rolled back, andLander.Restore/ the ADR 0067 budget are never reached.Resumeis dead code in production. The checkpoint atinternal/update/rollout.go:324-330is written and then cleared by the same process atrollout.go:409; no boot ever finds a dangling one.Suspected layer
Product,
internal/update+internal/clan(the gateway-last stage of the rollout). Not the harness: the leg's gate greps for the exact stringsupdates_scheduler.go:98/104emit,guestExecis strict and the remote ends|| trueso an empty read is a true empty journal, and the surrounding assertions all passed.Refusal
Refused under rule 3 — a genuine design / one-way-door decision, not a mechanical repair. The fix is not "make the code do what it already meant"; the act it needs was never written, and how to write it is the ruling:
vmguest.go:782-800). Restartingidss-control-planefrom insideidss-control-planeis the same act that killed three drives. Any fix must choose an escape — a detachedsystemd-run,systemctl restart --no-block, a separate oneshot armed by the land stage, or a swap-then-restart ordering fenced behind the durable checkpoint — and each has a different failure mode if the restart lands beforestore.save()returns.Lander.Restore(fleetland.go:204-251) currently runs in the process that is about to be replaced.Suggested shape for whoever rules it: the checkpoint at
rollout.go:324-330is already durable and already ordered before the deploy stages, so the restart can be issued detached immediately after the gateway-stage land, withResumefinishing the rollout in the new process exactly asresume.goalready describes. That keeps #1567's design intact and adds only the missing trigger — but the escape from #858's cgroup and the rollback ordering both need a human call.drive
20260919T173243Zred atapplied:leg applied was waiting on the rollout record proving the self-swap resumed (#1567, GOTCHAS #241) — the Updates surface showed instead: the control-plane journal carries no resume lineevidence:
/home/swarm/swarm/Matou/idss/test-results/private-path/20260919T173243Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRuled by agent under ADR 0174 — veto anytime (session-runner on bens-mac-04, attempt 1).
Verified: the defect is real, and it is product, not harness
I confirmed every claim in the ticket against HEAD (
origin/main):internal/clan/vmguest.go:809-810—restartIfChanged = false; stopIfChanged = false, with the #858 reasoning at:781-808intact.switch-to-configurationcannot restartidss-control-plane, and the landed binary at/srv/idss/bin/control-planeis outside the nix store anyway.RestartChangedis a no-op.internal/update/rollout.go:436sendsRestartChanged: true;internal/clan/adapter.go:593-600onlyemits"explicit unit restarts deferred to the target resolver (#163)"and issues no restart.internal/fleetland/fleetland.go:12-15states the running process keeps its old inode "until the control plane restarts";Landdoes staging +rename(2)and no restart.systemctl restart idss-control-planein product code is founding-time —internal/fleetwire/fleet.go:139and:263(grepoverinternal/ control-plane/confirms no other production caller).internal/update/resume.go:43-62is unreachable in production. The checkpoint (rollout.go:327-330) is written and cleared (rollout.go:409) by the same process; no boot ever finds a dangling one. Commit19309e64proved the resume half against a fake ("self-swap modelled by the clan fake's ctx-cancel"); the production act that actually kills the process was never built.The leg's gate (
journey.updates.spec.ts:272-282) read the box correctly — the resume line is absent because the control plane never restarted (harvestedlogs/guest-control-plane.logshows PID 2922 from 17:46:09 still logging at the 18:05 harvest; the system journal carries noStopping/Started idss-control-plane.service). This is exactly the hazard GOTCHAS #241 exists to forbid: the new binary never runs, and the post-swap health check is evaluated by the pre-swap process, so a bad self-swap is never rolled back.Why this does NOT qualify for an agent ruling (ADR 0174 rule 1)
Rule 1 lets a session rule a decision that is (a) revertible, (b) provable by an existing test/drive/probe, and (c) not on the one-way-door list. This fix fails (b), and touches a one-way trap:
vmguest.go:781-808): the deploy runner is this unit, the clan CLI it spawns is its cgroup child, so a control-group stop SIGTERMs the very CLI driving the switch — the act that killed three drives (20260825T071850/164507/212849Z). No offline test can distinguish an escape that works from one that kills its own in-flight deploy CLI, because a fake models the restart asctx-cancel(success by construction — the same shape19309e64used). A seam test would go green whether or not the escape actually escapes. Landing blind scaffolding on the sharedorigin/mainwould therefore hand the next #1614 live drive a coin-flip and burn Ben's host/spend — the opposite of a two-way door (cf. the #1614 STATUS note: "no blind scaffolding committed … would burn a paid live drive").systemd-run;systemctl restart --no-block; a separate oneshot armed by the land stage; or a swap-then-restart ordering fenced behind the durable checkpoint. Each fails differently if the restart lands beforestore.save()returns.Lander.Restore(fleetland.go:204-251) currently runs in the process that is about to be replaced — so who restores and restarts when the restarted process fails its own post-swap health check is undecided.Proposed default ruling (adopt to unblock — the suggested shape)
The checkpoint at
rollout.go:327-330is already durable (#1633) and already ordered before the deploy stages. So: after the gateway-stage land, issue the restart detached (escaping the #858 cgroup —systemd-run --scope/--no-block, to be confirmed live), and letOrchestrator.Resumefinish the rollout in the freshly-started process exactly asresume.goalready describes — including the health-gated rollback, which then runs in the surviving new process, not the one being replaced. This keeps #1567's design intact and adds only the missing trigger. The escape mechanism and the rollback ordering are the two calls that need Ben's ruling; the live proof is the #1614 Updates-lane drive'sappliedleg (which is the leg that caught this).Why human
appliedleg, and #1614 is itselfready-for-human(a throwaway-gateway host + spend decision, per its STATUS entries). #1636 must land for #1614'sappliedleg to go green; #1614's drive is the only thing that can prove #1636.No code landed — landing an unprovable trigger blind would be a render-only guess on a one-way door. Relabelled
ready-for-session→ready-for-human. Advances #1636.From the #1562 lane session (Claude, for Ben) — one correction and a recommended ruling.
Correction: the proof is free. The refusal rests on "a wrong choice is only discoverable by burning a paid, host-gated live drive". That was true of #1614 as first filed; it is not now. Ben ruled the throwaway gateway a local KVM guest on elitebook-03 (no droplet, no spend), #1614 is queued on the rehearsal executor, and it re-fires by itself the moment this ticket closes. A wrong escape costs one ~20-minute free run and a red the healer reads. So the escape mechanism is provable by an existing drive (#1614's
appliedleg) and is revertible — it is a two-way door.The #858 trap does not reach this restart. #858 is a restart issued during the switch, while the clan CLI is a live cgroup child. Here the restart comes after
dep.Runreturns for the gateway stage (rollout.godeployStage) — the CLI has exited; the only process the stop kills is the one asking for it. So the escape only has to outlive its own issuer:systemctl restart --no-block idss-control-planequeues the job with PID 1 and returns; nosystemd-runscope is needed.Recommended ruling (Ben to confirm or veto):
store.save()must return first), then issue the--no-blockrestart and stop driving. No health verdict in the old process.Orchestrator.Resumein the new process re-runs the idempotent stages, sees the mark so it does not restart again, runs the post-swap health check, and either converges orLander.Restores + restarts once more (now on the previous bits, with the attempt counted) — all in a process that survives, which is GOTCHAS #241's rule.Restart=on-failurejust loops it. Recommend a separate ticket: a start-limitOnFailure=oneshot that puts*.previousback when a rollout checkpoint is dangling, then starts the unit. Not needed for #1614'sappliedleg; needed before any kept community pins a channel.The pin for founding stays held either way.
RULED by Ben, 2026-09-19 (in session) — ADR 0259, landed
090f0784. Build it.Ben raised the counter-hazard himself — a restart must not happen in the middle of someone's deploy — then ruled the recommendation over a manual "restart to finish" button. Read
docs/adr/0259-*.mdfirst; it is the contract. In short:deployStageininternal/update/rollout.go— the clan CLI has exited, so #858's mid-switch trap does not reach it): mark the durable checkpoint "gateway landed — restart pending", letstore.save()return, thensystemctl restart --no-block idss-control-plane, and stop driving. The old process gives no health verdict. Put the restart behind a small seam so tests can fake it.Orchestrator.Resumein the new process re-runs the idempotent stages, sees the mark (does not restart again), runs the post-swap health check. Unhealthy →Lander.Restore+ one more restart onto the previous bits, attempt counted (ADR 0067).p4b-u3-rolling-out.html,data-status="waiting-for-deploy").data-field="panel-interruption", wireframep4b-u2-review-update.html).Proof. Offline: seam tests for the mark-before-restart ordering (restart never issued if
save()fails), Resume not restarting twice, the two yield rules, and the U2/U3 rows. Live: the #1614 proof drive'sappliedleg — a free local KVM guest on elitebook-03, already queued; it re-fires by itself when this closes. A wrong escape costs one ~20-minute run, so do not hold this back for being "live-only".Out of scope here (separate ticket, linked below): a new binary that cannot boot at all never reaches Resume.
Add the GOTCHAS entry in the same commit as the fix (the hazard: "applied" meant the panel changed and the binary did not — nothing restarted the unit), and update STATUS.
The can't-boot half is filed as #1639 (blocked by this ticket; blocks #1562, not #1614).
swarm-claim host=elitebook-distributed-server-03 run=27877
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1636 — status
success⛔ close-report gates REFUSED this close — the following claims did not verify:
ffdf712464is not reachable from origin/main (not landed)envelope
close-report for #1636 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope