dashboard: cold browser hits the ADR 0247-gated apex with no session, never sees chrome #1640

Closed
opened 2026-09-19 22:57:41 +00:00 by matou-build-agent · 2 comments

Not the known frontier

The brief names pairing-never-flips as this drive's KNOWN frontier. It does not apply to this run. artifacts/legs.json records pair green and carries no skip reasons at all, and verdict.json agrees:

{"verdict": "red", "firstRedLeg": "dashboard",
 "legs": {"total": 12, "green": 11, "red": 1, "skip": 0},
 "commit": "9acd1a4e8f9b70df1c903792c20f23567b452d88"}

Eleven legs green through identity-rows; the drive died on leg 13, dashboard, after 60887 ms. This is a fresh red.

The failure

artifacts/legs.json, the dashboard record:

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

The leg (app/tests/e2e/journey.idip.spec.ts:573-592) launches a brand-new chromium, navigates it straight at the portal address read off S12, and waits for the panel shell:

const browser = await chromium.launch({ headless: process.env.HEADED !== '1' });
const dash = await browser.newPage();
...
await dash.goto(portalAddress, { waitUntil: 'domcontentloaded' });
await expect(dash.locator('[data-status="dashboard-chrome"]')).toBeVisible({ timeout: 60_000 });

Its inline comment states the premise it rides on (journey.idip.spec.ts:570-572):

// On IDIP there is no kanidm credential ceremony: the steward's acts below
// are signed with the S6a phrase, and the portal route is ungated this arc (#512/#511).

That premise is retired. On the live box (still up at 209.38.26.32; systemctl --failed is empty, nothing is broken) the apex serves nothing to a stranger:

$ curl -sSki https://rehearsal-f.idss.nz/ --resolve rehearsal-f.idss.nz:443:127.0.0.1
HTTP/2 302
location: https://rehearsal-f.idss.nz/authz/signin?rd=https://rehearsal-f.idss.nz/
server: Caddy

$ curl -L ...  ->  final=https://id.rehearsal-f.idss.nz/login?authRequestID=deded74b7772… code=200
      <title>rehearsal-f.idss.nz — sign in</title>

The rendered Caddyfile on the box confirms the fall-through is gated — the apex allow-list does not contain /:

45: @allow path /api/v1/enroll/redeem … /api/v1/healthz /authz/* /brand/* /get /mesh/*
83: forward_auth http://127.0.0.1:8080 {
84:   uri /authz/gate
95:   redir https://rehearsal-f.idss.nz/authz/signin?rd={http.request.scheme}://…  302

So the cold browser is bounced to the IdP login page and [data-status="dashboard-chrome"] (which lives in packages/ui-kit/src/components/NavChrome.vue:2) is correctly never rendered. The leg screenshot artifacts/legs/dashboard.png is byte-for-byte the identity-rows founded page — it photographs the electron live.page, not dash, so it shows nothing of the failure.

The product is right; the drive is stale

The 302 is the specified behaviour, not a regression. docs/adr/0247-the-apex-serves-the-control-panel-and-the-portal-rests-behind-one-switch.md:70-81:

4. Everything else at the apex is the control panel behind the gate. … This replaces ADR 0233 §5's respond @api 404 and §7's try_files/file_server shell. … No session at the apex root → the gate 401s → the browser goes to the IdP carrying rd.

The repo's own cutover fixture asserts exactly this shape (app/tests/e2e/fixtures/cutover.ts:438-442):

302 → the gate's /authz/signin?rd=… — the apex IS the control panel now and must meet the gate, serving nothing to a stranger (ADR 0247 §4)

And the gate substrate came up healthy on this very box moments before the leg (logs/droplet-journal.txt:1681):

Sep 19 22:53:24 gateway idss-control-plane-start[4009]: msg="auth gate session substrate wired:
  /authz/signin runs the OIDC flow and mints the community SSO session (ADR 0074)"
  idp=id.rehearsal-f.idss.nz bridge=true

The bridge is listening (idss-idp on 127.0.0.1:8465, control-plane on :8080, caddy on :443) — a sign-in from the drive would have worked. The sibling journey already does it that way: journey.device.spec.ts:463-478 calls loginWithPassword(dash, https://id.<apex>, …) before goto(portalAddress) and only then expects dashboard-chrome.

Suspected layer: harness (the drive spec), not product or infra

ADR 0247 moved the panel behind the gate; the IDIP journey's leg 13 was never re-sequenced to sign in first. It is the only cold-browser landing left asserting the pre-0247 ungated apex.

What plugging it needs

The fixture that does this correctly already exists and is already imported by this spec — it is just invoked 13 legs too late:

  • app/tests/e2e/fixtures/idip.ts:619 — establishOperatorSession(dash, apex, portalAddress, founderPhrase) drives GET /authz/signin?rd=… → bridgeSignIn with the S6a phrase → asserts dashboard-chrome → asserts the idss_session cookie.
  • journey.idip.spec.ts:835 is its only call site, inside leg operator-session.

Fix: have leg dashboard land the panel through the gate — call establishOperatorSession(dash, apex, portalAddress, founderPhrase) in the leg body at journey.idip.spec.ts:586 in place of the bare dash.goto + expect. founderPhrase is already in scope (assigned at journey.idip.spec.ts:404, leg create), so no threading is needed. The later operator-session leg can stay as-is — the fixture documents itself as idempotent ("an already-signed-in browser lands straight on the dashboard and never sees the form"), so it will pass through without a second form.

Two residues worth taking in the same change:

  1. Delete the stale premise comment at journey.idip.spec.ts:570-572 ("the portal route is ungated this arc (#512/#511)") — ADR 0247 §4 superseded it.
  2. fixtures/idip.ts:607-608 carries the same dead claim in its docstring ("served on the apex PORTAL route, which is ungated by design (#512)") even though its code correctly goes through /authz/signin. Correct the prose so the next reader doesn't re-derive the bug.

Also worth noting for whoever picks this up: the dashboard leg screenshots live.page rather than dash, so a red here produces a photo of the previous leg's screen. Pointing the leg's capture at dash would have made this a one-glance diagnosis.

drive 20260919T222916Z red at dashboard: expect(locator).toBeVisible() failed Locator: locator('[data-status="dashboard-chrome"]') Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 6
evidence: /home/swarm/session-runner/idss/test-results/drive-idip/20260919T222916Z 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 pairing-never-flips as this drive's KNOWN frontier. **It does not apply to this run.** `artifacts/legs.json` records `pair` green and carries no skip reasons at all, and `verdict.json` agrees: ```json {"verdict": "red", "firstRedLeg": "dashboard", "legs": {"total": 12, "green": 11, "red": 1, "skip": 0}, "commit": "9acd1a4e8f9b70df1c903792c20f23567b452d88"} ``` Eleven legs green through `identity-rows`; the drive died on leg 13, `dashboard`, after 60887 ms. This is a fresh red. ## The failure `artifacts/legs.json`, the `dashboard` record: ``` expect(locator).toBeVisible() failed Locator: locator('[data-status="dashboard-chrome"]') Expected: visible Timeout: 60000ms Error: element(s) not found ``` The leg (`app/tests/e2e/journey.idip.spec.ts:573-592`) launches a **brand-new chromium**, navigates it straight at the portal address read off S12, and waits for the panel shell: ```ts const browser = await chromium.launch({ headless: process.env.HEADED !== '1' }); const dash = await browser.newPage(); ... await dash.goto(portalAddress, { waitUntil: 'domcontentloaded' }); await expect(dash.locator('[data-status="dashboard-chrome"]')).toBeVisible({ timeout: 60_000 }); ``` Its inline comment states the premise it rides on (`journey.idip.spec.ts:570-572`): > `// On IDIP there is no kanidm credential ceremony: the steward's acts below` > `// are signed with the S6a phrase, and the portal route is ungated this arc (#512/#511).` **That premise is retired.** On the live box (still up at 209.38.26.32; `systemctl --failed` is empty, nothing is broken) the apex serves nothing to a stranger: ``` $ curl -sSki https://rehearsal-f.idss.nz/ --resolve rehearsal-f.idss.nz:443:127.0.0.1 HTTP/2 302 location: https://rehearsal-f.idss.nz/authz/signin?rd=https://rehearsal-f.idss.nz/ server: Caddy $ curl -L ... -> final=https://id.rehearsal-f.idss.nz/login?authRequestID=deded74b7772… code=200 <title>rehearsal-f.idss.nz — sign in</title> ``` The rendered Caddyfile on the box confirms the fall-through is gated — the apex allow-list does **not** contain `/`: ``` 45: @allow path /api/v1/enroll/redeem … /api/v1/healthz /authz/* /brand/* /get /mesh/* 83: forward_auth http://127.0.0.1:8080 { 84: uri /authz/gate 95: redir https://rehearsal-f.idss.nz/authz/signin?rd={http.request.scheme}://… 302 ``` So the cold browser is bounced to the IdP login page and `[data-status="dashboard-chrome"]` (which lives in `packages/ui-kit/src/components/NavChrome.vue:2`) is correctly never rendered. The leg screenshot `artifacts/legs/dashboard.png` is byte-for-byte the `identity-rows` founded page — it photographs the electron `live.page`, not `dash`, so it shows nothing of the failure. ## The product is right; the drive is stale The 302 is the **specified** behaviour, not a regression. `docs/adr/0247-the-apex-serves-the-control-panel-and-the-portal-rests-behind-one-switch.md:70-81`: > **4. Everything else at the apex is the control panel behind the gate.** … This **replaces** ADR 0233 §5's `respond @api 404` and §7's `try_files`/`file_server` shell. … *No session at the apex root → the gate 401s → the browser goes to the IdP carrying `rd`.* The repo's own cutover fixture asserts exactly this shape (`app/tests/e2e/fixtures/cutover.ts:438-442`): > ``302 → the gate's /authz/signin?rd=… — the apex IS the control panel now and must meet the gate, serving nothing to a stranger (ADR 0247 §4)`` And the gate substrate came up healthy on this very box moments before the leg (`logs/droplet-journal.txt:1681`): ``` Sep 19 22:53:24 gateway idss-control-plane-start[4009]: msg="auth gate session substrate wired: /authz/signin runs the OIDC flow and mints the community SSO session (ADR 0074)" idp=id.rehearsal-f.idss.nz bridge=true ``` The bridge is listening (`idss-idp` on 127.0.0.1:8465, `control-plane` on :8080, caddy on :443) — a sign-in from the drive would have worked. The sibling journey already does it that way: `journey.device.spec.ts:463-478` calls `loginWithPassword(dash, https://id.<apex>, …)` **before** `goto(portalAddress)` and only then expects `dashboard-chrome`. ## Suspected layer: harness (the drive spec), not product or infra ADR 0247 moved the panel behind the gate; the IDIP journey's leg 13 was never re-sequenced to sign in first. It is the only cold-browser landing left asserting the pre-0247 ungated apex. ## What plugging it needs The fixture that does this correctly already exists and is **already imported by this spec** — it is just invoked 13 legs too late: - `app/tests/e2e/fixtures/idip.ts:619` — `establishOperatorSession(dash, apex, portalAddress, founderPhrase)` drives `GET /authz/signin?rd=…` → `bridgeSignIn` with the S6a phrase → asserts `dashboard-chrome` → asserts the `idss_session` cookie. - `journey.idip.spec.ts:835` is its only call site, inside leg `operator-session`. Fix: have leg `dashboard` land the panel **through the gate** — call `establishOperatorSession(dash, apex, portalAddress, founderPhrase)` in the leg body at `journey.idip.spec.ts:586` in place of the bare `dash.goto` + expect. `founderPhrase` is already in scope (assigned at `journey.idip.spec.ts:404`, leg `create`), so no threading is needed. The later `operator-session` leg can stay as-is — the fixture documents itself as idempotent ("an already-signed-in browser lands straight on the dashboard and never sees the form"), so it will pass through without a second form. Two residues worth taking in the same change: 1. Delete the stale premise comment at `journey.idip.spec.ts:570-572` ("the portal route is ungated this arc (#512/#511)") — ADR 0247 §4 superseded it. 2. `fixtures/idip.ts:607-608` carries the same dead claim in its docstring ("served on the apex PORTAL route, which is ungated by design (#512)") even though its *code* correctly goes through `/authz/signin`. Correct the prose so the next reader doesn't re-derive the bug. Also worth noting for whoever picks this up: the `dashboard` leg screenshots `live.page` rather than `dash`, so a red here produces a photo of the previous leg's screen. Pointing the leg's capture at `dash` would have made this a one-glance diagnosis. drive `20260919T222916Z` red at `dashboard`: `expect(locator).toBeVisible() failed Locator: locator('[data-status="dashboard-chrome"]') Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 6` evidence: `/home/swarm/session-runner/idss/test-results/drive-idip/20260919T222916Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 783a9073cbd0 -->
Owner

Taking this by hand (Ben's session, 2026-09-19 23:05Z) — it is the next red on the debug IDIP drive for #1522/#1531 and the fix is the one named here. ready-for-agent dropped so the swarm does not double-land it.

Taking this by hand (Ben's session, 2026-09-19 23:05Z) — it is the next red on the debug IDIP drive for #1522/#1531 and the fix is the one named here. `ready-for-agent` dropped so the swarm does not double-land it.
Owner

Fixed in 3e8311cd, as named here: the dashboard leg now calls establishOperatorSession(dash, apex, portalAddress, founderPhrase) in place of the bare goto + expect, photographs dash (not the previous leg's page), and the stale "portal route is ungated" prose is corrected in the spec and in the fixture's docstring. Checked first that no leg between dashboard and operator-session needs dash signed OUT — branded-login, oidc-admin, member-join and member-sign-in all launch fresh browsers/contexts. vue-tsc + eslint clean. Live-unproven until the next IDIP fire passes dashboard.

Fixed in `3e8311cd`, as named here: the `dashboard` leg now calls `establishOperatorSession(dash, apex, portalAddress, founderPhrase)` in place of the bare `goto` + expect, photographs `dash` (not the previous leg's page), and the stale "portal route is ungated" prose is corrected in the spec and in the fixture's docstring. Checked first that no leg between `dashboard` and `operator-session` needs `dash` signed OUT — `branded-login`, `oidc-admin`, `member-join` and `member-sign-in` all launch fresh browsers/contexts. `vue-tsc` + eslint clean. Live-unproven until the next IDIP fire passes `dashboard`.
ben closed this issue 2026-09-19 23:01:12 +00:00
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#1640
No description provided.