private-path resume spec (and the undriven reapply drive) still ride the legacy ceremony sink — same #425 rework owed, reds guaranteed on next drive #750

Closed
opened 2026-08-24 18:20:12 +00:00 by ben · 3 comments
Owner

The #425 / DDR 0163 app-window ceremony rework landed for the founding prefix and both provisioning tails on 2026-08-24 (a18375b, 530c903) and is proven green live (drives 20260824T144614Z founding, 20260824T173904Z nextcloud). Two sibling specs still carry the LEGACY sink flow and will red exactly the way the founding spec did (waitForResetUrl times out — the reset url no longer crosses to the helper's open sink) when next driven:

  • app/tests/e2e/private-path-tail.resume.spec.ts — still imports kanidmOrigin/waitForResetUrl and reads live.resetUrls().
  • app/tests/e2e/settings-brand-reapply.live.spec.ts — its ceremony half received the tail changes (transplant + external-browser dash) but has not been driven since; treat its first --drive reapply red as expected calibration, not regression.

The rework recipe (proven twice)

  1. Catch the app's own window: openAppCeremonyWindow(live.app, () => click open-your-dashboard, 3m, runDir); attachAuthenticator(page); resetUrl = page.url(); origin = ceremonyWindowOrigin(resetUrl) (fixtures/ceremony.ts).
  2. registerPasskey(session, resetUrl, runDir) — it already skips re-navigation for the app window.
  3. Brand byte-asserts must fetch IN-PAGE (imageBytes()), never page.request (GOTCHAS #78 — the pinned CA is invisible to Playwright's request stack).
  4. Anything that must visit files.<apex> rides the EXTERNAL Chromium with transplantCredentials(session, ext) first — the app ceremony session pins cert verification to the IdP origin (GOTCHAS #79 sibling; see provision-nextcloud.live.spec.ts).
  5. oidcSignInAsOperator assumes the caller already did goto(doorPath(door,'/login')) (#562 contract).

Proof

Live only — the resume drive needs a laptop/host with KVM and the private-path payload (scripts/smoke-private-path.sh machinery; the resume spec rides scripts/resume-private-path-tail.sh). Unprovable in the Sandcastle sandbox (#377).

The #425 / DDR 0163 app-window ceremony rework landed for the founding prefix and both provisioning tails on 2026-08-24 (`a18375b`, `530c903`) and is proven green live (drives `20260824T144614Z` founding, `20260824T173904Z` nextcloud). Two sibling specs still carry the LEGACY sink flow and will red exactly the way the founding spec did (`waitForResetUrl` times out — the reset url no longer crosses to the helper's open sink) when next driven: - **`app/tests/e2e/private-path-tail.resume.spec.ts`** — still imports `kanidmOrigin`/`waitForResetUrl` and reads `live.resetUrls()`. - **`app/tests/e2e/settings-brand-reapply.live.spec.ts`** — its ceremony half received the tail changes (transplant + external-browser dash) but has not been driven since; treat its first `--drive reapply` red as expected calibration, not regression. ## The rework recipe (proven twice) 1. Catch the app's own window: `openAppCeremonyWindow(live.app, () => click open-your-dashboard, 3m, runDir)`; `attachAuthenticator(page)`; `resetUrl = page.url()`; `origin = ceremonyWindowOrigin(resetUrl)` (fixtures/ceremony.ts). 2. `registerPasskey(session, resetUrl, runDir)` — it already skips re-navigation for the app window. 3. Brand byte-asserts must fetch IN-PAGE (`imageBytes()`), never `page.request` (GOTCHAS #78 — the pinned CA is invisible to Playwright's request stack). 4. Anything that must visit `files.<apex>` rides the EXTERNAL Chromium with `transplantCredentials(session, ext)` first — the app ceremony session pins cert verification to the IdP origin (GOTCHAS #79 sibling; see provision-nextcloud.live.spec.ts). 5. `oidcSignInAsOperator` assumes the caller already did `goto(doorPath(door,'/login'))` (#562 contract). ## Proof Live only — the resume drive needs a laptop/host with KVM and the private-path payload (`scripts/smoke-private-path.sh` machinery; the resume spec rides `scripts/resume-private-path-tail.sh`). Unprovable in the Sandcastle sandbox (#377).

Ruled by agent under ADR 0174 — veto anytime

The two-way part landed: 1774f6e8. The one-way residue is a live drive on your laptop, so this goes ready-for-human for that single act.

What landed

private-path-tail.resume.spec.ts — reworked to the twice-proven recipe. It now catches the app's own window (openAppCeremonyWindow(live.app, () => click open-your-dashboard, 3m, live.runDir)), attaches the CDP virtual authenticator to THAT page, reads resetUrl off the window itself, and validates it with ceremonyWindowOrigin instead of the localhost-pinned kanidmOrigin. Registration and sign-in drive the PasskeySession.

Two deviations from the recipe as written, both deliberate:

  • No external Chromium and no transplantCredentials (recipe step 4). This tail never visits files.<apex> — it does the ceremony, defers the kit, and lands on Operator home, all in the app. There is nothing to transplant into, so launching a second browser would be dead weight.
  • No in-page byte-fetch change needed (step 3). The brand byte-asserts here are loginWithPasskey's expectDomainLogo, which already fetches through imageBytes() — a18375b fixed that inside the fixture, so this spec inherits it.

Step 5 (oidcSignInAsOperator's goto contract) does not apply — this spec never calls it.

Also gone: the mid-test closeCeremonyBrowser and afterAll's ceremony branch. The app window closes with the app, exactly as foundingPrefix leaves it, and private-path.live.spec.ts proves that same ordering green (it clicks later with the window still open).

A guard, as the red-before-green. ceremony.test.ts gained "the retired open-sink ceremony has no spec caller" — it scans every tests/e2e/*.spec.ts for waitForResetUrl/kanidmOrigin/resetUrls. It failed first, naming exactly one offender:

expected [ private-path-tail.resume.spec.ts ] to deeply equal []

That is the whole point of the guard: this class of drift cost two commits of invisibility and would have cost a founding drive's wall clock to discover, because the failure mode is waitForResetUrl burning its full ceiling and reding two minutes deep. Now it is a one-second file scan. waitForResetUrl/kanidmOrigin/resetUrls() stay exported and unit-tested — the helper still writes the sink — but no e2e spec may drive a ceremony through them.

settings-brand-reapply.live.spec.ts — audited, NO change owed. The guard cleared it independently of my reading of it: its ceremony half took both rework commits (a18375b, 530c903), it already does transplantCredentials(prefix.session, ext) before the external-browser dash, and its brand assertions ride assertNextcloudTheming (occ over ssh) and assertBrandedLogin (fresh incognito off the external browser) — neither touches page.request. Confirming the ticket's own call: it is undriven, not broken, so its first --drive reapply red is calibration.

ceremony.ts — two stale notes corrected. These are why the drift went unseen, so they are in scope rather than tidying:

  • the module header still read "#425 / DDR 0163 — LIVE-LAB REWORK PENDING (human-gated)" and told the reader waitForResetUrl "will time out on a real drive" as a future condition. It now records the rework as landed, names both green drives, and points at the guard.
  • openAppCeremonyWindow's docblock still claimed "Passkey coverage stays live on the private path, whose external Chromium openCeremonyBrowser still attaches the authenticator per-target" — false since a18375b, and precisely the sentence that would mislead the next person doing this rework. It now separates the two paths honestly: the private path attaches an authenticator to the app window and registers a passkey (green 20260824T144614Z); the public/droplet drive registers a password (ADR 0170, #494).

Proof

Offline, and I am not calling it more than it is:

  • ceremony.test.ts guard: red naming the offender → green
  • 932/932 unit tests pass (env -u IDSS_PAYLOAD_DIR pnpm vitest run)
  • vue-tsc -p tsconfig.json clean — tests is in include, so the reworked spec genuinely typechecks against the fixture signatures
  • eslint clean; prettier --check clean on all three touched code files (two were already drifted at HEAD and are now formatted)
  • Playwright collects the reworked spec: private-path-tail.resume.spec.ts:63:3 › ... › re-enters at hand-off and drives only the tail — the module graph resolves and every new import binds

Three stdioBridge.test.ts cases fail on this host, red at e6cfb52 too and green under env -u IDSS_PAYLOAD_DIR — a host-env leak, unrelated to this ticket. Filed as #755.

Why human

Ben's hands, on his laptop — the live resume drive. Not a ruling, not a judgement call: the drive is physically unreachable from matou-dev-server-01, on three counts.

  1. No KVM access. /dev/kvm exists but this account is not in the kvm group (groups: dev, sudo, users, docker).
  2. No local-guest payload. IDSS_PAYLOAD_DIR=/home/dev/swarm/rehearsal-payload holds control-plane and dashboard only — the rehearsal/droplet shape. smoke-private-path.sh demands nixos-guest.qcow2, qemu-img and the arch qemu binary, and refuses a partial payload (ADR 0100).
  3. No resumable run dir, and no way to make one. scripts/resume-private-path-tail.sh requires a run dir whose founding-state.json rests at step: hand-off with the guest still up — it deliberately never tears the guest down, and refuses at second 0 if idss-guest.service is not active. There is no test-results/private-path/ here at all, and systemctl --user cannot even reach a bus on this host (Failed to connect to bus: No medium found).

The ask, when you next drive: after a founding drive rests at hand-off, nix develop .#e2e -c scripts/resume-private-path-tail.sh — the tail should now reach credential-enrolled through the app's own window instead of timing out at waitForResetUrl. If it reds, artifacts/ceremony/window-diagnostics.log is wired on this spec now (it was not before), so the console/network stream is there to read.

Left bug on deliberately — the defect is real and unproven-fixed until that drive.

## Ruled by agent under ADR 0174 — veto anytime **The two-way part landed: `1774f6e8`.** The one-way residue is a live drive on your laptop, so this goes `ready-for-human` for that single act. ### What landed **`private-path-tail.resume.spec.ts` — reworked to the twice-proven recipe.** It now catches the app's own window (`openAppCeremonyWindow(live.app, () => click open-your-dashboard, 3m, live.runDir)`), attaches the CDP virtual authenticator to THAT page, reads `resetUrl` off the window itself, and validates it with `ceremonyWindowOrigin` instead of the localhost-pinned `kanidmOrigin`. Registration and sign-in drive the `PasskeySession`. Two deviations from the recipe as written, both deliberate: - **No external Chromium and no `transplantCredentials`** (recipe step 4). This tail never visits `files.<apex>` — it does the ceremony, defers the kit, and lands on Operator home, all in the app. There is nothing to transplant into, so launching a second browser would be dead weight. - **No in-page byte-fetch change needed** (step 3). The brand byte-asserts here are `loginWithPasskey`'s `expectDomainLogo`, which already fetches through `imageBytes()` — `a18375b` fixed that inside the fixture, so this spec inherits it. Step 5 (`oidcSignInAsOperator`'s goto contract) does not apply — this spec never calls it. Also gone: the mid-test `closeCeremonyBrowser` and `afterAll`'s ceremony branch. The app window closes with the app, exactly as `foundingPrefix` leaves it, and `private-path.live.spec.ts` proves that same ordering green (it clicks `later` with the window still open). **A guard, as the red-before-green.** `ceremony.test.ts` gained *"the retired open-sink ceremony has no spec caller"* — it scans every `tests/e2e/*.spec.ts` for `waitForResetUrl`/`kanidmOrigin`/`resetUrls`. It failed first, naming exactly one offender: ``` expected [ private-path-tail.resume.spec.ts ] to deeply equal [] ``` That is the whole point of the guard: this class of drift cost two commits of invisibility and would have cost a founding drive's wall clock to discover, because the failure mode is `waitForResetUrl` burning its full ceiling and reding two minutes deep. Now it is a one-second file scan. `waitForResetUrl`/`kanidmOrigin`/`resetUrls()` stay exported and unit-tested — the helper still writes the sink — but no e2e **spec** may drive a ceremony through them. **`settings-brand-reapply.live.spec.ts` — audited, NO change owed.** The guard cleared it independently of my reading of it: its ceremony half took both rework commits (`a18375b`, `530c903`), it already does `transplantCredentials(prefix.session, ext)` before the external-browser `dash`, and its brand assertions ride `assertNextcloudTheming` (occ over ssh) and `assertBrandedLogin` (fresh incognito off the external browser) — neither touches `page.request`. Confirming the ticket's own call: it is **undriven, not broken**, so its first `--drive reapply` red is calibration. **`ceremony.ts` — two stale notes corrected.** These are *why* the drift went unseen, so they are in scope rather than tidying: - the module header still read **"#425 / DDR 0163 — LIVE-LAB REWORK PENDING (human-gated)"** and told the reader `waitForResetUrl` "will time out on a real drive" as a future condition. It now records the rework as landed, names both green drives, and points at the guard. - `openAppCeremonyWindow`'s docblock still claimed *"Passkey coverage stays live on the private path, whose external Chromium `openCeremonyBrowser` still attaches the authenticator per-target"* — false since `a18375b`, and precisely the sentence that would mislead the next person doing this rework. It now separates the two paths honestly: the private path attaches an authenticator to the app window and registers a passkey (green `20260824T144614Z`); the public/droplet drive registers a password (ADR 0170, #494). ### Proof Offline, and I am not calling it more than it is: - `ceremony.test.ts` guard: **red naming the offender → green** - **932/932** unit tests pass (`env -u IDSS_PAYLOAD_DIR pnpm vitest run`) - `vue-tsc -p tsconfig.json` clean — `tests` is in `include`, so the reworked spec genuinely typechecks against the fixture signatures - `eslint` clean; `prettier --check` clean on all three touched code files (two were already drifted at HEAD and are now formatted) - Playwright **collects** the reworked spec: `private-path-tail.resume.spec.ts:63:3 › ... › re-enters at hand-off and drives only the tail` — the module graph resolves and every new import binds Three `stdioBridge.test.ts` cases fail on this host, red at `e6cfb52` too and green under `env -u IDSS_PAYLOAD_DIR` — a host-env leak, unrelated to this ticket. Filed as **#755**. ## Why human **Ben's hands, on his laptop — the live resume drive.** Not a ruling, not a judgement call: the drive is physically unreachable from `matou-dev-server-01`, on three counts. 1. **No KVM access.** `/dev/kvm` exists but this account is not in the `kvm` group (`groups`: dev, sudo, users, docker). 2. **No local-guest payload.** `IDSS_PAYLOAD_DIR=/home/dev/swarm/rehearsal-payload` holds `control-plane` and `dashboard` only — the rehearsal/droplet shape. `smoke-private-path.sh` demands `nixos-guest.qcow2`, `qemu-img` and the arch qemu binary, and refuses a partial payload (ADR 0100). 3. **No resumable run dir, and no way to make one.** `scripts/resume-private-path-tail.sh` requires a run dir whose `founding-state.json` rests at `step: hand-off` **with the guest still up** — it deliberately never tears the guest down, and refuses at second 0 if `idss-guest.service` is not active. There is no `test-results/private-path/` here at all, and `systemctl --user` cannot even reach a bus on this host (`Failed to connect to bus: No medium found`). The ask, when you next drive: after a founding drive rests at hand-off, `nix develop .#e2e -c scripts/resume-private-path-tail.sh` — the tail should now reach `credential-enrolled` through the app's own window instead of timing out at `waitForResetUrl`. If it reds, `artifacts/ceremony/window-diagnostics.log` is wired on this spec now (it was not before), so the console/network stream is there to read. Left `bug` on deliberately — the defect is real and unproven-fixed until that drive.
Author
Owner

Session note 2026-08-29: the laptop is drive-ready — complete payload at ~/.local/share/idss/payload (agent/control-plane/dashboard warmed 08-25, nixos-guest.qcow2 08-24), KVM present. The staleness preflight may demand a re-warm first (tree has moved since 08-25). Ben deferred the drive to a free window; recipe stands as ruled above.

Session note 2026-08-29: the laptop is drive-ready — complete payload at ~/.local/share/idss/payload (agent/control-plane/dashboard warmed 08-25, nixos-guest.qcow2 08-24), KVM present. The staleness preflight may demand a re-warm first (tree has moved since 08-25). Ben deferred the drive to a free window; recipe stands as ruled above.

Closed by Ben (Floor session, 2026-10-21) — the defect is fixed; the live drive moves to a later run on the current setup

Why this closes now. The defect this ticket named — specs still riding the retired open-sink ceremony — is fixed and guarded:

  • private-path-tail.resume.spec.ts rides the app's own ceremony window (1774f6e8).
  • ceremony.test.ts "the retired open-sink ceremony has no spec caller" reds offline if any spec reaches for waitForResetUrl / kanidmOrigin / resetUrls again.
  • settings-brand-reapply.live.spec.ts already carried the tail changes (transplant + external-browser dash).

The live proof is NOT done here: Ben will run the reapply drive later, on the latest setup, and pick up any remaining checks it surfaces then. Neither spec has been driven since 2026-08-24.

Carried forward for that drive (found this session, not acted on):

  • What the drive uniquely proves is #365 AC2 only — Settings → Edit brand kit → new accent #2C4770 → Apply, and the running Nextcloud reads it (occ config:list), plus the re-themed login page. The founding prefix + Files provisioning it rides are already proven green elsewhere (brand-reach drive 8, 09-09; archive drive, 09-06), so a red there is calibration/shared drift, not a re-apply defect.
  • Driver contract gap: the reapply spec writes no artifacts/legs.json / verdict.json (cf. provision-archive.live.spec.ts), so through the executor a red reports as one synthesized pre-legs leg.
  • Hardcoded community name: the spec asserts 'E2E Drive' (the #1115 bug class, fixed in the files-door assert, not here).
  • #1708 (09-21) made the panel brand apply self-verify the IDIP sign-in page; the spec does not assert that — decide at drive time whether it should.
  • A local-reapply queue target was drafted this session and then DISCARDED (Ben) — nothing landed. If the drive is to ride the rehearsal executor, re-add it: a local-reapply row in scripts/lib/rehearsal-queue-lib.sh (rehearsal_target_base → local-guest, rehearsal_target_drive → reapply, the local-brands shape) plus an offline test mirroring scripts/tests/rehearsal-local-brands-target-test.sh, and the issue number in the driving host's REHEARSAL_DRIVE_QUEUE.
  • The resume spec (resume-private-path-tail.sh) is a debug tool, not the spec — prove it on next use rather than as a scheduled drive.
  • The 08-25 laptop payload is stale; expect the staleness preflight to demand a re-warm first.
## Closed by Ben (Floor session, 2026-10-21) — the defect is fixed; the live drive moves to a later run on the current setup **Why this closes now.** The defect this ticket named — specs still riding the retired open-sink ceremony — is fixed and guarded: - `private-path-tail.resume.spec.ts` rides the app's own ceremony window (`1774f6e8`). - `ceremony.test.ts` *"the retired open-sink ceremony has no spec caller"* reds offline if any spec reaches for `waitForResetUrl` / `kanidmOrigin` / `resetUrls` again. - `settings-brand-reapply.live.spec.ts` already carried the tail changes (transplant + external-browser dash). The live proof is NOT done here: Ben will run the reapply drive later, on the latest setup, and pick up any remaining checks it surfaces then. Neither spec has been driven since 2026-08-24. **Carried forward for that drive (found this session, not acted on):** - **What the drive uniquely proves** is #365 AC2 only — Settings → Edit brand kit → new accent `#2C4770` → Apply, and the running Nextcloud reads it (`occ config:list`), plus the re-themed login page. The founding prefix + Files provisioning it rides are already proven green elsewhere (brand-reach drive 8, 09-09; archive drive, 09-06), so a red there is calibration/shared drift, not a re-apply defect. - **Driver contract gap:** the reapply spec writes no `artifacts/legs.json` / `verdict.json` (cf. `provision-archive.live.spec.ts`), so through the executor a red reports as one synthesized `pre-legs` leg. - **Hardcoded community name:** the spec asserts `'E2E Drive'` (the #1115 bug class, fixed in the files-door assert, not here). - **#1708 (09-21)** made the panel brand apply self-verify the IDIP sign-in page; the spec does not assert that — decide at drive time whether it should. - **A `local-reapply` queue target** was drafted this session and then DISCARDED (Ben) — nothing landed. If the drive is to ride the rehearsal executor, re-add it: a `local-reapply` row in `scripts/lib/rehearsal-queue-lib.sh` (`rehearsal_target_base` → `local-guest`, `rehearsal_target_drive` → `reapply`, the `local-brands` shape) plus an offline test mirroring `scripts/tests/rehearsal-local-brands-target-test.sh`, and the issue number in the driving host's `REHEARSAL_DRIVE_QUEUE`. - **The resume spec** (`resume-private-path-tail.sh`) is a debug tool, not the spec — prove it on next use rather than as a scheduled drive. - The 08-25 laptop payload is stale; expect the staleness preflight to demand a re-warm first.
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.

Dependencies

No dependencies set.

Reference
Matou/idss#750
No description provided.