deploy-files: the deploy-status poll reds setup-error on ONE 502 during deploy-services — the stage that restarts the very control plane it polls #835

Closed
opened 2026-08-25 16:13:25 +00:00 by ben · 2 comments
Owner

Filed from the #722 watch (reporter token-limited again). Drive 20260825T071850Z (droplet regression), red deploy-files at 18/19 green: the dashboard's deploy surface flipped [data-status="setup-error"] with "control plane responded 502" — and the journal proves the 502 was the deploy's OWN restart window, not a failure:

  • 07:26:43 control plane healthy (deployed by the seed; the earlier 127 crash-loop is the normal pre-seed window — /srv/idss/bin/control-plane lands with the seed).
  • 07:29:05 systemd: Stopping idss-control-plane.service… Deactivated successfully — the services-deploy's switch-to-configuration restarting the control plane to apply the files closure (its final stats: 2.1G mem peak, 1.4G written — it was mid-build work).
  • 07:29:06 caddy: dial tcp 127.0.0.1:8080: connection refused → the app's status poll got the 502 IN THE GAP and the setup card declared failure.

The defect

The deploy-status poll treats a single 5xx/refused as terminal setup-error during deploy-services — a stage whose defining act includes restarting the control plane it is polling. Same family as GOTCHAS #62/#68/#714: our own watcher misreading the switch. A member of the restart-tolerance already exists on other probes (pollReady, the #426 reconnect window) — the deploy poll needs the same bounded tolerance (e.g. 5xx/refused tolerated for ~60–120 s during deploy-services before conceding; a persistent refusal still reds honestly).

The e2e fixture (provision.ts:281–306) rightly trusts the card — fix the card's verdict, not the fixture.

Blocks #722 (attached). Evidence: test-results/drive-droplet/20260825T071850Z/logs/droplet-journal.txt lines ~1690–2000 on matou-workstation.

Filed from the #722 watch (reporter token-limited again). Drive `20260825T071850Z` (droplet regression), red `deploy-files` at 18/19 green: the dashboard's deploy surface flipped `[data-status="setup-error"]` with **"control plane responded 502"** — and the journal proves the 502 was the deploy's OWN restart window, not a failure: - `07:26:43` control plane healthy (deployed by the seed; the earlier 127 crash-loop is the normal pre-seed window — `/srv/idss/bin/control-plane` lands with the seed). - `07:29:05` systemd: `Stopping idss-control-plane.service… Deactivated successfully` — the services-deploy's `switch-to-configuration` restarting the control plane to apply the files closure (its final stats: 2.1G mem peak, 1.4G written — it was mid-build work). - `07:29:06` caddy: `dial tcp 127.0.0.1:8080: connection refused` → the app's status poll got the 502 IN THE GAP and the setup card declared failure. ## The defect The deploy-status poll treats a single 5xx/refused as terminal `setup-error` **during `deploy-services` — a stage whose defining act includes restarting the control plane it is polling**. Same family as GOTCHAS #62/#68/#714: our own watcher misreading the switch. A member of the restart-tolerance already exists on other probes (`pollReady`, the #426 reconnect window) — the deploy poll needs the same bounded tolerance (e.g. 5xx/refused tolerated for ~60–120 s during deploy-services before conceding; a persistent refusal still reds honestly). The e2e fixture (`provision.ts:281–306`) rightly trusts the card — fix the card's verdict, not the fixture. Blocks #722 (attached). Evidence: `test-results/drive-droplet/20260825T071850Z/logs/droplet-journal.txt` lines ~1690–2000 on matou-workstation.

swarm-claim host=elitebook-distributed-server-03 run=10073
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=10073 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #835 — status success

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

envelope
{
  "issue": 835,
  "status": "success",
  "commits": [
    "d022f85"
  ],
  "changed_files": [
    "dashboard/src/lib/api/provisionClient.ts",
    "dashboard/tests/unit/provisionDeployRestartTolerance.test.ts",
    "docs/GOTCHAS.md",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/unit/provisionDeployRestartTolerance.test.ts",
      "exit_code": 0
    },
    {
      "command": "npx vitest run (full dashboard suite, 1081 tests)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "npx eslint provisionClient.ts + the new test",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The deploy-status poll must NOT red setup-error on a single transient 5xx/refused during the deploy-services control-plane restart": "provisionClient.ts pollToCompletion now rides out isRestartBlip errors for restartToleranceMs (90s); test 'tolerates a transient 502 in the restart gap and settles on the deploy outcome' + 'tolerates a raw connection-refused blip' pass (d022f85)",
    "A persistent refusal past the tolerance window still reds honestly": "test 'a persistent refusal past the tolerance window still reds honestly' asserts deploy() rejects /502/ (d022f85)",
    "A definitive non-restart error (4xx) still reds at once": "test 'a definitive 4xx (not the restart signature) reds at once' passes; isRestartBlip returns false for status < 500 (d022f85)",
    "Fix the card's verdict, not the e2e fixture": "no change to app/tests/e2e/fixtures/provision.ts; the fix lives entirely in the poll (dashboard/src/lib/api/provisionClient.ts)"
  },
  "summary": "The deploy-status poll now rides out the ~1s deploy-services control-plane restart (bounded 90s 5xx/refused tolerance) instead of reding setup-error on one 502, matching the pollReady/#426 precedent.",
  "blockers": []
}
**close-report** for #835 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 835, "status": "success", "commits": [ "d022f85" ], "changed_files": [ "dashboard/src/lib/api/provisionClient.ts", "dashboard/tests/unit/provisionDeployRestartTolerance.test.ts", "docs/GOTCHAS.md", "STATUS.md" ], "tests": [ { "command": "npx vitest run tests/unit/provisionDeployRestartTolerance.test.ts", "exit_code": 0 }, { "command": "npx vitest run (full dashboard suite, 1081 tests)", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "npx eslint provisionClient.ts + the new test", "exit_code": 0 } ], "criteria": { "The deploy-status poll must NOT red setup-error on a single transient 5xx/refused during the deploy-services control-plane restart": "provisionClient.ts pollToCompletion now rides out isRestartBlip errors for restartToleranceMs (90s); test 'tolerates a transient 502 in the restart gap and settles on the deploy outcome' + 'tolerates a raw connection-refused blip' pass (d022f85)", "A persistent refusal past the tolerance window still reds honestly": "test 'a persistent refusal past the tolerance window still reds honestly' asserts deploy() rejects /502/ (d022f85)", "A definitive non-restart error (4xx) still reds at once": "test 'a definitive 4xx (not the restart signature) reds at once' passes; isRestartBlip returns false for status < 500 (d022f85)", "Fix the card's verdict, not the e2e fixture": "no change to app/tests/e2e/fixtures/provision.ts; the fix lives entirely in the poll (dashboard/src/lib/api/provisionClient.ts)" }, "summary": "The deploy-status poll now rides out the ~1s deploy-services control-plane restart (bounded 90s 5xx/refused tolerance) instead of reding setup-error on one 502, matching the pollReady/#426 precedent.", "blockers": [] } ``` </details>
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#835
No description provided.