applied — the gateway-last self-swap never restarts idss-control-plane, so the landed binary never runs and Resume (#1567, GOTCHAS #241) can never fire #1636

Closed
opened 2026-09-19 18:10:29 +00:00 by matou-build-agent · 7 comments

The failure

Drive 20260919T173243Z (test-results/private-path/20260919T173243Z), red at leg applied after 1 128 s, signature b2c402d43d70:

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 line

Everything before the gate passed: U4 applied rendered, [data-field="rollout"] carried B's signed title, readFleetRevision returned updates-b, and assertServedPanelHasString found 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 for resumed 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.qcow2 removed, no artifacts/live-box.json), so this is off the harvested journals. logs/guest-control-plane.log is journalctl -u idss-control-plane --no-pager -n 200 and 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:

Sep 19 17:46:09 idss-guest idss-control-plane-start[2922]: msg="update scheduler started" component=control-plane interval=5m0s
Sep 19 17:46:09 idss-guest idss-control-plane-start[2922]: msg="control-plane serving the OpenAPI API" … composition_whole=true
Sep 19 17:51:16 idss-guest idss-control-plane-start[2922]: msg="fleetland: landed the fleet software on the gateway (staging + atomic rename, previous copies retained)" component=control-plane node=gateway

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:

Sep 19 17:53:53 idss-guest systemd[1]: Starting [systemd-run] …/bin/switch-to-configuration boot...
Sep 19 17:53:55 idss-guest nixos[5481]: switching to system configuration /nix/store/bmgcx17ymqyvnz0pxbbgb9qxyvjf2bcb-nixos-system-gateway-…
Sep 19 17:53:57 idss-guest nixos[5481]: finished switching to system configuration /nix/store/bmgcx17ymqyvnz0pxbbgb9qxyvjf2bcb-nixos-system-gateway-…
Sep 19 17:53:57 idss-guest systemd[1]: clan-switch-gateway-2f1777d9.service: Deactivated successfully.

That whole file contains exactly one idss-control-plane line (the 17:51:16 fleetland one). No Stopping/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:

  1. The unit is deliberately held off the NixOS switch. internal/clan/vmguest.go:809-810 sets restartIfChanged = false; stopIfChanged = false, with the reasoning at internal/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 restarts idss-control-plane SIGTERMs the very CLI driving the switch. switch-to-configuration therefore 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.
  2. RestartChanged is a no-op. internal/update/rollout.go:436 deploys the gateway stage with clan.DeployRequest{… RestartChanged: true}, but internal/clan/adapter.go:593-600 only emits an event — "explicit unit restarts deferred to the target resolver (#163)" — and issues no restart.
  3. The lander only swaps bytes. 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-15 states the running process keeps its old inode "until the control plane restarts"). The only systemctl restart idss-control-plane calls in the repo are founding-time: internal/fleetwire/fleet.go:139 (SeedLedger) and :263 (the authority flip).

So internal/update/resume.go:43-62 and control-plane/cmd/control-plane/updates_scheduler.go:84-106 — the whole #1567 resume half — are unreachable in production. Commit 19309e64 ("#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:

  • The new control-plane binary never runs. Every "applied" release leaves the community on the OLD control-plane code until the box reboots. Only the static control panel (served from /srv/idss/dashboard per request) actually changes — which is precisely why assertServedPanelHasString passed while the binary swap did not take effect. The surface says applied; the running code is the previous revision.
  • The post-swap health check is evaluated by the pre-swap process. GOTCHAS #241's rule: "the post-swap health check must be evaluated by something that survives the swap". Today the old process health-checks the fleet and declares 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, and Lander.Restore / the ADR 0067 budget are never reached.
  • Resume is dead code in production. The checkpoint at internal/update/rollout.go:324-330 is written and then cleared by the same process at rollout.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 strings updates_scheduler.go:98/104 emit, guestExec is strict and the remote ends || true so 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:

  • It changes what a deploy does and what the community sees at a trust moment: the community's one door bounces mid-rollout, during a window the operator opened.
  • It collides head-on with the deliberately-encoded #858 trap (vmguest.go:782-800). Restarting idss-control-plane from inside idss-control-plane is the same act that killed three drives. Any fix must choose an escape — a detached 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 — and each has a different failure mode if the restart lands before store.save() returns.
  • It needs a matching decision on the rollback side: who restores and restarts when the restarted process fails its own post-swap health check, given Lander.Restore (fleetland.go:204-251) currently runs in the process that is about to be replaced.
  • I cannot prove it here. No offline test can show that a self-restart does not kill its own in-flight deploy CLI; only a live drive can. That alone disqualifies the fast lane.

Suggested shape for whoever rules it: the checkpoint at rollout.go:324-330 is already durable and already ordered before the deploy stages, so the restart can be issued detached immediately after the gateway-stage land, with Resume finishing the rollout in the new process exactly as resume.go already 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 20260919T173243Z red at applied: 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 line
evidence: /home/swarm/swarm/Matou/idss/test-results/private-path/20260919T173243Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure Drive `20260919T173243Z` (`test-results/private-path/20260919T173243Z`), red at leg `applied` after 1 128 s, signature `b2c402d43d70`: > 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 line Everything before the gate passed: U4 `applied` rendered, `[data-field="rollout"]` carried B's signed title, `readFleetRevision` returned `updates-b`, and `assertServedPanelHasString` found 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 for `resumed 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.qcow2` removed, no `artifacts/live-box.json`), so this is off the harvested journals. `logs/guest-control-plane.log` is `journalctl -u idss-control-plane --no-pager -n 200` and 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: ``` Sep 19 17:46:09 idss-guest idss-control-plane-start[2922]: msg="update scheduler started" component=control-plane interval=5m0s Sep 19 17:46:09 idss-guest idss-control-plane-start[2922]: msg="control-plane serving the OpenAPI API" … composition_whole=true Sep 19 17:51:16 idss-guest idss-control-plane-start[2922]: msg="fleetland: landed the fleet software on the gateway (staging + atomic rename, previous copies retained)" component=control-plane node=gateway ``` `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: ``` Sep 19 17:53:53 idss-guest systemd[1]: Starting [systemd-run] …/bin/switch-to-configuration boot... Sep 19 17:53:55 idss-guest nixos[5481]: switching to system configuration /nix/store/bmgcx17ymqyvnz0pxbbgb9qxyvjf2bcb-nixos-system-gateway-… Sep 19 17:53:57 idss-guest nixos[5481]: finished switching to system configuration /nix/store/bmgcx17ymqyvnz0pxbbgb9qxyvjf2bcb-nixos-system-gateway-… Sep 19 17:53:57 idss-guest systemd[1]: clan-switch-gateway-2f1777d9.service: Deactivated successfully. ``` That whole file contains **exactly one** `idss-control-plane` line (the 17:51:16 fleetland one). No `Stopping`/`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: 1. **The unit is deliberately held off the NixOS switch.** `internal/clan/vmguest.go:809-810` sets `restartIfChanged = false; stopIfChanged = false`, with the reasoning at `internal/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 restarts `idss-control-plane` SIGTERMs the very CLI driving the switch. `switch-to-configuration` therefore 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. 2. **`RestartChanged` is a no-op.** `internal/update/rollout.go:436` deploys the gateway stage with `clan.DeployRequest{… RestartChanged: true}`, but `internal/clan/adapter.go:593-600` only emits an event — `"explicit unit restarts deferred to the target resolver (#163)"` — and issues no restart. 3. **The lander only swaps bytes.** `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-15` states the running process keeps its old inode "until the control plane restarts"). The only `systemctl restart idss-control-plane` calls in the repo are founding-time: `internal/fleetwire/fleet.go:139` (SeedLedger) and `:263` (the authority flip). So `internal/update/resume.go:43-62` and `control-plane/cmd/control-plane/updates_scheduler.go:84-106` — the whole #1567 resume half — are unreachable in production. Commit `19309e64` ("#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: - **The new control-plane binary never runs.** Every "applied" release leaves the community on the OLD control-plane code until the box reboots. Only the static control panel (served from `/srv/idss/dashboard` per request) actually changes — which is precisely why `assertServedPanelHasString` passed while the binary swap did not take effect. The surface says `applied`; the running code is the previous revision. - **The post-swap health check is evaluated by the pre-swap process.** GOTCHAS #241's rule: "the post-swap health check must be evaluated by something that survives the swap". Today the old process health-checks the fleet and declares `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, and `Lander.Restore` / the ADR 0067 budget are never reached. - **`Resume` is dead code in production.** The checkpoint at `internal/update/rollout.go:324-330` is written and then cleared by the same process at `rollout.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 strings `updates_scheduler.go:98/104` emit, `guestExec` is strict and the remote ends `|| true` so 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: - It changes **what a deploy does** and what the community sees at a trust moment: the community's one door bounces mid-rollout, during a window the operator opened. - It collides head-on with the deliberately-encoded #858 trap (`vmguest.go:782-800`). Restarting `idss-control-plane` from inside `idss-control-plane` is the same act that killed three drives. Any fix must choose an escape — a detached `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 — and each has a different failure mode if the restart lands before `store.save()` returns. - It needs a matching decision on the **rollback** side: who restores and restarts when the restarted process fails its own post-swap health check, given `Lander.Restore` (`fleetland.go:204-251`) currently runs in the process that is about to be replaced. - **I cannot prove it here.** No offline test can show that a self-restart does not kill its own in-flight deploy CLI; only a live drive can. That alone disqualifies the fast lane. Suggested shape for whoever rules it: the checkpoint at `rollout.go:324-330` is already durable and already ordered *before* the deploy stages, so the restart can be issued detached immediately after the gateway-stage land, with `Resume` finishing the rollout in the new process exactly as `resume.go` already 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 `20260919T173243Z` red at `applied`: `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 line` evidence: `/home/swarm/swarm/Matou/idss/test-results/private-path/20260919T173243Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: b2c402d43d70 -->
Author
Member

Ruled 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):

  • The unit is held off the switch. internal/clan/vmguest.go:809-810 — restartIfChanged = false; stopIfChanged = false, with the #858 reasoning at :781-808 intact. switch-to-configuration cannot restart idss-control-plane, and the landed binary at /srv/idss/bin/control-plane is outside the nix store anyway.
  • RestartChanged is a no-op. internal/update/rollout.go:436 sends RestartChanged: true; internal/clan/adapter.go:593-600 only emits "explicit unit restarts deferred to the target resolver (#163)" and issues no restart.
  • The lander only swaps bytes. internal/fleetland/fleetland.go:12-15 states the running process keeps its old inode "until the control plane restarts"; Land does staging + rename(2) and no restart.
  • The only systemctl restart idss-control-plane in product code is founding-time — internal/fleetwire/fleet.go:139 and :263 (grep over internal/ control-plane/ confirms no other production caller).
  • So internal/update/resume.go:43-62 is 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. Commit 19309e64 proved 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 (harvested logs/guest-control-plane.log shows PID 2922 from 17:46:09 still logging at the 18:05 harvest; the system journal carries no Stopping/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:

  1. It is not offline-provable — and a seam-green here would be a false assurance about the one thing that matters. The crux is whether the restart escapes the #858 cgroup (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 as ctx-cancel (success by construction — the same shape 19309e64 used). A seam test would go green whether or not the escape actually escapes. Landing blind scaffolding on the shared origin/main would 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").
  2. It needs a genuine design choice with distinct failure modes. The escape must be one of: a detached 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 before store.save() returns.
  3. It needs a matching rollback-side decision. 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-330 is 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 let Orchestrator.Resume finish the rollout in the freshly-started process exactly as resume.go already 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's applied leg (which is the leg that caught this).

Why human

  • A one-way-door design ruling (ADR 0174 rule 4): which #858-cgroup escape, and the rollback ordering — a wrong choice is only discoverable by burning a paid, host-gated live drive, so it fails the provability bar and cannot be self-ruled. Proposed default above.
  • Live-only proof, host/spend-gated: the fix's only proof is the #1614 proof drive's applied leg, and #1614 is itself ready-for-human (a throwaway-gateway host + spend decision, per its STATUS entries). #1636 must land for #1614's applied leg 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.

**Ruled 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`): - **The unit is held off the switch.** `internal/clan/vmguest.go:809-810` — `restartIfChanged = false; stopIfChanged = false`, with the #858 reasoning at `:781-808` intact. `switch-to-configuration` cannot restart `idss-control-plane`, and the landed binary at `/srv/idss/bin/control-plane` is outside the nix store anyway. - **`RestartChanged` is a no-op.** `internal/update/rollout.go:436` sends `RestartChanged: true`; `internal/clan/adapter.go:593-600` only `emit`s `"explicit unit restarts deferred to the target resolver (#163)"` and issues no restart. - **The lander only swaps bytes.** `internal/fleetland/fleetland.go:12-15` states the running process keeps its old inode "until the control plane restarts"; `Land` does staging + `rename(2)` and no restart. - **The only `systemctl restart idss-control-plane` in product code is founding-time** — `internal/fleetwire/fleet.go:139` and `:263` (`grep` over `internal/ control-plane/` confirms no other production caller). - **So `internal/update/resume.go:43-62` is 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. Commit `19309e64` proved 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 (harvested `logs/guest-control-plane.log` shows PID 2922 from 17:46:09 still logging at the 18:05 harvest; the system journal carries no `Stopping`/`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: 1. **It is not offline-provable — and a seam-green here would be a false assurance about the one thing that matters.** The crux is whether the restart escapes the #858 cgroup (`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 as `ctx-cancel` (success by construction — the same shape `19309e64` used). A seam test would go green whether or not the escape actually escapes. Landing blind scaffolding on the shared `origin/main` would 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"). 2. **It needs a genuine design choice with distinct failure modes.** The escape must be one of: a detached `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 before `store.save()` returns. 3. **It needs a matching rollback-side decision.** `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-330` is 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 let `Orchestrator.Resume` finish the rollout in the freshly-started process exactly as `resume.go` already 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's `applied` leg (which is the leg that caught this). ## Why human - **A one-way-door design ruling (ADR 0174 rule 4):** which #858-cgroup escape, and the rollback ordering — a wrong choice is only discoverable by burning a paid, host-gated live drive, so it fails the provability bar and cannot be self-ruled. Proposed default above. - **Live-only proof, host/spend-gated:** the fix's only proof is the #1614 proof drive's `applied` leg, and #1614 is itself `ready-for-human` (a throwaway-gateway host + spend decision, per its STATUS entries). #1636 must land for #1614's `applied` leg 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.
Owner

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 applied leg) 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.Run returns for the gateway stage (rollout.go deployStage) — 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-plane queues the job with PID 1 and returns; no systemd-run scope is needed.

Recommended ruling (Ben to confirm or veto):

  1. After the gateway stage's deploy run returns, persist a "gateway landed — restart pending" mark on the existing durable checkpoint (store.save() must return first), then issue the --no-block restart and stop driving. No health verdict in the old process.
  2. Orchestrator.Resume in 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 or Lander.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.
  3. The one genuinely open call: a new binary that cannot boot at all never reaches Resume — Restart=on-failure just loops it. Recommend a separate ticket: a start-limit OnFailure= oneshot that puts *.previous back when a rollout checkpoint is dangling, then starts the unit. Not needed for #1614's applied leg; needed before any kept community pins a channel.

The pin for founding stays held either way.

**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 `applied` leg) 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.Run` returns for the gateway stage (`rollout.go` `deployStage`) — 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-plane` queues the job with PID 1 and returns; no `systemd-run` scope is needed. **Recommended ruling (Ben to confirm or veto):** 1. After the gateway stage's deploy run returns, persist a "gateway landed — restart pending" mark on the existing durable checkpoint (`store.save()` must return first), then issue the `--no-block` restart and stop driving. No health verdict in the old process. 2. `Orchestrator.Resume` in 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 or `Lander.Restore`s + restarts once more (now on the previous bits, with the attempt counted) — all in a process that survives, which is GOTCHAS #241's rule. 3. **The one genuinely open call:** a new binary that cannot boot at all never reaches Resume — `Restart=on-failure` just loops it. Recommend a *separate* ticket: a start-limit `OnFailure=` oneshot that puts `*.previous` back when a rollout checkpoint is dangling, then starts the unit. Not needed for #1614's `applied` leg; needed before any kept community pins a channel. The pin for founding stays held either way.
Owner

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-*.md first; it is the contract. In short:

  1. The restart. After the gateway stage's deploy run has returned (deployStage in internal/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", let store.save() return, then systemctl 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.
  2. The finish. Orchestrator.Resume in 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).
  3. Updates yield to work. A rollout does not start while any deploy run is in flight; the restart step re-checks before firing; it waits and retries, and U3's gateway row says what it is waiting for (wireframe p4b-u3-rolling-out.html, data-status="waiting-for-deploy").
  4. Work yields to an update. While a rollout is in flight, starting a new deploy is refused: "An update is being applied — try again in a few minutes."
  5. U2 carries the consent line (data-field="panel-interruption", wireframe p4b-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's applied leg — 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.

## 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-*.md` first; it is the contract. In short: 1. **The restart.** After the gateway stage's deploy run has **returned** (`deployStage` in `internal/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", let `store.save()` return, then `systemctl 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. 2. **The finish.** `Orchestrator.Resume` in 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). 3. **Updates yield to work.** A rollout does not start while any deploy run is in flight; the restart step re-checks before firing; it waits and retries, and U3's gateway row says what it is waiting for (wireframe `p4b-u3-rolling-out.html`, `data-status="waiting-for-deploy"`). 4. **Work yields to an update.** While a rollout is in flight, starting a new deploy is refused: *"An update is being applied — try again in a few minutes."* 5. **U2 carries the consent line** (`data-field="panel-interruption"`, wireframe `p4b-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's `applied` leg — 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.
Owner

The can't-boot half is filed as #1639 (blocked by this ticket; blocks #1562, not #1614).

The can't-boot half is filed as #1639 (blocked by this ticket; blocks #1562, not #1614).
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=27877
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=27877 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1636 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit ffdf712464 is not reachable from origin/main (not landed)
  • changed_files: 'control-plane/cmd/control-plane/control_plane_restarter.go' is not in the diff of the claimed commits
  • changed_files: 'control-plane/cmd/control-plane/main.go' is not in the diff of the claimed commits
  • changed_files: 'control-plane/cmd/control-plane/whole_composition.go' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/components/provisioning/ReviewUpdateScreen.vue' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/components/provisioning/RollingOutScreen.vue' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/lib/rollout.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/tests/unit/rollout.test.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/tests/unit/updateReview.test.ts' is not in the diff of the claimed commits
  • changed_files: 'docs/GOTCHAS.md' is not in the diff of the claimed commits
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/deployrunstore.go' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/provision.go' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/provision_integration_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/update/restart.go' is not in the diff of the claimed commits
  • changed_files: 'internal/update/restart_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/update/rollout.go' is not in the diff of the claimed commits
  • changed_files: 'internal/update/rollout_land_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/update/rollout_refusal_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/update/rolloutview.go' is not in the diff of the claimed commits
  • changed_files: 'internal/update/store.go' is not in the diff of the claimed commits
  • changed_files: 'internal/update/update.go' is not in the diff of the claimed commits
envelope
{
  "issue": 1636,
  "status": "success",
  "commits": [
    "ffdf71246402e4974982c94e4ad3c68362535c13"
  ],
  "changed_files": [
    "control-plane/cmd/control-plane/control_plane_restarter.go",
    "control-plane/cmd/control-plane/main.go",
    "control-plane/cmd/control-plane/whole_composition.go",
    "dashboard/src/components/provisioning/ReviewUpdateScreen.vue",
    "dashboard/src/components/provisioning/RollingOutScreen.vue",
    "dashboard/src/lib/rollout.ts",
    "dashboard/tests/unit/rollout.test.ts",
    "dashboard/tests/unit/updateReview.test.ts",
    "docs/GOTCHAS.md",
    "STATUS.md",
    "internal/controlapi/deployrunstore.go",
    "internal/controlapi/provision.go",
    "internal/controlapi/provision_integration_test.go",
    "internal/update/restart.go",
    "internal/update/restart_test.go",
    "internal/update/rollout.go",
    "internal/update/rollout_land_test.go",
    "internal/update/rollout_refusal_test.go",
    "internal/update/rolloutview.go",
    "internal/update/store.go",
    "internal/update/update.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/update/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/...",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./... && go test ./...",
      "exit_code": 0
    },
    {
      "command": "(cd broker && go build ./... && go vet ./... && go test ./...)",
      "exit_code": 0
    },
    {
      "command": "dashboard: node_modules/.bin/vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "dashboard: node_modules/.bin/vitest run",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/eslint .",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Rule 1 — the restart: after the gateway stage's deploy returns, mark the durable checkpoint restart-pending, save, then systemctl restart --no-block idss-control-plane and stop driving; no health verdict from the old process; behind a fakeable seam": "internal/update/restart.go (Restarter seam + WithRestarter), internal/update/rollout.go (deployGatewayThenRestart), internal/update/store.go (RolloutProgress.RestartPending); TestRollout_SelfSwapRestartsThenResumeFinishes in internal/update/restart_test.go",
    "Rule 1 — mark-before-restart ordering: the restart is never issued if the save fails": "TestRollout_SelfSwapNoRestartWhenMarkDoesNotPersist (failRestartPendingBackend) in internal/update/restart_test.go",
    "Rule 1 — a self-swap with no restarter wired refuses loud": "ErrRestarterNotWired in internal/update/restart.go; TestRollout_SelfSwapNoRestarterRefusesWired",
    "Rule 2 — the finish: Resume in the new process sees the mark (does not restart twice), runs the post-swap health check, applies or Lander.Restore + rollback (ADR 0067)": "internal/update/rollout.go (resumeRestartPending capture + gateway branch, land-skip on resume); TestRollout_SelfSwapRestartsThenResumeFinishes (rst.calls stays 1) + rewired TestRollout_LandedGatewayFailureRestoresPreviousBeforeRollback (rollback via Resume)",
    "Rule 3 — a rollout does not start (nor its restart fire) while a service deploy is in flight; U3 says what it is waiting for": "internal/update/rollout.go (deployInFlight guard + restart re-check, WaitingForDeploy), internal/update/restart.go (DeployGate + WithDeployGate), internal/controlapi/deployrunstore.go (anyInFlight) wired via WithProvisionDeployGateSink in main.go; TestRollout_YieldsToDeployInFlight + dashboard rollout.test.ts waiting-for-deploy row",
    "Rule 4 — a new deploy is refused while a rollout is applying, plainly": "Orchestrator.RolloutInFlight in internal/update/restart.go; WithProvisionRolloutGuard 409 'An update is being applied — try again in a few minutes' at deploy/install/uninstall/remove in internal/controlapi/provision.go; TestProvisionHandler_DeployRefusedWhileRolloutInFlight",
    "Rule 5 — U2 carries the consent line (data-field=panel-interruption); U3 the restart + waiting-for-deploy copy": "dashboard/src/components/provisioning/ReviewUpdateScreen.vue + RollingOutScreen.vue + rollout.ts; updateReview.test.ts + rollout.test.ts",
    "Production wiring: the restarter and deploy-gate are wired into composeWhole/main, not left unreachable": "control-plane/cmd/control-plane/control_plane_restarter.go (systemctl restart --no-block), whole_composition.go (WithRestarter beside the lander), main.go (WithProvisionRolloutGuard + WithProvisionDeployGateSink)",
    "GOTCHAS entry added in the same commit; STATUS updated": "docs/GOTCHAS.md #273; STATUS.md #1636-BUILT milestone entry"
  },
  "summary": "Built ADR 0259's gateway self-swap restart (#1636): a landed control-plane binary now actually runs — mark-before-restart, resume finishes in the new process, and a rollout and a deploy yield to each other.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1636 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit ffdf71246402e4974982c94e4ad3c68362535c13 is not reachable from origin/main (not landed) - changed_files: 'control-plane/cmd/control-plane/control_plane_restarter.go' is not in the diff of the claimed commits - changed_files: 'control-plane/cmd/control-plane/main.go' is not in the diff of the claimed commits - changed_files: 'control-plane/cmd/control-plane/whole_composition.go' is not in the diff of the claimed commits - changed_files: 'dashboard/src/components/provisioning/ReviewUpdateScreen.vue' is not in the diff of the claimed commits - changed_files: 'dashboard/src/components/provisioning/RollingOutScreen.vue' is not in the diff of the claimed commits - changed_files: 'dashboard/src/lib/rollout.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/tests/unit/rollout.test.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/tests/unit/updateReview.test.ts' is not in the diff of the claimed commits - changed_files: 'docs/GOTCHAS.md' is not in the diff of the claimed commits - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/deployrunstore.go' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/provision.go' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/provision_integration_test.go' is not in the diff of the claimed commits - changed_files: 'internal/update/restart.go' is not in the diff of the claimed commits - changed_files: 'internal/update/restart_test.go' is not in the diff of the claimed commits - changed_files: 'internal/update/rollout.go' is not in the diff of the claimed commits - changed_files: 'internal/update/rollout_land_test.go' is not in the diff of the claimed commits - changed_files: 'internal/update/rollout_refusal_test.go' is not in the diff of the claimed commits - changed_files: 'internal/update/rolloutview.go' is not in the diff of the claimed commits - changed_files: 'internal/update/store.go' is not in the diff of the claimed commits - changed_files: 'internal/update/update.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1636, "status": "success", "commits": [ "ffdf71246402e4974982c94e4ad3c68362535c13" ], "changed_files": [ "control-plane/cmd/control-plane/control_plane_restarter.go", "control-plane/cmd/control-plane/main.go", "control-plane/cmd/control-plane/whole_composition.go", "dashboard/src/components/provisioning/ReviewUpdateScreen.vue", "dashboard/src/components/provisioning/RollingOutScreen.vue", "dashboard/src/lib/rollout.ts", "dashboard/tests/unit/rollout.test.ts", "dashboard/tests/unit/updateReview.test.ts", "docs/GOTCHAS.md", "STATUS.md", "internal/controlapi/deployrunstore.go", "internal/controlapi/provision.go", "internal/controlapi/provision_integration_test.go", "internal/update/restart.go", "internal/update/restart_test.go", "internal/update/rollout.go", "internal/update/rollout_land_test.go", "internal/update/rollout_refusal_test.go", "internal/update/rolloutview.go", "internal/update/store.go", "internal/update/update.go" ], "tests": [ { "command": "go test ./internal/update/...", "exit_code": 0 }, { "command": "go test ./internal/controlapi/...", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/...", "exit_code": 0 }, { "command": "go build ./... && go vet ./... && go test ./...", "exit_code": 0 }, { "command": "(cd broker && go build ./... && go vet ./... && go test ./...)", "exit_code": 0 }, { "command": "dashboard: node_modules/.bin/vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "dashboard: node_modules/.bin/vitest run", "exit_code": 0 }, { "command": "node_modules/.bin/eslint .", "exit_code": 0 } ], "criteria": { "Rule 1 — the restart: after the gateway stage's deploy returns, mark the durable checkpoint restart-pending, save, then systemctl restart --no-block idss-control-plane and stop driving; no health verdict from the old process; behind a fakeable seam": "internal/update/restart.go (Restarter seam + WithRestarter), internal/update/rollout.go (deployGatewayThenRestart), internal/update/store.go (RolloutProgress.RestartPending); TestRollout_SelfSwapRestartsThenResumeFinishes in internal/update/restart_test.go", "Rule 1 — mark-before-restart ordering: the restart is never issued if the save fails": "TestRollout_SelfSwapNoRestartWhenMarkDoesNotPersist (failRestartPendingBackend) in internal/update/restart_test.go", "Rule 1 — a self-swap with no restarter wired refuses loud": "ErrRestarterNotWired in internal/update/restart.go; TestRollout_SelfSwapNoRestarterRefusesWired", "Rule 2 — the finish: Resume in the new process sees the mark (does not restart twice), runs the post-swap health check, applies or Lander.Restore + rollback (ADR 0067)": "internal/update/rollout.go (resumeRestartPending capture + gateway branch, land-skip on resume); TestRollout_SelfSwapRestartsThenResumeFinishes (rst.calls stays 1) + rewired TestRollout_LandedGatewayFailureRestoresPreviousBeforeRollback (rollback via Resume)", "Rule 3 — a rollout does not start (nor its restart fire) while a service deploy is in flight; U3 says what it is waiting for": "internal/update/rollout.go (deployInFlight guard + restart re-check, WaitingForDeploy), internal/update/restart.go (DeployGate + WithDeployGate), internal/controlapi/deployrunstore.go (anyInFlight) wired via WithProvisionDeployGateSink in main.go; TestRollout_YieldsToDeployInFlight + dashboard rollout.test.ts waiting-for-deploy row", "Rule 4 — a new deploy is refused while a rollout is applying, plainly": "Orchestrator.RolloutInFlight in internal/update/restart.go; WithProvisionRolloutGuard 409 'An update is being applied — try again in a few minutes' at deploy/install/uninstall/remove in internal/controlapi/provision.go; TestProvisionHandler_DeployRefusedWhileRolloutInFlight", "Rule 5 — U2 carries the consent line (data-field=panel-interruption); U3 the restart + waiting-for-deploy copy": "dashboard/src/components/provisioning/ReviewUpdateScreen.vue + RollingOutScreen.vue + rollout.ts; updateReview.test.ts + rollout.test.ts", "Production wiring: the restarter and deploy-gate are wired into composeWhole/main, not left unreachable": "control-plane/cmd/control-plane/control_plane_restarter.go (systemctl restart --no-block), whole_composition.go (WithRestarter beside the lander), main.go (WithProvisionRolloutGuard + WithProvisionDeployGateSink)", "GOTCHAS entry added in the same commit; STATUS updated": "docs/GOTCHAS.md #273; STATUS.md #1636-BUILT milestone entry" }, "summary": "Built ADR 0259's gateway self-swap restart (#1636): a landed control-plane binary now actually runs — mark-before-restart, resume finishes in the new process, and a rollout and a deploy yield to each other.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Author
Member

close-report for #1636 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1636,
  "status": "success",
  "commits": [
    "ffdf71246402e4974982c94e4ad3c68362535c13"
  ],
  "changed_files": [
    "control-plane/cmd/control-plane/control_plane_restarter.go",
    "control-plane/cmd/control-plane/main.go",
    "control-plane/cmd/control-plane/whole_composition.go",
    "dashboard/src/components/provisioning/ReviewUpdateScreen.vue",
    "dashboard/src/components/provisioning/RollingOutScreen.vue",
    "dashboard/src/lib/rollout.ts",
    "dashboard/tests/unit/rollout.test.ts",
    "dashboard/tests/unit/updateReview.test.ts",
    "docs/GOTCHAS.md",
    "STATUS.md",
    "internal/controlapi/deployrunstore.go",
    "internal/controlapi/provision.go",
    "internal/controlapi/provision_integration_test.go",
    "internal/update/restart.go",
    "internal/update/restart_test.go",
    "internal/update/rollout.go",
    "internal/update/rollout_land_test.go",
    "internal/update/rollout_refusal_test.go",
    "internal/update/rolloutview.go",
    "internal/update/store.go",
    "internal/update/update.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/update/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/...",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./... && go test ./...",
      "exit_code": 0
    },
    {
      "command": "(cd broker && go build ./... && go vet ./... && go test ./...)",
      "exit_code": 0
    },
    {
      "command": "dashboard: node_modules/.bin/vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "dashboard: node_modules/.bin/vitest run",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/eslint .",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Rule 1 — the restart: after the gateway stage's deploy returns, mark the durable checkpoint restart-pending, save, then systemctl restart --no-block idss-control-plane and stop driving; no health verdict from the old process; behind a fakeable seam": "internal/update/restart.go (Restarter seam + WithRestarter), internal/update/rollout.go (deployGatewayThenRestart), internal/update/store.go (RolloutProgress.RestartPending); TestRollout_SelfSwapRestartsThenResumeFinishes in internal/update/restart_test.go",
    "Rule 1 — mark-before-restart ordering: the restart is never issued if the save fails": "TestRollout_SelfSwapNoRestartWhenMarkDoesNotPersist (failRestartPendingBackend) in internal/update/restart_test.go",
    "Rule 1 — a self-swap with no restarter wired refuses loud": "ErrRestarterNotWired in internal/update/restart.go; TestRollout_SelfSwapNoRestarterRefusesWired",
    "Rule 2 — the finish: Resume in the new process sees the mark (does not restart twice), runs the post-swap health check, applies or Lander.Restore + rollback (ADR 0067)": "internal/update/rollout.go (resumeRestartPending capture + gateway branch, land-skip on resume); TestRollout_SelfSwapRestartsThenResumeFinishes (rst.calls stays 1) + rewired TestRollout_LandedGatewayFailureRestoresPreviousBeforeRollback (rollback via Resume)",
    "Rule 3 — a rollout does not start (nor its restart fire) while a service deploy is in flight; U3 says what it is waiting for": "internal/update/rollout.go (deployInFlight guard + restart re-check, WaitingForDeploy), internal/update/restart.go (DeployGate + WithDeployGate), internal/controlapi/deployrunstore.go (anyInFlight) wired via WithProvisionDeployGateSink in main.go; TestRollout_YieldsToDeployInFlight + dashboard rollout.test.ts waiting-for-deploy row",
    "Rule 4 — a new deploy is refused while a rollout is applying, plainly": "Orchestrator.RolloutInFlight in internal/update/restart.go; WithProvisionRolloutGuard 409 'An update is being applied — try again in a few minutes' at deploy/install/uninstall/remove in internal/controlapi/provision.go; TestProvisionHandler_DeployRefusedWhileRolloutInFlight",
    "Rule 5 — U2 carries the consent line (data-field=panel-interruption); U3 the restart + waiting-for-deploy copy": "dashboard/src/components/provisioning/ReviewUpdateScreen.vue + RollingOutScreen.vue + rollout.ts; updateReview.test.ts + rollout.test.ts",
    "Production wiring: the restarter and deploy-gate are wired into composeWhole/main, not left unreachable": "control-plane/cmd/control-plane/control_plane_restarter.go (systemctl restart --no-block), whole_composition.go (WithRestarter beside the lander), main.go (WithProvisionRolloutGuard + WithProvisionDeployGateSink)",
    "GOTCHAS entry added in the same commit; STATUS updated": "docs/GOTCHAS.md #273; STATUS.md #1636-BUILT milestone entry"
  },
  "summary": "Built ADR 0259's gateway self-swap restart (#1636): a landed control-plane binary now actually runs — mark-before-restart, resume finishes in the new process, and a rollout and a deploy yield to each other.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1636 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1636, "status": "success", "commits": [ "ffdf71246402e4974982c94e4ad3c68362535c13" ], "changed_files": [ "control-plane/cmd/control-plane/control_plane_restarter.go", "control-plane/cmd/control-plane/main.go", "control-plane/cmd/control-plane/whole_composition.go", "dashboard/src/components/provisioning/ReviewUpdateScreen.vue", "dashboard/src/components/provisioning/RollingOutScreen.vue", "dashboard/src/lib/rollout.ts", "dashboard/tests/unit/rollout.test.ts", "dashboard/tests/unit/updateReview.test.ts", "docs/GOTCHAS.md", "STATUS.md", "internal/controlapi/deployrunstore.go", "internal/controlapi/provision.go", "internal/controlapi/provision_integration_test.go", "internal/update/restart.go", "internal/update/restart_test.go", "internal/update/rollout.go", "internal/update/rollout_land_test.go", "internal/update/rollout_refusal_test.go", "internal/update/rolloutview.go", "internal/update/store.go", "internal/update/update.go" ], "tests": [ { "command": "go test ./internal/update/...", "exit_code": 0 }, { "command": "go test ./internal/controlapi/...", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/...", "exit_code": 0 }, { "command": "go build ./... && go vet ./... && go test ./...", "exit_code": 0 }, { "command": "(cd broker && go build ./... && go vet ./... && go test ./...)", "exit_code": 0 }, { "command": "dashboard: node_modules/.bin/vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "dashboard: node_modules/.bin/vitest run", "exit_code": 0 }, { "command": "node_modules/.bin/eslint .", "exit_code": 0 } ], "criteria": { "Rule 1 — the restart: after the gateway stage's deploy returns, mark the durable checkpoint restart-pending, save, then systemctl restart --no-block idss-control-plane and stop driving; no health verdict from the old process; behind a fakeable seam": "internal/update/restart.go (Restarter seam + WithRestarter), internal/update/rollout.go (deployGatewayThenRestart), internal/update/store.go (RolloutProgress.RestartPending); TestRollout_SelfSwapRestartsThenResumeFinishes in internal/update/restart_test.go", "Rule 1 — mark-before-restart ordering: the restart is never issued if the save fails": "TestRollout_SelfSwapNoRestartWhenMarkDoesNotPersist (failRestartPendingBackend) in internal/update/restart_test.go", "Rule 1 — a self-swap with no restarter wired refuses loud": "ErrRestarterNotWired in internal/update/restart.go; TestRollout_SelfSwapNoRestarterRefusesWired", "Rule 2 — the finish: Resume in the new process sees the mark (does not restart twice), runs the post-swap health check, applies or Lander.Restore + rollback (ADR 0067)": "internal/update/rollout.go (resumeRestartPending capture + gateway branch, land-skip on resume); TestRollout_SelfSwapRestartsThenResumeFinishes (rst.calls stays 1) + rewired TestRollout_LandedGatewayFailureRestoresPreviousBeforeRollback (rollback via Resume)", "Rule 3 — a rollout does not start (nor its restart fire) while a service deploy is in flight; U3 says what it is waiting for": "internal/update/rollout.go (deployInFlight guard + restart re-check, WaitingForDeploy), internal/update/restart.go (DeployGate + WithDeployGate), internal/controlapi/deployrunstore.go (anyInFlight) wired via WithProvisionDeployGateSink in main.go; TestRollout_YieldsToDeployInFlight + dashboard rollout.test.ts waiting-for-deploy row", "Rule 4 — a new deploy is refused while a rollout is applying, plainly": "Orchestrator.RolloutInFlight in internal/update/restart.go; WithProvisionRolloutGuard 409 'An update is being applied — try again in a few minutes' at deploy/install/uninstall/remove in internal/controlapi/provision.go; TestProvisionHandler_DeployRefusedWhileRolloutInFlight", "Rule 5 — U2 carries the consent line (data-field=panel-interruption); U3 the restart + waiting-for-deploy copy": "dashboard/src/components/provisioning/ReviewUpdateScreen.vue + RollingOutScreen.vue + rollout.ts; updateReview.test.ts + rollout.test.ts", "Production wiring: the restarter and deploy-gate are wired into composeWhole/main, not left unreachable": "control-plane/cmd/control-plane/control_plane_restarter.go (systemctl restart --no-block), whole_composition.go (WithRestarter beside the lander), main.go (WithProvisionRolloutGuard + WithProvisionDeployGateSink)", "GOTCHAS entry added in the same commit; STATUS updated": "docs/GOTCHAS.md #273; STATUS.md #1636-BUILT milestone entry" }, "summary": "Built ADR 0259's gateway self-swap restart (#1636): a landed control-plane binary now actually runs — mark-before-restart, resume finishes in the new process, and a rollout and a deploy yield to each other.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1636
No description provided.