finish: hand-off/journey-fault locator misses deploy-failed, so a real fault hangs 900s #503

Closed
opened 2026-08-13 03:41:33 +00:00 by ben · 2 comments
Owner

Failure

The finish leg reds at the full FINISH_BUDGET ceiling:

locator: locator('[data-status="hand-off"]').or(locator('[data-status="journey-fault"]'))
Expected: visible
Timeout: 900000ms
Error: element(s) not found

(artifacts/legs.json: {"leg":"finish","status":"red","ms":900056})

But the app is not hung — it is showing the correct fault screen. test-failed-1.png and error-context.md's accessibility snapshot (captured at the 900s timeout) show:

- text: Paired — the server is enrolled as your community's gateway.
- paragraph: The gateway deploy failed.
- paragraph: There is no old operating system to roll back to — this machine was taken over for the community.
- button "Resume the deploy"
- button "Reinstall the agent"
- button "Rescue boot"

artifacts/journey.json is {"rows": null, "fault": null} — the harvest found nothing either, for the same reason below.

Root cause (harness layer, actionable)

This screen is a different, deliberately distinct state from journey-fault. Per ADR 0127, a mid-deploy worker fault (journey-fault, retriable by re-driving stand-up) and a deploy-outcome failure (S11 per-mode recovery: resume/reinstall/rescue-boot) are separate branches. The rescue-boot panel is FoundingDeployOutcome.vue, rendered with data-status="deploy-failed" (not journey-fault), and both standup parents guard it as the sibling of the fault frame: <FoundingDeployOutcome v-if="!standup?.fault" ... /> (FoundingStandupOwnVPS.vue / FoundingStandupPrivate.vue). [data-status="journey-fault"] and [data-status="deploy-failed"] never coexist in the DOM. journey.droplet.spec.ts:270-272 only races hand-off against journey-fault:

const handOff = live.page.locator('[data-status="hand-off"]');
const faultFrame = live.page.locator('[data-status="journey-fault"]');
await expect(handOff.or(faultFrame)).toBeVisible({ timeout: FINISH_BUDGET });

so a genuine deploy-failed outcome is invisible to this assertion and the test burns the entire 900000ms budget instead of reding in seconds — exactly what the test's own comment at spec line 264 says should happen ("a faulted finish reds in seconds, not at the 15m ceiling"). readJourney()/readFault() (tests/e2e/fixtures/journey.ts) likewise only read the folded progress bar and [data-field="fault-line"], neither of which this frame sets (it uses [data-field="failure-headline"] / [data-field="no-rollback"] instead) — hence the null/null harvest.

What triggered the underlying deploy failure (infra layer, not swarm-actionable without droplet access)

The deploy itself genuinely failed at public-entry. logs/founding-state.log (standup.deploy.failure):

"detail": "https://id.rehearsal.idss.nz did not answer over TLS within the first-boot cold-start budget — acme-dns registration and the DNS-01 wildcard issuance gate Caddy's :443 listener (GOTCHAS #15, ADR 0014); resume the deploy to re-probe once it settles"

logs/droplet-journal.txt shows why: acme-dns bound its UDP DNS listener but its HTTP API (127.0.0.1:8081) never came up — no further log line from that process ever again:

acme-dns[986]: Starting DNS listener {"addr": "0.0.0.0:53", "proto": "udp"}
... (nothing else from acme-dns[986], ever)
acme-dns-register-start[987]: acme-dns registration failed: local API http://127.0.0.1:8081 never came up (acme-dns.service listening on loopback?)
systemd[1]: acme-dns-register.service: Consumed 4.499s CPU time over 5min 4.955s wall clock time
systemd[1]: caddy.service: Job caddy.service/start failed with result 'dependency'.

Caddy never started (requires/afters acme-dns-register.service), so the public-entry door probe never got an answer across its own ~600s budget. logs/healer-claude.out shows an automated healer already ran on this exact directory: it fixed an unrelated leg-ordering bug (public-entry false-greening, commit e18c853) and left a residual note on this same acme-dns/TLS failure with confident:false — droplet/DNS timing, not a code defect in this checkout.

Suspected layer

  • Harness (primary, actionable): journey.droplet.spec.ts's finish-leg locator doesn't cover [data-status="deploy-failed"], so a legitimate S11 deploy-outcome fault is indistinguishable from a hang and costs the full 15-minute budget.
  • Infra (secondary, not cleanly actionable from this checkout): acme-dns's HTTP API never bound within its own 300s wait budget, cascading through Caddy's dependency to the public-entry probe. Matches GOTCHAS #15/#22 and ADR 0014/commit 0bfb054's territory; GOTCHAS.md has no entry yet for the journey-fault vs deploy-failed locator-vocabulary split despite ADR 0160 requiring it.

What plugging it needs

Extend the finish-leg assertion to also treat [data-status="deploy-failed"] as a terminal (expected-red) outcome alongside journey-fault — e.g. handOff.or(faultFrame).or(live.page.locator('[data-status="deploy-failed"]')) plus reading [data-field="failure-headline"]/[data-field="no-rollback"] for the failure detail — so a real deploy failure reds in seconds. Separately, add the journey-fault/deploy-failed distinction to docs/GOTCHAS.md per ADR 0160. This is not the known pairing/carrier frontier — pairing and every deploy row before finish are green in artifacts/legs.json.

drive 20260813T025903Z red at finish: `mexpect(mmlocatormm).mtoBeVisiblem(mm)m failed

Locator: locator('[data-status="hand-off"]').or(locator('[data-status="journey-fault"]'))
Expected: visible
Timeout: Nms
Error: element(s) not found

Call log:
m - Expect "toBeVisible" with timeout Nmsm
m - waiting for locator('[data-status="hand-off"]').or(locator('[data-status="journey-fault"]'))mevidence:test-results/…/20260813T025903Z/` on matou-workstation (legs.json, droplet-journal.txt, trace)

## Failure The `finish` leg reds at the full `FINISH_BUDGET` ceiling: ``` locator: locator('[data-status="hand-off"]').or(locator('[data-status="journey-fault"]')) Expected: visible Timeout: 900000ms Error: element(s) not found ``` (`artifacts/legs.json`: `{"leg":"finish","status":"red","ms":900056}`) But the app is not hung — it is showing the correct fault screen. `test-failed-1.png` and `error-context.md`'s accessibility snapshot (captured at the 900s timeout) show: ``` - text: Paired — the server is enrolled as your community's gateway. - paragraph: The gateway deploy failed. - paragraph: There is no old operating system to roll back to — this machine was taken over for the community. - button "Resume the deploy" - button "Reinstall the agent" - button "Rescue boot" ``` `artifacts/journey.json` is `{"rows": null, "fault": null}` — the harvest found nothing either, for the same reason below. ## Root cause (harness layer, actionable) This screen is a **different, deliberately distinct** state from `journey-fault`. Per ADR 0127, a mid-deploy worker fault (`journey-fault`, retriable by re-driving stand-up) and a deploy-outcome failure (S11 per-mode recovery: resume/reinstall/rescue-boot) are separate branches. The rescue-boot panel is `FoundingDeployOutcome.vue`, rendered with **`data-status="deploy-failed"`** (not `journey-fault`), and both standup parents guard it as the sibling of the fault frame: `<FoundingDeployOutcome v-if="!standup?.fault" ... />` (FoundingStandupOwnVPS.vue / FoundingStandupPrivate.vue). `[data-status="journey-fault"]` and `[data-status="deploy-failed"]` never coexist in the DOM. `journey.droplet.spec.ts:270-272` only races `hand-off` against `journey-fault`: ```ts const handOff = live.page.locator('[data-status="hand-off"]'); const faultFrame = live.page.locator('[data-status="journey-fault"]'); await expect(handOff.or(faultFrame)).toBeVisible({ timeout: FINISH_BUDGET }); ``` so a genuine `deploy-failed` outcome is invisible to this assertion and the test burns the entire 900000ms budget instead of reding in seconds — exactly what the test's own comment at spec line 264 says should happen ("a faulted finish reds in seconds, not at the 15m ceiling"). `readJourney()`/`readFault()` (tests/e2e/fixtures/journey.ts) likewise only read the folded progress bar and `[data-field="fault-line"]`, neither of which this frame sets (it uses `[data-field="failure-headline"]` / `[data-field="no-rollback"]` instead) — hence the null/null harvest. ## What triggered the underlying deploy failure (infra layer, not swarm-actionable without droplet access) The deploy itself genuinely failed at `public-entry`. `logs/founding-state.log` (`standup.deploy.failure`): ``` "detail": "https://id.rehearsal.idss.nz did not answer over TLS within the first-boot cold-start budget — acme-dns registration and the DNS-01 wildcard issuance gate Caddy's :443 listener (GOTCHAS #15, ADR 0014); resume the deploy to re-probe once it settles" ``` `logs/droplet-journal.txt` shows why: acme-dns bound its UDP DNS listener but its HTTP API (127.0.0.1:8081) never came up — no further log line from that process ever again: ``` acme-dns[986]: Starting DNS listener {"addr": "0.0.0.0:53", "proto": "udp"} ... (nothing else from acme-dns[986], ever) acme-dns-register-start[987]: acme-dns registration failed: local API http://127.0.0.1:8081 never came up (acme-dns.service listening on loopback?) systemd[1]: acme-dns-register.service: Consumed 4.499s CPU time over 5min 4.955s wall clock time systemd[1]: caddy.service: Job caddy.service/start failed with result 'dependency'. ``` Caddy never started (requires/afters `acme-dns-register.service`), so the public-entry door probe never got an answer across its own ~600s budget. `logs/healer-claude.out` shows an automated healer already ran on this exact directory: it fixed an unrelated leg-ordering bug (public-entry false-greening, commit `e18c853`) and left a `residual` note on this same acme-dns/TLS failure with `confident:false` — droplet/DNS timing, not a code defect in this checkout. ## Suspected layer - **Harness** (primary, actionable): `journey.droplet.spec.ts`'s finish-leg locator doesn't cover `[data-status="deploy-failed"]`, so a legitimate S11 deploy-outcome fault is indistinguishable from a hang and costs the full 15-minute budget. - **Infra** (secondary, not cleanly actionable from this checkout): acme-dns's HTTP API never bound within its own 300s wait budget, cascading through Caddy's dependency to the public-entry probe. Matches GOTCHAS #15/#22 and ADR 0014/commit `0bfb054`'s territory; GOTCHAS.md has no entry yet for the `journey-fault` vs `deploy-failed` locator-vocabulary split despite ADR 0160 requiring it. ## What plugging it needs Extend the finish-leg assertion to also treat `[data-status="deploy-failed"]` as a terminal (expected-red) outcome alongside `journey-fault` — e.g. `handOff.or(faultFrame).or(live.page.locator('[data-status="deploy-failed"]'))` plus reading `[data-field="failure-headline"]`/`[data-field="no-rollback"]` for the failure detail — so a real deploy failure reds in seconds. Separately, add the `journey-fault`/`deploy-failed` distinction to `docs/GOTCHAS.md` per ADR 0160. This is not the known pairing/carrier frontier — pairing and every deploy row before `finish` are green in `artifacts/legs.json`. drive `20260813T025903Z` red at `finish`: `mexpect(mmlocatormm).mtoBeVisiblem(mm)m failed Locator: locator('[data-status="hand-off"]').or(locator('[data-status="journey-fault"]')) Expected: visible Timeout: Nms Error: element(s) not found Call log: m - Expect "toBeVisible" with timeout Nmsm m - waiting for locator('[data-status="hand-off"]').or(locator('[data-status="journey-fault"]'))m` evidence: `test-results/…/20260813T025903Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) <!-- rehearsal-sig: 8d0cd71d20a2 -->
Author
Owner

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

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

close-report for #503 — status success

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

envelope
{
  "issue": 503,
  "status": "success",
  "commits": [
    "c7c3475"
  ],
  "changed_files": [
    "app/tests/e2e/fixtures/journey.ts",
    "app/tests/e2e/journey.droplet.spec.ts",
    "docs/GOTCHAS.md",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "OC_E2E_RUN_DIR=/tmp/fakerun OC_E2E_SPEC=journey.droplet.spec.ts npx playwright test --list",
      "exit_code": 0
    }
  ],
  "criteria": {
    "finish leg also treats [data-status=\"deploy-failed\"] as a terminal (expected-red) outcome so a real deploy failure reds in seconds": "app/tests/e2e/journey.droplet.spec.ts — finish leg now races handOff.or(faultFrame).or(deployFailed) and throws a loud red when the deploy-failed frame is up (commit c7c3475)",
    "read [data-field=\"failure-headline\"]/[data-field=\"no-rollback\"] for the failure detail": "new readDeployFailure() in app/tests/e2e/fixtures/journey.ts reads both fields off the deploy-failed frame; the spec surfaces headline + noRollback in the thrown error",
    "add the journey-fault/deploy-failed distinction to docs/GOTCHAS.md per ADR 0160": "docs/GOTCHAS.md entry #25 records the two-distinct-terminal-frames vocabulary split with Symptom/Cause/Rule (commit c7c3475)"
  },
  "summary": "The rehearsal finish leg now races the deploy-failed outcome frame alongside journey-fault, so a genuine gateway deploy failure reds in seconds with its own failure detail instead of burning the full 900s budget.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #503 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 503, "status": "success", "commits": [ "c7c3475" ], "changed_files": [ "app/tests/e2e/fixtures/journey.ts", "app/tests/e2e/journey.droplet.spec.ts", "docs/GOTCHAS.md", "STATUS.md" ], "tests": [ { "command": "npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "OC_E2E_RUN_DIR=/tmp/fakerun OC_E2E_SPEC=journey.droplet.spec.ts npx playwright test --list", "exit_code": 0 } ], "criteria": { "finish leg also treats [data-status=\"deploy-failed\"] as a terminal (expected-red) outcome so a real deploy failure reds in seconds": "app/tests/e2e/journey.droplet.spec.ts — finish leg now races handOff.or(faultFrame).or(deployFailed) and throws a loud red when the deploy-failed frame is up (commit c7c3475)", "read [data-field=\"failure-headline\"]/[data-field=\"no-rollback\"] for the failure detail": "new readDeployFailure() in app/tests/e2e/fixtures/journey.ts reads both fields off the deploy-failed frame; the spec surfaces headline + noRollback in the thrown error", "add the journey-fault/deploy-failed distinction to docs/GOTCHAS.md per ADR 0160": "docs/GOTCHAS.md entry #25 records the two-distinct-terminal-frames vocabulary split with Symptom/Cause/Rule (commit c7c3475)" }, "summary": "The rehearsal finish leg now races the deploy-failed outcome frame alongside journey-fault, so a genuine gateway deploy failure reds in seconds with its own failure detail instead of burning the full 900s budget.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
ben closed this issue 2026-08-13 03:46:56 +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#503
No description provided.