provision: files-healthy warm-up race persists at the margin — per-probe logging, 6-min budget, and a transition-tolerant e2e leg (drive 011116Z) #556

Closed
opened 2026-08-15 01:29:00 +00:00 by ben · 2 comments
Owner

What breaks

Drive 20260815T011116Z — the deepest run of the arc (#554's gate proven: doors answered on probe 2/120, certs issued AND harvested) — red at files-healthy AGAIN despite #552's warm-up re-probe being wired (payload rebuilt 01:10, main.go:632 → whole_composition.go:189 verified at origin/main). The S5 row stood Files & documents FAILED … could not assert anything about this response (empty or below the body-size floor).

Why this can't be diagnosed from the harvest — and the timing that makes it a razor's edge

The droplet journal shows the co-host stack came up at ~01:20:23–01:20:32 (redis, cron timer, php-fpm ready). The drive died ~01:22. The check's 18×10s ≈ 3-min budget, anchored somewhere between the control-plane restarts (01:17:52 / 01:18:14 / 01:18:17) and switch completion, concludes within seconds of fpm-ready — and the check logs nothing per-probe, so the harvest cannot say when it started, when it concluded, or what its final probe saw. The body floor is NOT the issue (20 B vs ~150 B healthy status.php — verified). An empty body through the public door is most plausibly Caddy's default-empty 502 while nginx/fpm are still starting.

Fix directed (three parts)

  1. Per-probe observability: each warm-up probe logs one line at INFO — attempt N/18, HTTP status (or transport error), body length, verdict — so the next red names its own timing. This is the #536 fail-loud rule applied to the probe loop itself.
  2. Budget 3→6 min (productionServiceWarmup, compose.go): the measured warm-up tail on a 2vCPU droplet is ~2.5–3 min from switch-start; a budget that equals the thing it's absorbing is a coin flip. 6 min still fails honestly on a truly dead service, well inside the leg's ceiling.
  3. The e2e leg tolerates a standing-then-cleared failure: expectFilesHealthy (provision.ts:352) throws the instant it sees a standing failure block, but with re-probe + Retry semantics a FAILED→healthy transition is legitimate; the leg should poll the row across a bounded horizon (~the same warm-up budget) and only throw on a failure that is still standing at the end.

Evidence

  • test-results/drive-droplet/20260815T011116Z/logs/droplet-journal.txt: nextcloud units 01:20:23–:32; systemctl --failed empty at harvest.
  • Same signature as 234251Z (pre-#552), where the stack provably came up 20 s after the check quit.
  • Doors: id.<apex> AND apex answered on probe 2/120 this run — #554's gate transformed the finish leg; cert store harvested for the first time (next same-slug drive orders zero).

Frontier tooth of #492. files-healthy has NEVER passed on the public path — every prior cause was real and distinct (#527 auth exempt, #529 port collision, #536 silence, #552 one-shot); this closes the remaining timing + observability gap.

## What breaks Drive `20260815T011116Z` — the deepest run of the arc (#554's gate proven: doors answered on probe 2/120, certs issued AND harvested) — red at `files-healthy` AGAIN despite #552's warm-up re-probe being wired (payload rebuilt 01:10, `main.go:632` → `whole_composition.go:189` verified at origin/main). The S5 row stood `Files & documents FAILED … could not assert anything about this response (empty or below the body-size floor)`. ## Why this can't be diagnosed from the harvest — and the timing that makes it a razor's edge The droplet journal shows the co-host stack came up at ~01:20:23–01:20:32 (redis, cron timer, php-fpm ready). The drive died ~01:22. The check's 18×10s ≈ 3-min budget, anchored somewhere between the control-plane restarts (01:17:52 / 01:18:14 / 01:18:17) and switch completion, concludes within seconds of fpm-ready — and **the check logs nothing per-probe**, so the harvest cannot say when it started, when it concluded, or what its final probe saw. The body floor is NOT the issue (20 B vs ~150 B healthy status.php — verified). An empty body through the public door is most plausibly Caddy's default-empty 502 while nginx/fpm are still starting. ## Fix directed (three parts) 1. **Per-probe observability**: each warm-up probe logs one line at INFO — attempt N/18, HTTP status (or transport error), body length, verdict — so the next red names its own timing. This is the #536 fail-loud rule applied to the probe loop itself. 2. **Budget 3→6 min** (`productionServiceWarmup`, compose.go): the measured warm-up tail on a 2vCPU droplet is ~2.5–3 min from switch-start; a budget that equals the thing it's absorbing is a coin flip. 6 min still fails honestly on a truly dead service, well inside the leg's ceiling. 3. **The e2e leg tolerates a standing-then-cleared failure**: `expectFilesHealthy` (provision.ts:352) throws the instant it sees a standing failure block, but with re-probe + Retry semantics a FAILED→healthy transition is legitimate; the leg should poll the row across a bounded horizon (~the same warm-up budget) and only throw on a failure that is still standing at the end. ## Evidence - `test-results/drive-droplet/20260815T011116Z/logs/droplet-journal.txt`: nextcloud units 01:20:23–:32; `systemctl --failed` empty at harvest. - Same signature as `234251Z` (pre-#552), where the stack provably came up 20 s after the check quit. - Doors: `id.<apex>` AND apex answered on probe 2/120 this run — #554's gate transformed the finish leg; cert store harvested for the first time (next same-slug drive orders zero). Frontier tooth of #492. files-healthy has NEVER passed on the public path — every prior cause was real and distinct (#527 auth exempt, #529 port collision, #536 silence, #552 one-shot); this closes the remaining timing + observability gap.
Author
Owner

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

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

close-report for #556 — status success

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

envelope
{
  "issue": 556,
  "status": "success",
  "commits": [
    "31a2528b8c6a60ea65dcc4fc38655e920374ca64"
  ],
  "changed_files": [
    "internal/provision/health.go",
    "internal/provision/provision.go",
    "internal/provision/health_test.go",
    "control-plane/cmd/control-plane/compose.go",
    "control-plane/cmd/control-plane/whole_composition.go",
    "control-plane/cmd/control-plane/servicehealth.go",
    "app/tests/e2e/fixtures/provision.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "go test ./internal/provision/ ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/provision/ ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "vue-tsc -p app/tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Part 1 — per-probe observability: each warm-up probe logs one INFO line (attempt N/M, HTTP status/transport error, verdict)": "runCheck now logs one line per probe (attempt/attempts/service/node/verdict + the check's own error, which carries HTTP status/transport/not-asserted) via new provision.WithLogger wired from deps.log in whole_composition.go; the not-asserted error in servicehealth.go now carries the measured body length + floor. Pinned by TestDeploy_WarmupProbesAreLoggedPerAttempt (internal/provision/health_test.go).",
    "Part 2 — budget 3->6 min in productionServiceWarmup (compose.go)": "productionServiceWarmup returns Attempts 36, Delay 10s (36x10s=6min), up from 18x10s; existing warmup seam tests still green (TestDeploy_WarmupReprobeYieldsAHealthyRow / ...ExhaustedStandsFailedWithHonestDetail).",
    "Part 3 — the e2e leg tolerates a standing-then-cleared failure": "expectFilesHealthy (app/tests/e2e/fixtures/provision.ts) polls the files card across FILES_WARMUP_HORIZON_MS (~6 min), driving the failed card's own Retry each poll, and only throws on a failure still standing at the horizon; reader now uses the DDR 0166 structural [data-service=\"files\"]+data-status hook. vue-tsc green."
  },
  "summary": "The deploy-time warm-up re-probe now logs one line per probe, runs a 6-min budget, and the e2e files-healthy leg tolerates a standing-then-cleared warm-up failure via Retry across the same horizon.",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #556 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 556, "status": "success", "commits": [ "31a2528b8c6a60ea65dcc4fc38655e920374ca64" ], "changed_files": [ "internal/provision/health.go", "internal/provision/provision.go", "internal/provision/health_test.go", "control-plane/cmd/control-plane/compose.go", "control-plane/cmd/control-plane/whole_composition.go", "control-plane/cmd/control-plane/servicehealth.go", "app/tests/e2e/fixtures/provision.ts", "STATUS.md" ], "tests": [ { "command": "go test ./internal/provision/ ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/provision/ ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "vue-tsc -p app/tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "Part 1 — per-probe observability: each warm-up probe logs one INFO line (attempt N/M, HTTP status/transport error, verdict)": "runCheck now logs one line per probe (attempt/attempts/service/node/verdict + the check's own error, which carries HTTP status/transport/not-asserted) via new provision.WithLogger wired from deps.log in whole_composition.go; the not-asserted error in servicehealth.go now carries the measured body length + floor. Pinned by TestDeploy_WarmupProbesAreLoggedPerAttempt (internal/provision/health_test.go).", "Part 2 — budget 3->6 min in productionServiceWarmup (compose.go)": "productionServiceWarmup returns Attempts 36, Delay 10s (36x10s=6min), up from 18x10s; existing warmup seam tests still green (TestDeploy_WarmupReprobeYieldsAHealthyRow / ...ExhaustedStandsFailedWithHonestDetail).", "Part 3 — the e2e leg tolerates a standing-then-cleared failure": "expectFilesHealthy (app/tests/e2e/fixtures/provision.ts) polls the files card across FILES_WARMUP_HORIZON_MS (~6 min), driving the failed card's own Retry each poll, and only throws on a failure still standing at the horizon; reader now uses the DDR 0166 structural [data-service=\"files\"]+data-status hook. vue-tsc green." }, "summary": "The deploy-time warm-up re-probe now logs one line per probe, runs a 6-min budget, and the e2e files-healthy leg tolerates a standing-then-cleared warm-up failure via Retry across the same horizon.", "blockers": [], "no_code_change": "" } ``` </details>
ben closed this issue 2026-08-15 01:47:03 +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#556
No description provided.