the OIDC-at-the-door walk burns its whole 120 s ceiling blind on a bridge PROTOCOL error, naming nothing #1026

Closed
opened 2026-08-30 09:36:15 +00:00 by matou-build-agent · 2 comments

Failure

On drive 20260830T091443Z the oidc-admin leg spent its full 120 s ceiling and red as:

Locator: locator('#header').or(locator('[data-status]').filter({ hasText: /\S/ })).first()
Expected: visible
Error: element(s) not found

The page it was staring at was not empty. artifacts/journey.idip-*/error-context.md captures its whole accessibility snapshot:

- text: unable to retrieve client by id

The drive already knew the answer — logs/droplet-journal.txt:1403 has op.oidc_error.parent="idp: client not found" op.auth_request.client_id=nextcloud — but the walk reported an opaque timeout instead. That underlying client-id drift is fixed in commit 6873870e; this issue is the probe blindness that hid it, which is unfixed and independent of it.

Evidence

  • app/tests/e2e/fixtures/idip.ts:306 — const refused = page.locator('[data-status]', { hasText: BRIDGE_REFUSAL_TEXT });
  • app/tests/e2e/fixtures/idip.ts:307 — await expect(header.or(refused).first()).toBeVisible({ timeout: 2 * 60_000 });
  • app/tests/e2e/fixtures/idip.ts:33-44 — the docstring is explicit that [data-status] is brand.go's refusal region, i.e. a region that exists only on the bridge's OWN branded page.

A bridge protocol error is not rendered by brand.go at all. redirect_disabled=true errors come out of zitadel/oidc's own bare error render, which carries no #header, no form#signin and no [data-status] — so header.or(refused) matches zero elements and the walk can do nothing but time out. Any bad client_id, bad redirect_uri, unsupported response_type or malformed scope lands here.

This is the third red on signature 94a048d819e4, and both prior heals (df119d6b, b28bf658) adjusted BRIDGE_REFUSAL_TEXT inside that region. Neither could help, because the failing page never reaches the region. The blindness is what let the signature recur while the real fault sat unnamed in the journal each time.

Suspected layer

The e2e fixture app/tests/e2e/fixtures/idip.ts, oidcSignInViaBridge (lines 299-311). Product code is not implicated.

What plugging it needs

Give the post-sign-in wait a third arm that matches the bridge's protocol-error page, and make the walk report the page rather than the timeout:

  1. Add a locator for the bare error render (e.g. body text matching the OIDC error shape, or text=/unable to retrieve client|invalid_request|invalid_client|unauthorized_client/i) into the header.or(refused) union at line 307, so the leg reds in seconds with the bridge's own words instead of at the 120 s ceiling.
  2. On the non-#header branch (line 308-310), fall back to the page's visible text when refused is empty, so the thrown message always names what the door actually said.
  3. Cover it in app/tests/e2e/fixtures/idip.test.ts with a fixture page that carries the bare unable to retrieve client by id text and NO [data-status] — that test must fail against today's line 306-307.

Targeted check: pnpm --filter app exec vitest run tests/e2e/fixtures/idip.test.ts.

Separate design question, not part of this ticket: whether the bridge should render its protocol errors on its branded page (so [data-status] covers them) is an ADR 0212 call for a human, not something the fixture should assume. The fixture fix above is correct either way.

drive 20260830T091443Z red at oidc-admin: expect(locator).toBeVisible() failed Locator: locator('#header').or(locator('[data-status]').filter({ hasText: /\S/ })).first() Expected: visible Timeout: 120000ms Error: element(s) not found Call log
evidence: /home/dev/swarm/Matou/idss/test-results/drive-idip/20260830T091443Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure On drive `20260830T091443Z` the `oidc-admin` leg spent its full 120 s ceiling and red as: ``` Locator: locator('#header').or(locator('[data-status]').filter({ hasText: /\S/ })).first() Expected: visible Error: element(s) not found ``` The page it was staring at was not empty. `artifacts/journey.idip-*/error-context.md` captures its whole accessibility snapshot: ```yaml - text: unable to retrieve client by id ``` The drive already knew the answer — `logs/droplet-journal.txt:1403` has `op.oidc_error.parent="idp: client not found" op.auth_request.client_id=nextcloud` — but the walk reported an opaque timeout instead. That underlying client-id drift is fixed in commit `6873870e`; this issue is the probe blindness that hid it, which is unfixed and independent of it. ## Evidence - `app/tests/e2e/fixtures/idip.ts:306` — `const refused = page.locator('[data-status]', { hasText: BRIDGE_REFUSAL_TEXT });` - `app/tests/e2e/fixtures/idip.ts:307` — `await expect(header.or(refused).first()).toBeVisible({ timeout: 2 * 60_000 });` - `app/tests/e2e/fixtures/idip.ts:33-44` — the docstring is explicit that `[data-status]` is **brand.go's** refusal region, i.e. a region that exists only on the bridge's OWN branded page. A bridge protocol error is not rendered by brand.go at all. `redirect_disabled=true` errors come out of zitadel/oidc's own bare error render, which carries no `#header`, no `form#signin` and no `[data-status]` — so `header.or(refused)` matches zero elements and the walk can do nothing but time out. Any bad `client_id`, bad `redirect_uri`, unsupported `response_type` or malformed scope lands here. This is the third red on signature `94a048d819e4`, and both prior heals (`df119d6b`, `b28bf658`) adjusted `BRIDGE_REFUSAL_TEXT` *inside* that region. Neither could help, because the failing page never reaches the region. The blindness is what let the signature recur while the real fault sat unnamed in the journal each time. ## Suspected layer The e2e fixture `app/tests/e2e/fixtures/idip.ts`, `oidcSignInViaBridge` (lines 299-311). Product code is not implicated. ## What plugging it needs Give the post-sign-in wait a third arm that matches the bridge's protocol-error page, and make the walk report the page rather than the timeout: 1. Add a locator for the bare error render (e.g. body text matching the OIDC error shape, or `text=/unable to retrieve client|invalid_request|invalid_client|unauthorized_client/i`) into the `header.or(refused)` union at line 307, so the leg reds in seconds with the bridge's own words instead of at the 120 s ceiling. 2. On the non-`#header` branch (line 308-310), fall back to the page's visible text when `refused` is empty, so the thrown message always names what the door actually said. 3. Cover it in `app/tests/e2e/fixtures/idip.test.ts` with a fixture page that carries the bare `unable to retrieve client by id` text and NO `[data-status]` — that test must fail against today's line 306-307. Targeted check: `pnpm --filter app exec vitest run tests/e2e/fixtures/idip.test.ts`. **Separate design question, not part of this ticket:** whether the bridge should render its protocol errors on its branded page (so `[data-status]` covers them) is an ADR 0212 call for a human, not something the fixture should assume. The fixture fix above is correct either way. drive `20260830T091443Z` red at `oidc-admin`: `expect(locator).toBeVisible() failed Locator: locator('#header').or(locator('[data-status]').filter({ hasText: /\S/ })).first() Expected: visible Timeout: 120000ms Error: element(s) not found Call log` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-idip/20260830T091443Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 94a048d819e4 -->
Author
Member

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

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

close-report for #1026 — status success

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

envelope
{
  "issue": 1026,
  "status": "success",
  "commits": [
    "53d139c"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/fixtures/idip.ts",
    "app/tests/e2e/fixtures/idip.test.ts"
  ],
  "tests": [
    {
      "command": "pnpm --filter app exec vitest run tests/e2e/fixtures/idip.test.ts",
      "exit_code": 0
    },
    {
      "command": "pnpm exec vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Add a locator for the bare error render into the header.or(refused) union at line 307 so the leg reds in seconds": "app/tests/e2e/fixtures/idip.ts — new BRIDGE_PROTOCOL_ERROR_TEXT regex and a third wait arm `page.locator('body', { hasText: BRIDGE_PROTOCOL_ERROR_TEXT })` joined via `.or(protocolError)` into the post-sign-in union",
    "On the non-#header branch fall back to the page's visible text so the thrown message always names what the door said": "app/tests/e2e/fixtures/idip.ts — throw now reads branded [data-status] text OR falls back to `page.locator('body').innerText()` when the branded region is absent",
    "Cover it in idip.test.ts with a bare 'unable to retrieve client by id' page carrying NO [data-status]; that test fails against today's line 306-307": "app/tests/e2e/fixtures/idip.test.ts — happy-dom bare page asserts no #header/form#signin/[data-status] and that BRIDGE_PROTOCOL_ERROR_TEXT matches its body; source-scan pins the third arm + body fallback into the walk. Verified red against pre-fix idip.ts (3 tests fail)."
  },
  "summary": "oidcSignInViaBridge gains a body-text protocol-error wait arm plus a visible-text throw fallback so a bare bridge OIDC error reds in seconds naming the door's own words instead of timing out blind.",
  "blockers": []
}
**close-report** for #1026 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1026, "status": "success", "commits": [ "53d139c" ], "changed_files": [ "STATUS.md", "app/tests/e2e/fixtures/idip.ts", "app/tests/e2e/fixtures/idip.test.ts" ], "tests": [ { "command": "pnpm --filter app exec vitest run tests/e2e/fixtures/idip.test.ts", "exit_code": 0 }, { "command": "pnpm exec vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "Add a locator for the bare error render into the header.or(refused) union at line 307 so the leg reds in seconds": "app/tests/e2e/fixtures/idip.ts — new BRIDGE_PROTOCOL_ERROR_TEXT regex and a third wait arm `page.locator('body', { hasText: BRIDGE_PROTOCOL_ERROR_TEXT })` joined via `.or(protocolError)` into the post-sign-in union", "On the non-#header branch fall back to the page's visible text so the thrown message always names what the door said": "app/tests/e2e/fixtures/idip.ts — throw now reads branded [data-status] text OR falls back to `page.locator('body').innerText()` when the branded region is absent", "Cover it in idip.test.ts with a bare 'unable to retrieve client by id' page carrying NO [data-status]; that test fails against today's line 306-307": "app/tests/e2e/fixtures/idip.test.ts — happy-dom bare page asserts no #header/form#signin/[data-status] and that BRIDGE_PROTOCOL_ERROR_TEXT matches its body; source-scan pins the third arm + body fallback into the walk. Verified red against pre-fix idip.ts (3 tests fail)." }, "summary": "oidcSignInViaBridge gains a body-text protocol-error wait arm plus a visible-text throw fallback so a bare bridge OIDC error reds in seconds naming the door's own words instead of timing out blind.", "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#1026
No description provided.