rehearsal drive red at deploy-takeover #627

Closed
opened 2026-08-21 01:35:16 +00:00 by matou-build-agent · 3 comments

(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out)

drive 20260821T013253Z red at deploy-takeover: the gateway deploy failed — The gateway deploy failed. [There is no old operating system to roll back to — this machine was taken over for the community.]
evidence: test-results/…/20260821T013253Z/ on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)

(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out) drive `20260821T013253Z` red at `deploy-takeover`: `the gateway deploy failed — The gateway deploy failed. [There is no old operating system to roll back to — this machine was taken over for the community.]` evidence: `test-results/…/20260821T013253Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596) <!-- rehearsal-sig: 800a2936720b -->
Owner

Head-start (evidence test-results/drive-selfhosted/20260821T013253Z, on aa9de31b, pin d2c56b6) — first selfhosted drive ever past ports-honest AND point (9/10 green). The deploy red is real but its LABEL is a false positive; the real error is hidden.

  • Deploy ran 25 s (01:34:06 → 01:34:31): mesh done, public-entry done, control-plane failed at stage enroll-configure, right after "takeover-ready node config committed". No kexec/disko ever happened — this is the eval/preflight phase, not the wipe.
  • The surfaced failure is clan: missing_var on gateway: "a required secret has not been generated" with detail consisting only of two clan-CLI command-trace lines:
    $ clan select 'clanInternals.machines.x86_64-linux.{gateway}.config.clan.core.?sops.?defaultGroups'
    $ clan select 'clanInternals.machines.x86_64-linux.{gateway}.config.clan.core.vars.?sops.?secretUploadDirectory'
    
  • internal/clan/errors.go:218-231 classifies FailMissingVar when the output merely Contains("sops") (alongside the precise "couldn't find var" / "missing var" matches). The clan CLI echoes $ clan select …?sops… as its own subprocess trace on many failure paths, so that bare-"sops" clause turns any failure that gets that far into "missing secret". The excerpt kept only those trace lines; the actual error line(s) that followed were dropped.

Two things to do, in order:

  1. Recover the real error — the raw clan stdout/stderr from this deploy (the app's state dir on matou-workstation under the rehearsal env, or re-run the same clan invocation against the founding's clan repo for gateway). Suspects given the day's history: rebrand fallout in the generated clan config (ce9f96d renamed ourcloud-* units/paths/module git.matou.nz/Matou/idss) — the last GREEN deploy on any path was drive-droplet 20260815T055256Z, pre-rebrand; or the pinned clan CLI rejecting the ?-optional selectors (cf. GOTCHAS #40 on pinned-CLI drift).
  2. Fix the classifier (errors.go): drop the bare "sops" and "vars generate" substrings (or require them outside $ -prefixed trace lines) so a missing var is claimed only on clan's real phrases; and make the excerpt keep the lines after the trace, not just the trace — otherwise every future deploy red in this phase will be mislabelled the same way. Add a test with this exact two-line excerpt expecting NOT FailMissingVar.

DDR 0188 and the #622/#624/#625 spec retimings are all proven by this drive — ports-honest recorded dropped → reachable → name wired → deploying with no hands.

**Head-start (evidence `test-results/drive-selfhosted/20260821T013253Z`, on `aa9de31b`, pin `d2c56b6`) — first selfhosted drive ever past `ports-honest` AND `point` (9/10 green). The deploy red is real but its LABEL is a false positive; the real error is hidden.** - Deploy ran 25 s (01:34:06 → 01:34:31): `mesh` done, `public-entry` done, **`control-plane` failed** at stage `enroll-configure`, right after *"takeover-ready node config committed"*. No kexec/disko ever happened — this is the eval/preflight phase, not the wipe. - The surfaced failure is `clan: missing_var on gateway: "a required secret has not been generated"` with `detail` consisting **only** of two clan-CLI command-trace lines: ``` $ clan select 'clanInternals.machines.x86_64-linux.{gateway}.config.clan.core.?sops.?defaultGroups' $ clan select 'clanInternals.machines.x86_64-linux.{gateway}.config.clan.core.vars.?sops.?secretUploadDirectory' ``` - `internal/clan/errors.go:218-231` classifies `FailMissingVar` when the output merely `Contains("sops")` (alongside the precise `"couldn't find var"` / `"missing var"` matches). The clan CLI echoes `$ clan select …?sops…` as its own subprocess trace on *many* failure paths, so that bare-`"sops"` clause turns any failure that gets that far into "missing secret". The excerpt kept only those trace lines; the actual error line(s) that followed were dropped. **Two things to do, in order:** 1. **Recover the real error** — the raw clan stdout/stderr from this deploy (the app's state dir on matou-workstation under the rehearsal env, or re-run the same `clan` invocation against the founding's clan repo for `gateway`). Suspects given the day's history: rebrand fallout in the generated clan config (`ce9f96d` renamed `ourcloud-*` units/paths/module `git.matou.nz/Matou/idss`) — the last GREEN deploy on any path was `drive-droplet 20260815T055256Z`, pre-rebrand; or the pinned clan CLI rejecting the `?`-optional selectors (cf. GOTCHAS #40 on pinned-CLI drift). 2. **Fix the classifier** (`errors.go`): drop the bare `"sops"` and `"vars generate"` substrings (or require them outside `$ `-prefixed trace lines) so a missing var is claimed only on clan's real phrases; and make the excerpt keep the lines *after* the trace, not just the trace — otherwise every future deploy red in this phase will be mislabelled the same way. Add a test with this exact two-line excerpt expecting NOT `FailMissingVar`. DDR 0188 and the #622/#624/#625 spec retimings are all proven by this drive — `ports-honest` recorded dropped → reachable → name wired → deploying with no hands.
Owner

Duplicate of #626 (filed 5 min earlier by the #625 session from the prior drive's evidence; the session-runner has already picked #626). Work + close there; this stays as #523's blocker link until #626 closes — whoever closes #626 please close this too (or re-drive: a green at deploy-takeover closes both by evidence).

Duplicate of **#626** (filed 5 min earlier by the #625 session from the prior drive's evidence; the session-runner has already picked #626). Work + close there; this stays as #523's blocker link until #626 closes — whoever closes #626 please close this too (or re-drive: a green at `deploy-takeover` closes both by evidence).
Owner

Ruled by agent under ADR 0174 — veto anytime.

Diagnosis: this drive's evidence is the same defect #626 already fixed — it is not a new bug.

test-results/drive-selfhosted/20260821T013253Z/state/founding-state.json
(standup.deploy.failure.detail) on matou-workstation:

founding: stand up the machine at your place: clan: missing_var on gateway: a required secret has not been generated: $ clan select 'clanInternals.machines.x86_64-linux.{gateway}.config.clan.core.?sops.?defaultGroups'
$ clan select 'clanInternals.machines.x86_64-linux.{gateway}.config.clan.core.vars.?sops.?secretUploadDirectory'

This is byte-for-byte the same missing_var excerpt #626 diagnosed and fixed
(self-hosted founding never called SeedCommunity/EnsureOperator before
Enroll, so a fresh self-hosted config repo stayed bare and gateway's sops
vars could never resolve). The [There is no old operating system to roll back to…] line in this ticket's title is deploy.go's generic full-install
failure footer (any control-plane deploy failure gets it) — it names no new
failure mode.

Timeline proves this drive predates the fix, not that the fix failed:

  • This drive ran 2026-08-21T01:34:06Z–2026-08-21T01:34:31Z (artifacts/verdict.json).
  • #626's fix landed in 25c9cb5e at 2026-08-21T01:48:59Z — ~15 minutes
    after this drive finished.
  • The drive did carry #625's fix (aa9de31b, landed 01:30:53Z, before this
    drive started) — consistent with it clearing ports-honest/point and
    reaching deploy-takeover for the first time, exactly as #626 predicted.

Current state: 25c9cb5e is on main now. composeSelfHostedGateway
(internal/founding/selfhostedpath.go:168-171) calls SeedCommunity +
Secrets().EnsureOperator before Enroll; regression test
TestSelfHosted_SeedsTheCommunityFlakeAndBootstrapsTheOperatorBeforeComposing
passes (go test ./internal/founding/... green on this checkout).

No new code change needed for this ticket — closing as superseded by #626's
fix rather than leaving a stale duplicate open. Live re-proof of the fix is
already tracked as outstanding on #626/STATUS.md (next unattended
selfhosted rehearsal drive); this ticket doesn't need its own copy of that
tracking.

Advances #626.

Ruled by agent under ADR 0174 — veto anytime. **Diagnosis: this drive's evidence is the same defect #626 already fixed — it is not a new bug.** `test-results/drive-selfhosted/20260821T013253Z/state/founding-state.json` (`standup.deploy.failure.detail`) on matou-workstation: ``` founding: stand up the machine at your place: clan: missing_var on gateway: a required secret has not been generated: $ clan select 'clanInternals.machines.x86_64-linux.{gateway}.config.clan.core.?sops.?defaultGroups' $ clan select 'clanInternals.machines.x86_64-linux.{gateway}.config.clan.core.vars.?sops.?secretUploadDirectory' ``` This is byte-for-byte the same `missing_var` excerpt #626 diagnosed and fixed (self-hosted founding never called `SeedCommunity`/`EnsureOperator` before `Enroll`, so a fresh self-hosted config repo stayed bare and `gateway`'s sops vars could never resolve). The `[There is no old operating system to roll back to…]` line in this ticket's title is `deploy.go`'s generic full-install failure footer (any control-plane deploy failure gets it) — it names no new failure mode. **Timeline proves this drive predates the fix, not that the fix failed:** - This drive ran `2026-08-21T01:34:06Z`–`2026-08-21T01:34:31Z` (`artifacts/verdict.json`). - #626's fix landed in `25c9cb5e` at `2026-08-21T01:48:59Z` — ~15 minutes *after* this drive finished. - The drive did carry #625's fix (`aa9de31b`, landed `01:30:53Z`, before this drive started) — consistent with it clearing `ports-honest`/`point` and reaching `deploy-takeover` for the first time, exactly as #626 predicted. **Current state:** `25c9cb5e` is on `main` now. `composeSelfHostedGateway` (`internal/founding/selfhostedpath.go:168-171`) calls `SeedCommunity` + `Secrets().EnsureOperator` before `Enroll`; regression test `TestSelfHosted_SeedsTheCommunityFlakeAndBootstrapsTheOperatorBeforeComposing` passes (`go test ./internal/founding/...` green on this checkout). No new code change needed for this ticket — closing as superseded by #626's fix rather than leaving a stale duplicate open. Live re-proof of the fix is already tracked as outstanding on #626/STATUS.md (next unattended `selfhosted` rehearsal drive); this ticket doesn't need its own copy of that tracking. Advances #626.
ben closed this issue 2026-08-21 01:53:13 +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#627
No description provided.