real-rail — healer loop-guard: a prior heal did not hold #1664

Closed
opened 2026-09-20 14:53:19 +00:00 by matou-build-agent · 2 comments

A prior drive healed this exact fault (real-rail :: same normalised error) and it has redded again. Per rail 6 (no heal loops), the healer refused a second heal and filed this blocker so the drive stops re-firing into it.

Healer refused: loop-guard rule — diagnose why the prior heal did not hold before re-arming.

ticket-on-refusal under the healer-first regime (#1144)

drive 20260920T134755Z 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/20260920T134755Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

A prior drive healed this exact fault (`real-rail` :: same normalised error) and it has redded again. Per rail 6 (no heal loops), the healer refused a second heal and filed this blocker so the drive stops re-firing into it. **Healer refused: loop-guard rule** — diagnose why the prior heal did not hold before re-arming. _ticket-on-refusal under the healer-first regime (#1144)_ drive `20260920T134755Z` 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/20260920T134755Z` 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: my reading of this red, and the fix shape I would ask for (build the units whole clan environment inside --apply` from ONE shared source, in one pass — not one export per drive), is on #1614 comment 51647.

From the #1562 lane session: my reading of this red, and the fix shape I would ask for (build the unit`s whole clan environment inside `--apply` from ONE shared source, in one pass — not one export per drive), is on #1614 comment 51647.
Author
Member

Close-report — diagnosed and re-armed (not a heal loop). Ruled by agent under ADR 0174 — veto anytime.

Why the prior heal "did not hold": it did. The loop-guard fired on a symptom-level signature (844ba04b38b5 = real-rail :: the guest refused the re-tune), which collapses three distinct root causes into one string. Each prior heal held — its own bug never recurred — and uncovered the next layer of the same land-step (peeled onion, not a loop):

  1. #661 (9538cb21) — the land-step cd'd to a config repo the guest never had and called the systemd unit as a binary.
  2. #1661 (2f368486) — --apply hand-rolled a nix develop the gateway's own flake can never provide, so nix refused before clan ran.
  3. this drive (20260920T134755Z) — with clan finally running through the real adapter, the deploy reached the sops decrypt and had no age key:

clan machines update gateway: clan: missing_var on gateway: a required secret has not been generated: [gateway] Failed to get the data key required to decrypt the SOPS file … 'SOPS_AGE_KEY_FILE' …

Root cause of this layer (same shape as heal 1's finding). --apply's SwitchClosure drives the same clan deploy adapter the control-plane unit's own runner does (clan.New(OpenConfigRepo(configDir), ExecCLI{}, log), channel_apply.go), and ExecCLI bases the clan subprocess env on os.Environ() (internal/clan/cli.go). So the one-shot must run in the same environment the unit's start script sets (internal/clan/vmguest.go:854-867). Heal 1 ported only two of those exports to the SSH wire (IDSS_CONFIG_REPO, IDSS_STATE_DIR); the clan deploy runner also needs HOME=/root (its key store, :854), the machine's SOPS_AGE_KEY_FILE=/var/lib/sops-nix/key.txt (to decrypt its vars, :860), and root's git identity (vars-generate commits, :864-865). Heals 1 and 2 hid this because the deploy never reached the decrypt.

Fix (5134fbb3). realRailLandStep() now carries the full deploy environment the unit's script gives its own clan runner. Seam test (app/tests/e2e/fixtures/updatesJourney.test.ts) proves the wire red→green; all 591 fixture tests pass. The full QEMU drive is the live proof and runs next on matou-workstation via the runner.

Two-way door. No new key material and no posture change: the gateway's sops-nix age key is already a recipient of every gateway var — I only ported the machine's own key path onto the wire. Revertible commit, proven by an existing seam test. Advances #1569.

Re-armed: the next real-rail drive can proceed. Closing this loop-guard blocker.

**Close-report — diagnosed and re-armed (not a heal loop). Ruled by agent under ADR 0174 — veto anytime.** **Why the prior heal "did not hold": it did.** The loop-guard fired on a **symptom-level signature** (`844ba04b38b5` = `real-rail :: the guest refused the re-tune`), which collapses three *distinct* root causes into one string. Each prior heal held — its own bug never recurred — and uncovered the next layer of the same land-step (peeled onion, not a loop): 1. **#661 (`9538cb21`)** — the land-step `cd`'d to a config repo the guest never had and called the systemd unit as a binary. 2. **#1661 (`2f368486`)** — `--apply` hand-rolled a `nix develop` the gateway's own flake can never provide, so nix refused before clan ran. 3. **this drive (`20260920T134755Z`)** — with clan finally running through the real adapter, the deploy reached the sops decrypt and had **no age key**: > `clan machines update gateway: clan: missing_var on gateway: a required secret has not been generated: [gateway] Failed to get the data key required to decrypt the SOPS file … 'SOPS_AGE_KEY_FILE' …` **Root cause of this layer (same shape as heal 1's finding).** `--apply`'s `SwitchClosure` drives the **same** clan deploy adapter the control-plane unit's own runner does (`clan.New(OpenConfigRepo(configDir), ExecCLI{}, log)`, `channel_apply.go`), and `ExecCLI` bases the clan subprocess env on `os.Environ()` (`internal/clan/cli.go`). So the one-shot must run in the **same environment the unit's start script sets** (`internal/clan/vmguest.go:854-867`). Heal 1 ported only **two** of those exports to the SSH wire (`IDSS_CONFIG_REPO`, `IDSS_STATE_DIR`); the clan deploy runner also needs `HOME=/root` (its key store, `:854`), the machine's `SOPS_AGE_KEY_FILE=/var/lib/sops-nix/key.txt` (to decrypt its vars, `:860`), and root's git identity (vars-generate commits, `:864-865`). Heals 1 and 2 hid this because the deploy never reached the decrypt. **Fix (`5134fbb3`).** `realRailLandStep()` now carries the full deploy environment the unit's script gives its own clan runner. Seam test (`app/tests/e2e/fixtures/updatesJourney.test.ts`) proves the wire red→green; all 591 fixture tests pass. The full QEMU drive is the live proof and runs next on matou-workstation via the runner. **Two-way door.** No new key material and no posture change: the gateway's sops-nix age key is already a recipient of every gateway var — I only ported the machine's own key path onto the wire. Revertible commit, proven by an existing seam test. Advances #1569. Re-armed: the next real-rail drive can proceed. Closing this loop-guard blocker.
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#1664
No description provided.