sign-in: [data-status="credential-enrolled"] is unreachable — the hand-off auto-completes over it #1466

Closed
opened 2026-09-14 14:07:12 +00:00 by matou-build-agent · 2 comments

Not the known frontier

The brief names the KNOWN frontier as "pairing never flips — the own-VPS carrier issue named in legs.json's skip reasons". That premise is stale for this run. artifacts/legs.json records pair as green and carries no skip reasons at all:

{ "leg": "pair", "status": "green", "ms": 198 },
{ "leg": "mesh", "status": "green", "ms": 183 },
"legs": { "total": 17, "green": 16, "red": 1, "skip": 0 },
"firstRedLeg": "sign-in",
"commit": "4e3b13ce617515f006d293c938dca013e728e1fe"

The drive founded the community cleanly (16/16 green through finish) and died on new ground at sign-in. This is a fresh red, not the carrier frontier.

The failure

artifacts/legs.json, leg sign-in, 129515 ms:

expect(locator).toBeVisible() failed
Locator: locator('[data-status="credential-enrolled"]')
Expected: visible
Timeout: 120000ms
Error: element(s) not found

The credential DID land — the marker is what's missing

The kanidm ceremony fully succeeded. logs/droplet-journal.txt:

Sep 14 13:59:39 gateway kanidmd[1159]: 810fdfaa-… INFO request … uri: /ui/api/cu_commit … status_code: 200
Sep 14 13:59:39 gateway kanidmd[1159]: 810fdfaa-… INFO ┝━ handle_idmcredentialupdatecommit [ 6.49ms | 95.84% ]
Sep 14 13:59:39 gateway kanidmd[1159]: d2b7a778-… INFO request … uri: /ui/login … status_code: 200

The drive's own ceremony capture confirms the password is on the account (trace stdout, reset-3): "Password CHANGE PASSWORD", then reset-done @ https://id.rehearsal-f.idss.nz/ui/login.

The helper's poll saw it and stopped. Every _credential/_status request in the whole journal:

Sep 14 13:59:37
Sep 14 13:59:39
Sep 14 13:59:41

Three polls, 2 s apart (the documented cadence), the last one 1.5 s after the commit — then silence for the remaining 120 s. The poll terminated because it succeeded.

Why the marker was never visible: it is destroyed within one IPC round-trip

app/src/components/founding/FoundingHandOff.vue:12 wraps the entire pre-landing screen, including the confirmation, in a branch that done tears down:

<template v-if="!landed">
<p v-if="enrolment.registered" class="oc-hand-off__enrol" data-status="credential-enrolled">

with const landed = computed(() => props.handOff.done === true);

app/src/components/founding/FoundingStandup.vue sets done the instant the credential lands — onOpenDashboard:

const view = await props.client.enrolPasskey();
standup.value = view.standup ?? null;   // enrolment.registered = true
await maybeFinish();                     // → completeHandOff() → done = true

maybeFinish()'s only brake is the recovery-kit offer:

if (!ho || !ho.enrolment.registered || ho.kit.resolution === 'offered' || ho.done) return;
const view = await props.client.completeHandOff();

…and that brake is released before the ceremony even starts. Ben's 2026-09-12 ruling removed the kit offer from the screen, so the surface now auto-defers it the moment the hand-off opens:

let kitDeferred = false;
watch(
  () => standup.value?.handOff?.kit.resolution,
  (resolution) => {
    if (resolution !== 'offered' || kitDeferred) return;
    kitDeferred = true;
    run(onLater);          // → declineRecoveryKit() → maybeFinish()
  },
);

So by enrolment time kit.resolution === 'declined', and registered → done is separated only by the completeHandOff round-trip. The scrub demonstrably ran: state/founding-state.json is absent (cat: … No such file or directory) — CompleteHandOff sets stateFileDeleted and ho.Done = true (internal/founding/handoff.go:747).

The failure screenshot is the proof of which branch won. artifacts/legs/sign-in-w1.png and the error-context snapshot show the landed branch (data-status="hand-off-complete"), with neither marker present:

- paragraph: E2E Drive is all set. Founding is complete — you land on Operator home.
- text: "Your gateway is on the fleet: node-req-0001 · gateway · healthy."
- button "Enter your community →"

enrol-pending asserted visible earlier in the same leg and passed, so landed was false then — it flipped during the ceremony.

The timing that makes it deterministic here

From trace.zip (test.trace), the drive clicks Save Changes, then registerPassword sleeps before returning:

00:15:29.263 → 00:15:29.298  click "Save Changes"
00:15:29.300 → 00:15:31.301  waitTimeout 2000
00:15:31.303 → 00:15:31.361  screenshot reset-done.png
00:15:31.367 → 00:17:31.372  expect  ← the full 120 s, element never found

The helper's winning poll (13:59:41) falls inside registerPassword's own 2 s wait. The app flips registered → done during that sleep, and the assertion only starts looking at 00:15:31.367 — after the confirmation has already been torn down, waiting 120 s for a state the app can never re-enter.

Suspected layer

Product, with a harness assertion that encodes the vanished contract.

The product defect is real independent of the test: FoundingHandOff.vue's own comment states the intent — "Only the enrolled confirmation renders here, after the ceremony" — but no operator can ever read it. Removing the kit offer deleted the only thing that used to hold the hand-off at registered (previously maybeFinish() returned early on kit.resolution === 'offered' and the screen sat showing credential-enrolled until the operator resolved the kit). Auto-deferring the kit collapsed that pause to one IPC round-trip, making a specified confirmation unreachable. Ben's ruling removed the kit offer, not the credential confirmation — so this is collateral, not the ruling's intent.

What plugging it needs

  1. Product (the defect): carry the enrolled confirmation across the landing so it survives the scrub — render credential-enrolled in the v-else hand-off-complete branch of FoundingHandOff.vue too (it reads enrolment.registered / enrolment.account, both still present on the completed view), rather than only inside v-if="!landed". That restores a confirmation the operator can actually read and makes the marker terminal instead of transient.
  2. Harness: once the marker is terminal the existing assertion passes unchanged. If instead the decision is that founding should land silently, the three journey specs asserting this transient marker must be retargeted together — journey.droplet.spec.ts:508, journey.selfhosted.spec.ts:528, journey.device.spec.ts:1256 — to assert hand-off-complete plus the enrolled account field. They will all race the same way on any run where the helper's 2 s poll lands inside registerPassword's 2 s wait.

Live box at 168.144.168.195 answered throughout (systemctl --failed clean, kanidmd active since 13:51:10, listening on 127.0.0.1:8443, /status → true), which is what rules out an infra cause: nothing failed on the droplet, and the credential is committed. The logs/guest-*.log files are all ssh: connect to host 127.0.0.1 port 44097: Connection refused — expected noise, they harvest the local qemu guest which this droplet drive never stands up (host.json: "qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT").

drive 20260914T134258Z red at sign-in: expect(locator).toBeVisible() failed Locator: locator('[data-status="credential-enrolled"]') Expected: visible Timeout: 120000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeo
evidence: /home/swarm/session-runner/idss/test-results/drive-droplet/20260914T134258Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Not the known frontier The brief names the KNOWN frontier as "pairing never flips — the own-VPS carrier issue named in legs.json's skip reasons". **That premise is stale for this run.** `artifacts/legs.json` records `pair` as green and carries *no skip reasons at all*: ```json { "leg": "pair", "status": "green", "ms": 198 }, { "leg": "mesh", "status": "green", "ms": 183 }, ``` ```json "legs": { "total": 17, "green": 16, "red": 1, "skip": 0 }, "firstRedLeg": "sign-in", "commit": "4e3b13ce617515f006d293c938dca013e728e1fe" ``` The drive founded the community cleanly (16/16 green through `finish`) and died on new ground at `sign-in`. This is a fresh red, not the carrier frontier. ## The failure `artifacts/legs.json`, leg `sign-in`, 129515 ms: ``` expect(locator).toBeVisible() failed Locator: locator('[data-status="credential-enrolled"]') Expected: visible Timeout: 120000ms Error: element(s) not found ``` ## The credential DID land — the marker is what's missing The kanidm ceremony fully succeeded. `logs/droplet-journal.txt`: ``` Sep 14 13:59:39 gateway kanidmd[1159]: 810fdfaa-… INFO request … uri: /ui/api/cu_commit … status_code: 200 Sep 14 13:59:39 gateway kanidmd[1159]: 810fdfaa-… INFO ┝━ handle_idmcredentialupdatecommit [ 6.49ms | 95.84% ] Sep 14 13:59:39 gateway kanidmd[1159]: d2b7a778-… INFO request … uri: /ui/login … status_code: 200 ``` The drive's own ceremony capture confirms the password is on the account (`trace stdout`, `reset-3`): `"Password CHANGE PASSWORD"`, then `reset-done @ https://id.rehearsal-f.idss.nz/ui/login`. The helper's poll saw it and **stopped**. Every `_credential/_status` request in the whole journal: ``` Sep 14 13:59:37 Sep 14 13:59:39 Sep 14 13:59:41 ``` Three polls, 2 s apart (the documented cadence), the last one 1.5 s *after* the commit — then silence for the remaining 120 s. The poll terminated because it succeeded. ## Why the marker was never visible: it is destroyed within one IPC round-trip `app/src/components/founding/FoundingHandOff.vue:12` wraps the entire pre-landing screen, **including the confirmation**, in a branch that `done` tears down: ```vue <template v-if="!landed"> ``` ```vue <p v-if="enrolment.registered" class="oc-hand-off__enrol" data-status="credential-enrolled"> ``` with `const landed = computed(() => props.handOff.done === true);` `app/src/components/founding/FoundingStandup.vue` sets `done` the instant the credential lands — `onOpenDashboard`: ```ts const view = await props.client.enrolPasskey(); standup.value = view.standup ?? null; // enrolment.registered = true await maybeFinish(); // → completeHandOff() → done = true ``` `maybeFinish()`'s only brake is the recovery-kit offer: ```ts if (!ho || !ho.enrolment.registered || ho.kit.resolution === 'offered' || ho.done) return; const view = await props.client.completeHandOff(); ``` …and that brake is released before the ceremony even starts. Ben's 2026-09-12 ruling removed the kit offer from the screen, so the surface now auto-defers it the moment the hand-off opens: ```ts let kitDeferred = false; watch( () => standup.value?.handOff?.kit.resolution, (resolution) => { if (resolution !== 'offered' || kitDeferred) return; kitDeferred = true; run(onLater); // → declineRecoveryKit() → maybeFinish() }, ); ``` So by enrolment time `kit.resolution === 'declined'`, and `registered → done` is separated only by the `completeHandOff` round-trip. The scrub demonstrably ran: **`state/founding-state.json` is absent** (`cat: … No such file or directory`) — `CompleteHandOff` sets `stateFileDeleted` and `ho.Done = true` (`internal/founding/handoff.go:747`). The failure screenshot is the proof of which branch won. `artifacts/legs/sign-in-w1.png` and the error-context snapshot show the **landed** branch (`data-status="hand-off-complete"`), with *neither* marker present: ```yaml - paragraph: E2E Drive is all set. Founding is complete — you land on Operator home. - text: "Your gateway is on the fleet: node-req-0001 · gateway · healthy." - button "Enter your community →" ``` `enrol-pending` asserted visible earlier in the same leg and passed, so `landed` was false then — it flipped *during* the ceremony. ## The timing that makes it deterministic here From `trace.zip` (`test.trace`), the drive clicks Save Changes, then `registerPassword` sleeps before returning: ``` 00:15:29.263 → 00:15:29.298 click "Save Changes" 00:15:29.300 → 00:15:31.301 waitTimeout 2000 00:15:31.303 → 00:15:31.361 screenshot reset-done.png 00:15:31.367 → 00:17:31.372 expect ← the full 120 s, element never found ``` The helper's winning poll (13:59:41) falls *inside* `registerPassword`'s own 2 s wait. The app flips `registered → done` during that sleep, and the assertion only starts looking at `00:15:31.367` — after the confirmation has already been torn down, waiting 120 s for a state the app can never re-enter. ## Suspected layer **Product, with a harness assertion that encodes the vanished contract.** The product defect is real independent of the test: `FoundingHandOff.vue`'s own comment states the intent — *"Only the enrolled confirmation renders here, after the ceremony"* — but no operator can ever read it. Removing the kit offer deleted the only thing that used to hold the hand-off at `registered` (previously `maybeFinish()` returned early on `kit.resolution === 'offered'` and the screen sat showing `credential-enrolled` until the operator resolved the kit). Auto-deferring the kit collapsed that pause to one IPC round-trip, making a specified confirmation unreachable. Ben's ruling removed the *kit* offer, not the *credential* confirmation — so this is collateral, not the ruling's intent. ## What plugging it needs 1. **Product (the defect):** carry the enrolled confirmation across the landing so it survives the scrub — render `credential-enrolled` in the `v-else` `hand-off-complete` branch of `FoundingHandOff.vue` too (it reads `enrolment.registered` / `enrolment.account`, both still present on the completed view), rather than only inside `v-if="!landed"`. That restores a confirmation the operator can actually read and makes the marker terminal instead of transient. 2. **Harness:** once the marker is terminal the existing assertion passes unchanged. If instead the decision is that founding should land silently, the three journey specs asserting this transient marker must be retargeted together — `journey.droplet.spec.ts:508`, `journey.selfhosted.spec.ts:528`, `journey.device.spec.ts:1256` — to assert `hand-off-complete` plus the enrolled account field. They will all race the same way on any run where the helper's 2 s poll lands inside `registerPassword`'s 2 s wait. Live box at 168.144.168.195 answered throughout (`systemctl --failed` clean, `kanidmd` active since 13:51:10, listening on 127.0.0.1:8443, `/status` → `true`), which is what rules out an infra cause: nothing failed on the droplet, and the credential is committed. The `logs/guest-*.log` files are all `ssh: connect to host 127.0.0.1 port 44097: Connection refused` — expected noise, they harvest the local qemu guest which this droplet drive never stands up (`host.json`: `"qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT"`). drive `20260914T134258Z` red at `sign-in`: `expect(locator).toBeVisible() failed Locator: locator('[data-status="credential-enrolled"]') Expected: visible Timeout: 120000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeo` evidence: `/home/swarm/session-runner/idss/test-results/drive-droplet/20260914T134258Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: e689ed304acb -->
Author
Member

swarm-claim host=bens-mac-04 run=23852
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=23852 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1466 — status success

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

envelope
{
  "issue": 1466,
  "status": "success",
  "commits": [
    "4c778a42"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src/components/founding/FoundingHandOff.vue",
    "app/tests/unit/foundingHandOff.test.ts"
  ],
  "tests": [
    {
      "command": "node node_modules/vitest/vitest.mjs run tests/unit/founding (app)",
      "exit_code": 0
    },
    {
      "command": "node node_modules/vue-tsc/bin/vue-tsc.js -p tsconfig.json --noEmit (app)",
      "exit_code": 0
    },
    {
      "command": "node node_modules/eslint/bin/eslint.js app/src/components/founding/FoundingHandOff.vue app/tests/unit/foundingHandOff.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Product defect: the credential-enrolled confirmation is unreachable because it renders only inside v-if=\"!landed\", which the `done` teardown tears down": "Fixed in app/src/components/founding/FoundingHandOff.vue (commit 4c778a42) — the enrolled <p data-status=\"credential-enrolled\"> now also renders in the v-else hand-off-complete branch, reading enrolment.registered / enrolment.account which complete-hand-off leaves intact (ADR 0044). The marker is now terminal, not transient.",
    "Seam proof: the marker survives the landing": "New red→green test in app/tests/unit/foundingHandOff.test.ts — 'the credential-enrolled confirmation survives the landing' — asserts [data-status=\"credential-enrolled\"] and its [data-field=\"enrol-account\"] are still present on the [data-status=\"hand-off-complete\"] landed screen. Verified red before the component change, green after (vitest run exit 0).",
    "Harness: the three journey specs asserting the marker pass unchanged": "Issue item 2 (first option) — a terminal marker satisfies the existing toBeVisible assertions at journey.droplet.spec.ts:514, journey.selfhosted.spec.ts:592, journey.device.spec.ts:1256; no spec change was required and none was made."
  },
  "summary": "Rendered the founding hand-off's credential-enrolled confirmation in the landed hand-off-complete branch too, so the specified marker is terminal instead of being torn down within one IPC round-trip.",
  "blockers": []
}
**close-report** for #1466 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1466, "status": "success", "commits": [ "4c778a42" ], "changed_files": [ "STATUS.md", "app/src/components/founding/FoundingHandOff.vue", "app/tests/unit/foundingHandOff.test.ts" ], "tests": [ { "command": "node node_modules/vitest/vitest.mjs run tests/unit/founding (app)", "exit_code": 0 }, { "command": "node node_modules/vue-tsc/bin/vue-tsc.js -p tsconfig.json --noEmit (app)", "exit_code": 0 }, { "command": "node node_modules/eslint/bin/eslint.js app/src/components/founding/FoundingHandOff.vue app/tests/unit/foundingHandOff.test.ts", "exit_code": 0 } ], "criteria": { "Product defect: the credential-enrolled confirmation is unreachable because it renders only inside v-if=\"!landed\", which the `done` teardown tears down": "Fixed in app/src/components/founding/FoundingHandOff.vue (commit 4c778a42) — the enrolled <p data-status=\"credential-enrolled\"> now also renders in the v-else hand-off-complete branch, reading enrolment.registered / enrolment.account which complete-hand-off leaves intact (ADR 0044). The marker is now terminal, not transient.", "Seam proof: the marker survives the landing": "New red→green test in app/tests/unit/foundingHandOff.test.ts — 'the credential-enrolled confirmation survives the landing' — asserts [data-status=\"credential-enrolled\"] and its [data-field=\"enrol-account\"] are still present on the [data-status=\"hand-off-complete\"] landed screen. Verified red before the component change, green after (vitest run exit 0).", "Harness: the three journey specs asserting the marker pass unchanged": "Issue item 2 (first option) — a terminal marker satisfies the existing toBeVisible assertions at journey.droplet.spec.ts:514, journey.selfhosted.spec.ts:592, journey.device.spec.ts:1256; no spec change was required and none was made." }, "summary": "Rendered the founding hand-off's credential-enrolled confirmation in the landed hand-off-complete branch too, so the specified marker is terminal instead of being torn down within one IPC round-trip.", "blockers": [] } ``` </details>
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#1466
No description provided.