enroll-configure red: eval preflight drops the nix error, leaves only a generic remedy #590

Closed
opened 2026-08-15 11:49:32 +00:00 by ben · 3 comments
Owner

Failure

The drive reds on leg enroll-configure during the own-VPS stand-up, at the eval preflight gate — after connect, point, and seed all went green.

artifacts/legs.json:

"leg": "enroll-configure", "status": "red", "ms": 32270,
"error": "journey leg \"enroll-configure\" went red: founding: the server stand-up did not complete (status \"blocked\"): the node's config does not evaluate — fix it so the node evaluates, then re-drive"

logs/founding-state.log / state/founding-state.json (the standup event trail):

{ "stage": "enroll-configure", "message": "machine vars generated (clan-core generators, unsandboxed — pinned code, ADR 0126)" },
{ "stage": "enroll-configure", "message": "eval preflight did not pass — config_eval" },
{ "stage": "enroll-configure", "message": "the stand-up hit a problem — founding: ... the node's config does not evaluate — fix it so the node evaluates, then re-drive" }

The Playwright fault frame (error-context.md) shows the operator the exact same generic sentence — no attribute name, no assertion name, no nix eval output at all.

What the live droplet shows

170.64.187.97 is still reachable and is a stock, unmodified Ubuntu cloud-init box — no NixOS, nothing beyond sshd:

$ ss -tlnp
LISTEN 0 4096 127.0.0.53%lo:53 ... systemd-resolve
LISTEN 0 4096 0.0.0.0:22 ... sshd
LISTEN 0 4096 [::]:22 ... sshd

logs/droplet-journal.txt ends at cloud-init's own "Finished... Startup finished" and the harness's SSH login — nixos-anywhere never kexec'd or touched the box. This corroborates that the failure is a local nix eval preflight (clan#nixosConfigurations.gateway...drvPath evaluated against the harness's own repo checkout, per internal/clan/adapter.go's evalReadiness) that failed before any remote work began — the droplet has no more evidence to give.

Suspected layer: product (Go), not the droplet/infra, not the known own-VPS carrier frontier

This is not the known own-VPS "pairing never flips" DNS-carrier frontier (that skip fires at the point/DNS-pairing leg; here point and seed are green and the red is later, at enroll-configure's eval gate).

Reading internal/clan/enrollment.go's preflight() (~L526-557) against internal/clan/adapter.go's evalReadiness() (~L496-540):

  • evalReadiness runs nix eval ...drvPath, classifies a non-zero exit via classify(), and correctly populates Readiness.Detail with the real excerpt (detail := excerpt(res.Output); if f != nil && f.Detail != "" { detail = f.Detail }) — the actual attribute/assertion text IS captured here.

  • But preflight() throws that excerpt away:

    if r := ready[s.Node]; !r.OK {
        s.Remedy = &Remedy{Instruction: preflightInstruction(r.Kind), Resumable: true}
        s.Status = StatusBlocked
        emit(events, Event{Node: s.Node, Stage: string(StagePreflight), Message: "eval preflight did not pass — " + string(r.Kind)})
        return
    }
    

    r.Detail is read nowhere — not into s.Remedy, not into the emitted Event.Message (which carries only r.Kind, i.e. config_eval), and s.Failure is left nil (contrast the identity-missing branch a few lines above, which DOES set s.Failure). preflightInstruction(kind) (L1297-1303) is a static per-kind string — for config_eval it is always literally "the node's config does not evaluate — fix it so the node evaluates, then re-drive", regardless of what actually failed to evaluate.

  • Every OTHER failing stage in this same file routes through failureEventMessage(f) (L1313+), which explicitly appends the Detail excerpt to the Summary "so the activity log itself says why (#183 Phase A: the operator saw only the bare... Summary, with the cause absent... ADR 0126 live-drive fix)" — see call sites at enrollment.go:284, 605, 613, 617, 675, 691, 698, 947, 952. preflight() is the one path that was never wired through that helper, so the exact #183/ADR-0126 opacity bug that helper exists to fix is still live on the eval-preflight branch.

Net effect: whatever nix attribute/assertion in machines/gateway/*.nix (rendered fresh this drive — da418ab bake takeover-ready config, 8ca231b attach front-door, 5a7aacd attach acme-dns, 59a087f compose gateway dir, all committed in state/clan-config) actually fails to evaluate is unrecoverable from any artifact this drive produces — helper.log is empty, legs.json/founding-state.log carry only the generic remedy, and the app UI shows the same generic sentence. There is no raw nix eval stderr anywhere to inspect.

What plugging it needs

In internal/clan/enrollment.go preflight(): build s.Failure from the Readiness (kind + detail) the same way the identity-missing branch does, and route the emitted Event.Message through failureEventMessage() (or equivalent) so r.Detail — the real nix eval excerpt — reaches the activity log, the terminal fault string (blockDetail), and ultimately the Playwright fault frame. That fix alone won't tell us what's wrong with the gateway config, but it will surface it on the very next red instead of hiding it forever behind preflightInstruction's static text — which is what makes this run itself undiagnosable beyond "eval fails, cause unknown".

drive 20260815T114326Z red at enroll-configure: journey leg "enroll-configure" went red: founding: the server stand-up did not complete (status "blocked"): the node's config does not evaluate — fix it so the node evaluates, then re-drive
evidence: test-results/…/20260815T114326Z/ on matou-workstation (legs.json, droplet-journal.txt, trace)

## Failure The drive reds on leg **enroll-configure** during the own-VPS stand-up, at the eval preflight gate — after `connect`, `point`, and `seed` all went green. `artifacts/legs.json`: ``` "leg": "enroll-configure", "status": "red", "ms": 32270, "error": "journey leg \"enroll-configure\" went red: founding: the server stand-up did not complete (status \"blocked\"): the node's config does not evaluate — fix it so the node evaluates, then re-drive" ``` `logs/founding-state.log` / `state/founding-state.json` (the standup event trail): ``` { "stage": "enroll-configure", "message": "machine vars generated (clan-core generators, unsandboxed — pinned code, ADR 0126)" }, { "stage": "enroll-configure", "message": "eval preflight did not pass — config_eval" }, { "stage": "enroll-configure", "message": "the stand-up hit a problem — founding: ... the node's config does not evaluate — fix it so the node evaluates, then re-drive" } ``` The Playwright fault frame (`error-context.md`) shows the operator the exact same generic sentence — no attribute name, no assertion name, no `nix eval` output at all. ## What the live droplet shows 170.64.187.97 is still reachable and is a **stock, unmodified Ubuntu cloud-init box** — no NixOS, nothing beyond sshd: ``` $ ss -tlnp LISTEN 0 4096 127.0.0.53%lo:53 ... systemd-resolve LISTEN 0 4096 0.0.0.0:22 ... sshd LISTEN 0 4096 [::]:22 ... sshd ``` `logs/droplet-journal.txt` ends at cloud-init's own "Finished... Startup finished" and the harness's SSH login — nixos-anywhere never kexec'd or touched the box. This corroborates that the failure is a **local** `nix eval` preflight (`clan#nixosConfigurations.gateway...drvPath` evaluated against the harness's own repo checkout, per `internal/clan/adapter.go`'s `evalReadiness`) that failed before any remote work began — the droplet has no more evidence to give. ## Suspected layer: product (Go), not the droplet/infra, not the known own-VPS carrier frontier This is **not** the known own-VPS "pairing never flips" DNS-carrier frontier (that skip fires at the `point`/DNS-pairing leg; here `point` and `seed` are green and the red is later, at `enroll-configure`'s eval gate). Reading `internal/clan/enrollment.go`'s `preflight()` (~L526-557) against `internal/clan/adapter.go`'s `evalReadiness()` (~L496-540): - `evalReadiness` runs `nix eval ...drvPath`, classifies a non-zero exit via `classify()`, and correctly populates `Readiness.Detail` with the real excerpt (`detail := excerpt(res.Output); if f != nil && f.Detail != "" { detail = f.Detail }`) — the actual attribute/assertion text IS captured here. - But `preflight()` throws that excerpt away: ```go if r := ready[s.Node]; !r.OK { s.Remedy = &Remedy{Instruction: preflightInstruction(r.Kind), Resumable: true} s.Status = StatusBlocked emit(events, Event{Node: s.Node, Stage: string(StagePreflight), Message: "eval preflight did not pass — " + string(r.Kind)}) return } ``` `r.Detail` is read nowhere — not into `s.Remedy`, not into the emitted `Event.Message` (which carries only `r.Kind`, i.e. `config_eval`), and `s.Failure` is left `nil` (contrast the identity-missing branch a few lines above, which DOES set `s.Failure`). `preflightInstruction(kind)` (L1297-1303) is a static per-kind string — for `config_eval` it is always literally "the node's config does not evaluate — fix it so the node evaluates, then re-drive", regardless of what actually failed to evaluate. - Every OTHER failing stage in this same file routes through `failureEventMessage(f)` (L1313+), which explicitly appends the Detail excerpt to the Summary "so the activity log itself says why (#183 Phase A: the operator saw only the bare... Summary, with the cause absent... ADR 0126 live-drive fix)" — see call sites at enrollment.go:284, 605, 613, 617, 675, 691, 698, 947, 952. `preflight()` is the one path that was never wired through that helper, so the exact #183/ADR-0126 opacity bug that helper exists to fix is still live on the eval-preflight branch. Net effect: whatever nix attribute/assertion in `machines/gateway/*.nix` (rendered fresh this drive — `da418ab` bake takeover-ready config, `8ca231b` attach front-door, `5a7aacd` attach acme-dns, `59a087f` compose gateway dir, all committed in `state/clan-config`) actually fails to evaluate is **unrecoverable from any artifact this drive produces** — `helper.log` is empty, `legs.json`/`founding-state.log` carry only the generic remedy, and the app UI shows the same generic sentence. There is no raw `nix eval` stderr anywhere to inspect. ## What plugging it needs In `internal/clan/enrollment.go` `preflight()`: build `s.Failure` from the `Readiness` (kind + detail) the same way the identity-missing branch does, and route the emitted `Event.Message` through `failureEventMessage()` (or equivalent) so `r.Detail` — the real `nix eval` excerpt — reaches the activity log, the terminal fault string (`blockDetail`), and ultimately the Playwright fault frame. That fix alone won't tell us what's wrong with the gateway config, but it will surface it on the very next red instead of hiding it forever behind `preflightInstruction`'s static text — which is what makes this run itself undiagnosable beyond "eval fails, cause unknown". drive `20260815T114326Z` red at `enroll-configure`: `journey leg "enroll-configure" went red: founding: the server stand-up did not complete (status "blocked"): the node's config does not evaluate — fix it so the node evaluates, then re-drive` evidence: `test-results/…/20260815T114326Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) <!-- rehearsal-sig: a26965b5356b -->
Author
Owner

swarm-claim host=matou-dev-server-01 run=6930
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=6930 (automated multi-host claim — lowest live claim id works this ticket)
Author
Owner

close-report for #590 — status success

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

  • commit 6254418 is not reachable from origin/main (not landed on main)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'internal/clan/enrollment.go' is not in the diff of the claimed commits
  • changed_files: 'internal/clan/enrollment_test.go' is not in the diff of the claimed commits
envelope
{
  "issue": 590,
  "status": "success",
  "commits": [
    "6254418"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/enrollment.go",
    "internal/clan/enrollment_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go test ./internal/founding/ ./internal/provision/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go build ./... && go vet ./internal/clan/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "preflight() builds s.Failure from the Readiness (kind + detail) like the identity-missing branch": "internal/clan/enrollment.go preflight(): s.Failure = &Failure{Kind: r.Kind, Node, Summary, Detail: r.Detail, Remedy}",
    "the emitted Event.Message routes through failureEventMessage so r.Detail reaches the activity log": "enrollment.go preflight() now emits failureEventMessage(s.Failure); asserted by TestEnroll_PreflightEvalBlockCarriesDetail (event carries the nix excerpt)",
    "the real nix eval excerpt reaches the terminal fault string (blockDetail)": "the resumable remedy instruction now carries r.Detail so blockDetail (Remedy.Instruction first) surfaces it; asserted by TestEnroll_PreflightEvalBlockCarriesDetail (st.Remedy.Instruction contains the excerpt)",
    "no stale failure after re-drive": "Advance clears s.Failure alongside s.Remedy on the re-drive signal; asserted by TestEnroll_PreflightEvalBlockClearsFailureOnRedrive"
  },
  "summary": "The eval-preflight config_eval block now carries the real nix eval excerpt into s.Failure, the resumable remedy, and the emitted event, so the failing attribute is no longer hidden behind preflightInstruction's static per-kind sentence.",
  "blockers": []
}
**close-report** for #590 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 6254418 is not reachable from origin/main (not landed on main) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'internal/clan/enrollment.go' is not in the diff of the claimed commits - changed_files: 'internal/clan/enrollment_test.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 590, "status": "success", "commits": [ "6254418" ], "changed_files": [ "STATUS.md", "internal/clan/enrollment.go", "internal/clan/enrollment_test.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/clan/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go test ./internal/founding/ ./internal/provision/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go build ./... && go vet ./internal/clan/", "exit_code": 0 } ], "criteria": { "preflight() builds s.Failure from the Readiness (kind + detail) like the identity-missing branch": "internal/clan/enrollment.go preflight(): s.Failure = &Failure{Kind: r.Kind, Node, Summary, Detail: r.Detail, Remedy}", "the emitted Event.Message routes through failureEventMessage so r.Detail reaches the activity log": "enrollment.go preflight() now emits failureEventMessage(s.Failure); asserted by TestEnroll_PreflightEvalBlockCarriesDetail (event carries the nix excerpt)", "the real nix eval excerpt reaches the terminal fault string (blockDetail)": "the resumable remedy instruction now carries r.Detail so blockDetail (Remedy.Instruction first) surfaces it; asserted by TestEnroll_PreflightEvalBlockCarriesDetail (st.Remedy.Instruction contains the excerpt)", "no stale failure after re-drive": "Advance clears s.Failure alongside s.Remedy on the re-drive signal; asserted by TestEnroll_PreflightEvalBlockClearsFailureOnRedrive" }, "summary": "The eval-preflight config_eval block now carries the real nix eval excerpt into s.Failure, the resumable remedy, and the emitted event, so the failing attribute is no longer hidden behind preflightInstruction's static per-kind sentence.", "blockers": [] } ``` </details>
Author
Owner

close-report for #590 — status success

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

envelope
{
  "issue": 590,
  "status": "success",
  "commits": [
    "625441822bbdb8785f4defed33ffb98d21920580"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/enrollment.go",
    "internal/clan/enrollment_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go test ./internal/founding/ ./internal/provision/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go build ./... && go vet ./internal/clan/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "preflight() builds s.Failure from the Readiness (kind + detail) like the identity-missing branch": "internal/clan/enrollment.go preflight(): s.Failure = &Failure{Kind: r.Kind, Node, Summary, Detail: r.Detail, Remedy}",
    "the emitted Event.Message routes through failureEventMessage so r.Detail reaches the activity log": "enrollment.go preflight() now emits failureEventMessage(s.Failure); asserted by TestEnroll_PreflightEvalBlockCarriesDetail (event carries the nix excerpt)",
    "the real nix eval excerpt reaches the terminal fault string (blockDetail)": "the resumable remedy instruction now carries r.Detail so blockDetail (Remedy.Instruction first) surfaces it; asserted by TestEnroll_PreflightEvalBlockCarriesDetail (st.Remedy.Instruction contains the excerpt)",
    "no stale failure after re-drive": "Advance clears s.Failure alongside s.Remedy on the re-drive signal; asserted by TestEnroll_PreflightEvalBlockClearsFailureOnRedrive"
  },
  "summary": "The eval-preflight config_eval block now carries the real nix eval excerpt into s.Failure, the resumable remedy, and the emitted event, so the failing attribute is no longer hidden behind preflightInstruction's static per-kind sentence.",
  "blockers": []
}
**close-report** for #590 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 590, "status": "success", "commits": [ "625441822bbdb8785f4defed33ffb98d21920580" ], "changed_files": [ "STATUS.md", "internal/clan/enrollment.go", "internal/clan/enrollment_test.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/clan/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go test ./internal/founding/ ./internal/provision/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go build ./... && go vet ./internal/clan/", "exit_code": 0 } ], "criteria": { "preflight() builds s.Failure from the Readiness (kind + detail) like the identity-missing branch": "internal/clan/enrollment.go preflight(): s.Failure = &Failure{Kind: r.Kind, Node, Summary, Detail: r.Detail, Remedy}", "the emitted Event.Message routes through failureEventMessage so r.Detail reaches the activity log": "enrollment.go preflight() now emits failureEventMessage(s.Failure); asserted by TestEnroll_PreflightEvalBlockCarriesDetail (event carries the nix excerpt)", "the real nix eval excerpt reaches the terminal fault string (blockDetail)": "the resumable remedy instruction now carries r.Detail so blockDetail (Remedy.Instruction first) surfaces it; asserted by TestEnroll_PreflightEvalBlockCarriesDetail (st.Remedy.Instruction contains the excerpt)", "no stale failure after re-drive": "Advance clears s.Failure alongside s.Remedy on the re-drive signal; asserted by TestEnroll_PreflightEvalBlockClearsFailureOnRedrive" }, "summary": "The eval-preflight config_eval block now carries the real nix eval excerpt into s.Failure, the resumable remedy, and the emitted event, so the failing attribute is no longer hidden behind preflightInstruction's static per-kind sentence.", "blockers": [] } ``` </details>
ben closed this issue 2026-08-15 12:00:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#590
No description provided.