Deploy reports success when eval preflight skipped every node — operator sees S5x health-check copy instead of the deploy failure #429

Closed
opened 2026-08-11 06:04:21 +00:00 by ben · 1 comment
Owner

Defect (live repro, Tairea Anau manual drive 2026-08-11)

The docs-editing phantom placement (filed separately) made the gateway fail the eval preflight. What the operator then saw was P4-S5x “active — a service failed” with the no-coverage copy (“The failed service is not counted anywhere…”) — as if the deploy had held and only a health check failed. In truth nothing was deployed at all: no nix build, no switch, the node still runs the pre-deploy closure.

Cause — two layers

  1. Deploy.Run (internal/clan/adapter.go:121) excludes a non-evaluating node into res.Skipped and — in non-Strict mode — returns (res, nil) when no other failures occurred. A deploy where every scoped node was skipped is a successful no-op by its return values.
  2. applyRevision (internal/provision/deploy.go:282) checks only the error. It never looks at DeployResult.Reconciled/Skipped, so the services step marks done and healthGate runs against an unchanged node — every check fails honestly, and the failure surfaces on the wrong screen with the wrong story and a useless Retry (RetryService re-runs only the check, never the deploy).

This violates the fail-loud posture (ADR 0100): the eval error — which names the root cause precisely — was classified, carried in res.Skipped[].Detail, and then dropped.

Fix

applyRevision must treat a requested node that did not reconcile as a deploy failure carrying the skip's classified kind/detail (config_eval / missing_var) — either by passing Strict: true for provisioning's single-node deploys or by checking Reconciled covers the requested nodes. The operator lands on the deploy-failed surface naming the eval error, not on S5x.

Acceptance

  • A single-node deploy whose node fails eval preflight surfaces as DeployFailure (step deploy-services, kind config_eval), with the eval excerpt in the step log — never as S5x.
  • A multi-node deploy that partially reconciles still reports per-node skips loudly in the run record.
  • Regression test: fake CLI failing eval → orchestrator returns the failure; health gate never runs.
## Defect (live repro, Tairea Anau manual drive 2026-08-11) The docs-editing phantom placement (filed separately) made the gateway fail the eval preflight. What the operator then saw was **P4-S5x “active — a service failed”** with the no-coverage copy (“The failed service is not counted anywhere…”) — as if the deploy had held and only a health check failed. In truth **nothing was deployed at all**: no nix build, no switch, the node still runs the pre-deploy closure. ## Cause — two layers 1. `Deploy.Run` (`internal/clan/adapter.go:121`) excludes a non-evaluating node into `res.Skipped` and — in non-`Strict` mode — returns `(res, nil)` when no *other* failures occurred. A deploy where **every scoped node was skipped** is a successful no-op by its return values. 2. `applyRevision` (`internal/provision/deploy.go:282`) checks only the error. It never looks at `DeployResult.Reconciled`/`Skipped`, so the services step marks done and `healthGate` runs against an unchanged node — every check fails honestly, and the failure surfaces on the wrong screen with the wrong story and a useless Retry (RetryService re-runs only the check, never the deploy). This violates the fail-loud posture (ADR 0100): the eval error — which names the root cause precisely — was classified, carried in `res.Skipped[].Detail`, and then dropped. ## Fix `applyRevision` must treat a requested node that did not reconcile as a **deploy failure** carrying the skip's classified kind/detail (`config_eval` / `missing_var`) — either by passing `Strict: true` for provisioning's single-node deploys or by checking `Reconciled` covers the requested nodes. The operator lands on the deploy-failed surface naming the eval error, not on S5x. ## Acceptance - A single-node deploy whose node fails eval preflight surfaces as `DeployFailure` (step `deploy-services`, kind `config_eval`), with the eval excerpt in the step log — never as S5x. - A multi-node deploy that partially reconciles still reports per-node skips loudly in the run record. - Regression test: fake CLI failing eval → orchestrator returns the failure; health gate never runs.
Author
Owner

Fixed in 9ba7074 (on origin/main).

applyRevision (internal/provision/deploy.go) now reads the *DeployResult instead of only the error: a requested node absent from Reconciled is treated as a deploy failure, and its preflight Skipped entry is lifted back into a classified *clan.Failure (kind config_eval/missing_var, the eval excerpt in Detail). A single-node deploy whose node fails eval preflight now surfaces on the deploy-failed surface — step deploy-services, classified — naming the eval error, never S5x; the health gate never runs against the unchanged node.

  • AC1 (single-node eval-preflight skip → DeployFailure, deploy-services, config_eval, excerpt in the error; never S5x): new seam test TestDeploy_AnEvalPreflightSkipIsADeployFailureNotSilentSuccess in internal/provision/deploy_test.go asserts run.Failure classified config_eval with the excerpt, run.Outcome == nil, deploy step failed, health step never started.
  • AC2 (multi-node partial reconcile still reports per-node skips loudly): unchanged — the clan seam keeps non-strict exclude-and-report, still covered by internal/clan/adapter_test.go and clan_test.go (reconciled + skipped both populated).
  • AC3 (regression: fake failing eval → orchestrator returns the failure; health gate never runs): the new test drives exactly this via FakeConfig.BadNodes.

fail-loud, ADR 0100. STATUS.md updated. Sibling #428 (the phantom placement that triggered the eval failure) remains separate.

Fixed in 9ba7074 (on origin/main). `applyRevision` (`internal/provision/deploy.go`) now reads the `*DeployResult` instead of only the error: a requested node absent from `Reconciled` is treated as a deploy failure, and its preflight `Skipped` entry is lifted back into a classified `*clan.Failure` (kind `config_eval`/`missing_var`, the eval excerpt in `Detail`). A single-node deploy whose node fails eval preflight now surfaces on the deploy-failed surface — step `deploy-services`, classified — naming the eval error, never S5x; the health gate never runs against the unchanged node. - AC1 (single-node eval-preflight skip → DeployFailure, deploy-services, config_eval, excerpt in the error; never S5x): new seam test `TestDeploy_AnEvalPreflightSkipIsADeployFailureNotSilentSuccess` in `internal/provision/deploy_test.go` asserts `run.Failure` classified config_eval with the excerpt, `run.Outcome == nil`, deploy step failed, health step never started. - AC2 (multi-node partial reconcile still reports per-node skips loudly): unchanged — the clan seam keeps non-strict exclude-and-report, still covered by `internal/clan/adapter_test.go` and `clan_test.go` (reconciled + skipped both populated). - AC3 (regression: fake failing eval → orchestrator returns the failure; health gate never runs): the new test drives exactly this via `FakeConfig.BadNodes`. fail-loud, ADR 0100. STATUS.md updated. Sibling #428 (the phantom placement that triggered the eval failure) remains separate.
ben closed this issue 2026-08-11 06:21:41 +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#429
No description provided.