real-rail: pinning the channel is only HALF the land-step — the running control plane never re-reads it, so the re-tune cannot reach the fleet (#1569) #1661

Closed
opened 2026-09-20 12:03:41 +00:00 by matou-build-agent · 2 comments

The failure

Drive 20260920T105438Z redded at real-rail on a broken remote command line (healed in 1f1cd66d). With that command repaired the leg will now run set-release-channel successfully — and then still time out at waitForScreen(dash!, 'applied', 'real-rail', ROLLOUT_BUDGET_MS) (app/tests/e2e/journey.updates.spec.ts:600), because pinning the channel does not put it into effect.

The evidence

  • SetGatewayReleaseChannel writes the feed/key pair into the gateway's render-inputs sidecar and re-renders the machine's surface — machines/gateway/gateway-guest.nix on this VM-mode drive (internal/clan/gateway_attach.go:567-596). It touches nothing that is running.
  • The pair reaches the control plane ONLY as unit-script exports: export IDSS_RELEASE_FEED_URL= / export IDSS_RELEASE_PUBLIC_KEY= (internal/clan/vmguest.go:2043-2044).
  • Those are read ONCE, at process start, by productionReleaseSource (control-plane/cmd/control-plane/main.go:1403-1417), wired into composeWhole at main.go:1571. There is no re-read, no reload path.
  • So until the gateway's closure is switched AND idss-control-plane restarts, the running process keeps the channel it booted with. This drive's guest journal shows exactly that, unchanged across all three starts: logs/guest-control-plane.log:21,102,183 — release source wired … feed=http://10.0.2.2:8091/channel/testing.json.
  • The repo's own documentation of the land-step says it is two steps: "runs this as the control-plane binary's set-release-channel <node> <feed> <key> one-shot, then switches the closure in place with clan machines update … after which productionReleaseSource wires on the next control-plane start" (internal/clan/gateway_attach.go:555-559; the same sentence in control-plane/cmd/control-plane/set_release_channel.go:26-28). Its rerender-gateway sibling is driven with both halves in scripts/lib/rehearsal-standing-lib.sh:319-323.
  • The leg runs only the first half. grep -n 'machines update' app/tests/ matches nothing but a comment in rentedPrefix.ts:211 — no harness path anywhere switches this guest's own closure.

The suspected layer

Harness (the real-rail leg), with a product question attached. Two doors, and the second half is not obviously the harness's to pick:

  1. Harness drives the documented second half — cd /srv/idss/config && nix develop --command clan machines update gateway --build-host localhost --target-host localhost --host-key-check none on the guest, as rehearsal-standing-lib.sh:322-323 does on a standing box. But the control-plane unit is deliberately held off its own switch (restartIfChanged = false, GOTCHAS #3, #86 — a box's self-deploy kills its own driver), so the switch alone will NOT restart the unit and the new exports still will not be read; an explicit systemctl restart idss-control-plane would have to follow, on a box the drive is mid-journey on.
  2. Product re-reads the channel — treat a channel pinned into the config repo as live without a closure switch. That is a product-behaviour change (what a re-tune does), not a harness fix.

Neither half is testable offline on this workstation, and door 1's restart-on-a-live-box step is the GOTCHAS #86 hazard, so this is handed back for a ruling rather than healed in-lane.

Cost if not ruled

The leg is the drive's LAST (app/tests/e2e/fixtures/updatesJourney.ts:54), so it reds only after the full founding prefix and all six proof legs have run — this drive spent 62 minutes reaching it. Re-firing without this resolved buys a whole paid drive to rediscover it.

drive 20260920T105438Z red at real-rail: leg real-rail was waiting on set-release-channel to the public testing rail (#1569) — the Updates surface showed instead: the guest refused the re-tune: Command failed: ssh -o BatchMode=yes -o Stric
evidence: /home/swarm/swarm/Matou/idss/test-results/private-path/20260920T105438Z 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 `20260920T105438Z` redded at `real-rail` on a broken remote command line (healed in `1f1cd66d`). With that command repaired the leg will now run `set-release-channel` successfully — and then still time out at `waitForScreen(dash!, 'applied', 'real-rail', ROLLOUT_BUDGET_MS)` (`app/tests/e2e/journey.updates.spec.ts:600`), because pinning the channel does not put it into effect. ## The evidence - `SetGatewayReleaseChannel` writes the feed/key pair into the gateway's render-inputs sidecar and re-renders the machine's surface — `machines/gateway/gateway-guest.nix` on this VM-mode drive (`internal/clan/gateway_attach.go:567-596`). It touches nothing that is running. - The pair reaches the control plane ONLY as unit-script exports: `export IDSS_RELEASE_FEED_URL=` / `export IDSS_RELEASE_PUBLIC_KEY=` (`internal/clan/vmguest.go:2043-2044`). - Those are read ONCE, at process start, by `productionReleaseSource` (`control-plane/cmd/control-plane/main.go:1403-1417`), wired into `composeWhole` at `main.go:1571`. There is no re-read, no reload path. - So until the gateway's closure is switched AND `idss-control-plane` restarts, the running process keeps the channel it booted with. This drive's guest journal shows exactly that, unchanged across all three starts: `logs/guest-control-plane.log:21,102,183` — `release source wired … feed=http://10.0.2.2:8091/channel/testing.json`. - The repo's own documentation of the land-step says it is two steps: "runs this as the control-plane binary's `set-release-channel <node> <feed> <key>` one-shot, **then switches the closure in place with `clan machines update`** … after which productionReleaseSource wires on the next control-plane start" (`internal/clan/gateway_attach.go:555-559`; the same sentence in `control-plane/cmd/control-plane/set_release_channel.go:26-28`). Its `rerender-gateway` sibling is driven with both halves in `scripts/lib/rehearsal-standing-lib.sh:319-323`. - The leg runs only the first half. `grep -n 'machines update' app/tests/` matches nothing but a comment in `rentedPrefix.ts:211` — no harness path anywhere switches this guest's own closure. ## The suspected layer Harness (the `real-rail` leg), with a product question attached. Two doors, and the second half is not obviously the harness's to pick: 1. **Harness drives the documented second half** — `cd /srv/idss/config && nix develop --command clan machines update gateway --build-host localhost --target-host localhost --host-key-check none` on the guest, as `rehearsal-standing-lib.sh:322-323` does on a standing box. But the control-plane unit is deliberately held off its own switch (`restartIfChanged = false`, GOTCHAS #3, #86 — a box's self-deploy kills its own driver), so the switch alone will NOT restart the unit and the new exports still will not be read; an explicit `systemctl restart idss-control-plane` would have to follow, on a box the drive is mid-journey on. 2. **Product re-reads the channel** — treat a channel pinned into the config repo as live without a closure switch. That is a product-behaviour change (what a re-tune *does*), not a harness fix. Neither half is testable offline on this workstation, and door 1's restart-on-a-live-box step is the GOTCHAS #86 hazard, so this is handed back for a ruling rather than healed in-lane. ## Cost if not ruled The leg is the drive's LAST (`app/tests/e2e/fixtures/updatesJourney.ts:54`), so it reds only after the full founding prefix and all six proof legs have run — this drive spent 62 minutes reaching it. Re-firing without this resolved buys a whole paid drive to rediscover it. drive `20260920T105438Z` red at `real-rail`: `leg real-rail was waiting on set-release-channel to the public testing rail (#1569) — the Updates surface showed instead: the guest refused the re-tune: Command failed: ssh -o BatchMode=yes -o Stric` evidence: `/home/swarm/swarm/Matou/idss/test-results/private-path/20260920T105438Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 844ba04b38b5 -->
Owner

From the #1562 lane session — recommendation put to Ben, awaiting his word (NOT yet a ruling).

Door 1, completed and wrapped — not door 2.

  • Why not door 2: the pair being pinned is the fleets trust root — the public key every release must verify against. A running control plane that hot-reloads its trust anchor from a file turns a file edit into a change of what the fleet trusts, with no deliberate act. ADR 0248 already says the pair is pinned into the gateways OWN closure; keep it there.
  • The restart is safe here, and #86/#858 does not reach it. That trap is the control plane restarting itself from INSIDE its own switch (its cgroup child drives the switch). Here the switch is driven from an SSH shell, returns, and only then is the unit restarted — the shape ADR 0259 has now proven live six runs running (bounded ~10 s closed door). restartIfChanged=false stays exactly as it is.
  • Make it one act: set-release-channel --apply = pin → clan machines update <node> → systemctl restart idss-control-plane → read back and PRINT the feed the restarted control plane reports (release source wired … feed=), failing loud if it is not the one just pinned. It refuses to start while a rollout or deploy is in flight (ADR 0259 rules 3/4). Without --apply it behaves as today and prints the two remaining steps.
  • The drive runs that same one command in real-rail, then proves the gateway takes a release off get.idss.nzs testing feed. The mid-journey restart is fine: it is the last leg, and the leg can apply Bens ≤60 s bound to it.
  • Runbook: once green, the exact working invocation (env, path, binary) replaces the two-step text in docs/architecture/11-update-supply-chain.md — it is what Ben runs on Whakatōhea Demo for #1569.

If a session picks this up before Ben answers: this is a two-way door on the harness + CLI side (no posture change — the trust root stays in the closure), so building door 1 under ADR 0174 seems in bounds; door 2 is not.

**From the #1562 lane session — recommendation put to Ben, awaiting his word (NOT yet a ruling).** **Door 1, completed and wrapped — not door 2.** - *Why not door 2:* the pair being pinned is the fleet`s trust root — the public key every release must verify against. A running control plane that hot-reloads its trust anchor from a file turns a file edit into a change of what the fleet trusts, with no deliberate act. ADR 0248 already says the pair is pinned into the gateway`s OWN closure; keep it there. - *The restart is safe here, and #86/#858 does not reach it.* That trap is the control plane restarting itself from INSIDE its own switch (its cgroup child drives the switch). Here the switch is driven from an SSH shell, returns, and only then is the unit restarted — the shape ADR 0259 has now proven live six runs running (bounded ~10 s closed door). `restartIfChanged=false` stays exactly as it is. - *Make it one act:* `set-release-channel --apply` = pin → `clan machines update <node>` → `systemctl restart idss-control-plane` → read back and PRINT the feed the restarted control plane reports (`release source wired … feed=`), failing loud if it is not the one just pinned. It refuses to start while a rollout or deploy is in flight (ADR 0259 rules 3/4). Without `--apply` it behaves as today and prints the two remaining steps. - *The drive* runs that same one command in `real-rail`, then proves the gateway takes a release off get.idss.nz`s `testing` feed. The mid-journey restart is fine: it is the last leg, and the leg can apply Ben`s ≤60 s bound to it. - *Runbook:* once green, the exact working invocation (env, path, binary) replaces the two-step text in `docs/architecture/11-update-supply-chain.md` — it is what Ben runs on Whakatōhea Demo for #1569. If a session picks this up before Ben answers: this is a two-way door on the harness + CLI side (no posture change — the trust root stays in the closure), so building door 1 under ADR 0174 seems in bounds; door 2 is not.
Author
Member

Ruled DOOR 1 + BUILT — agent under ADR 0174 (veto anytime). Landed at 039b0c35, offline-proven; live proof rides #1614's next drive.

The ruling. Door 1, not door 2 — adopting the recommendation the prior #1562-lane session put on this ticket, which explicitly sanctioned a session building door 1 under ADR 0174 before Ben answers ("this is a two-way door on the harness + CLI side — no posture change, the trust root stays in the closure"). Door 2 (a running control plane hot-reloading its release feed and pinned key from a mutable file) is rejected: the pair is the fleet's trust root, and ADR 0248 pins it into the gateway's OWN closure by design. This is a two-way door — revertible code/config, no security-posture widening (the trust root stays in the closure exactly as before), proven by the seam suite; live proof is the next drive.

On the #86 concern. It does not reach this restart. GOTCHAS #86's trap is the control plane restarting itself from inside its own switch (a cgroup child drives the switch). Here the switch is driven from the SSH shell, returns, and only THEN is the unit restarted — the exact shape ADR 0259 has proven live. restartIfChanged=false stays untouched.

What landed. A new set-release-channel --apply flag makes the documented land-step ONE command that drives both remaining halves itself, each gating the next:

  1. Fence — refuse to touch a running rollout or service deploy (ADR 0259 rules 3/4). Reads the durable update.json + provision-deploy-runs.json under IDSS_STATE_DIR WITHOUT writing them (new read-only controlapi.AnyDeployInFlight, which skips the reconcile-and-rewrite the live store constructor does). An unreadable fence is a loud refusal, never a blind restart (ADR 0100).
  2. Pin + switch — commit the pair into the closure, then clan machines update <node> --build-host localhost --target-host localhost --host-key-check none switches it in place.
  3. Restart + read back — systemctl restart --no-block idss-control-plane, then confirm the restarted process wired the feed just pinned — a mismatch fails loud (the re-tune did not take).

Without --apply the one-shot pins only (the first half) and prints the two remaining steps, so nothing restarts unexpectedly.

Proof (offline). Red-first TestRunSetReleaseChannelApply_* — FleetIdle→SwitchClosure→RestartControlPlane→WiredFeed in order; refuses (touching nothing) when not idle or when the fence is unreadable; fails loud on a wrong wired feed / failed switch / failed pin; bad args exit 2 before any step — plus TestRunSetReleaseChannel_PrintsTheTwoRemainingStepsWithoutApply. The live actions sit behind the channelApply seam so the fence + ordering + fail-loud are unit-proven with no live box. go build ./..., go vet, and go test ./control-plane/cmd/control-plane/ ./internal/controlapi/ ./internal/update/ ./internal/clan/ green.

Harness. realRailLandStep() now emits set-release-channel --apply with IDSS_STATE_DIR for the fence (app/tests/e2e/fixtures/updatesJourney.ts). Fixture vitest 20/20, vue-tsc + eslint + prettier clean. docs/architecture/11-update-supply-chain.md §"Landing the channel…" rewritten to the one --apply command — the runbook step Ben runs on Whakatōhea Demo (advances #1569).

What did NOT happen, honestly (rule 8). The real-rail leg going green is live-only and rides #1614's next drive — the shell-outs (clan machines update, systemctl restart, journalctl read-back) and the restarted control plane wiring get.idss.nz/channel/testing.json cannot be exercised on this workstation. The seam guarantees the orchestration is correct; the drive proves the on-box halves. Founding's testing pin stays HELD.

Closing: the ticket's distinct deliverable (the ruling + the harness/CLI fix) is landed and offline-proven. If the next drive still reds at real-rail, the healer files a fresh signal with the live evidence.

**Ruled DOOR 1 + BUILT — agent under ADR 0174 (veto anytime). Landed at `039b0c35`, offline-proven; live proof rides #1614's next drive.** **The ruling.** Door 1, not door 2 — adopting the recommendation the prior #1562-lane session put on this ticket, which explicitly sanctioned a session building door 1 under ADR 0174 before Ben answers ("this is a two-way door on the harness + CLI side — no posture change, the trust root stays in the closure"). Door 2 (a running control plane hot-reloading its release feed **and pinned key** from a mutable file) is rejected: the pair is the fleet's trust root, and ADR 0248 pins it into the gateway's OWN closure by design. This is a two-way door — revertible code/config, no security-posture widening (the trust root stays in the closure exactly as before), proven by the seam suite; live proof is the next drive. **On the #86 concern.** It does not reach this restart. GOTCHAS #86's trap is the control plane restarting itself from **inside its own switch** (a cgroup child drives the switch). Here the switch is driven from the SSH shell, returns, and only THEN is the unit restarted — the exact shape ADR 0259 has proven live. `restartIfChanged=false` stays untouched. **What landed.** A new `set-release-channel --apply` flag makes the documented land-step ONE command that drives both remaining halves itself, each gating the next: 1. **Fence** — refuse to touch a running rollout or service deploy (ADR 0259 rules 3/4). Reads the durable `update.json` + `provision-deploy-runs.json` under `IDSS_STATE_DIR` WITHOUT writing them (new read-only `controlapi.AnyDeployInFlight`, which skips the reconcile-and-rewrite the live store constructor does). An unreadable fence is a loud refusal, never a blind restart (ADR 0100). 2. **Pin + switch** — commit the pair into the closure, then `clan machines update <node> --build-host localhost --target-host localhost --host-key-check none` switches it in place. 3. **Restart + read back** — `systemctl restart --no-block idss-control-plane`, then confirm the restarted process wired **the feed just pinned** — a mismatch fails loud (the re-tune did not take). Without `--apply` the one-shot pins only (the first half) and prints the two remaining steps, so nothing restarts unexpectedly. **Proof (offline).** Red-first `TestRunSetReleaseChannelApply_*` — FleetIdle→SwitchClosure→RestartControlPlane→WiredFeed in order; refuses (touching nothing) when not idle or when the fence is unreadable; fails loud on a wrong wired feed / failed switch / failed pin; bad args exit 2 before any step — plus `TestRunSetReleaseChannel_PrintsTheTwoRemainingStepsWithoutApply`. The live actions sit behind the `channelApply` seam so the fence + ordering + fail-loud are unit-proven with no live box. `go build ./...`, `go vet`, and `go test ./control-plane/cmd/control-plane/ ./internal/controlapi/ ./internal/update/ ./internal/clan/` green. **Harness.** `realRailLandStep()` now emits `set-release-channel --apply` with `IDSS_STATE_DIR` for the fence (`app/tests/e2e/fixtures/updatesJourney.ts`). Fixture vitest 20/20, vue-tsc + eslint + prettier clean. `docs/architecture/11-update-supply-chain.md` §"Landing the channel…" rewritten to the one `--apply` command — the runbook step Ben runs on Whakatōhea Demo (advances #1569). **What did NOT happen, honestly (rule 8).** The real-rail leg going green is **live-only** and rides #1614's next drive — the shell-outs (`clan machines update`, `systemctl restart`, `journalctl` read-back) and the restarted control plane wiring `get.idss.nz/channel/testing.json` cannot be exercised on this workstation. The seam guarantees the orchestration is correct; the drive proves the on-box halves. Founding's `testing` pin stays HELD. Closing: the ticket's distinct deliverable (the ruling + the harness/CLI fix) is landed and offline-proven. If the next drive still reds at `real-rail`, the healer files a fresh signal with the live evidence.
matou-build-agent 2026-09-20 12:30:25 +00:00
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#1661
No description provided.