founding-prefix: the loopback bundle read still asserts the retired Portal face (PT-S0) — ADR 0247's live-fixture sweep missed foundingPrefix.ts, and its source pin forbids the panel marker #1598

Closed
opened 2026-09-18 18:58:10 +00:00 by matou-build-agent · 1 comment

The failure

The founding-prefix leg reds at its last step, the served bundle is alive and branded — the Portal face on loopback:

expect(locator).toBeVisible() failed
Locator: locator('[data-field="portal-signed-out"]')
Expected: visible
Timeout: 60000ms
Error: element(s) not found

app/tests/e2e/fixtures/foundingPrefix.ts:501-505 navigates the ceremony window to http://127.0.0.1:<apiPort> and asserts the Portal's signed-out face (PT-S0), then its [data-field="community-name"]. Its comment (:490-497) states the contract it was written against: "Since #1365 (spec #1361 s1) the bundle boots HOST-aware: on any host that is not the admin door it renders the PORTAL's signed-out face (PT-S0) … never the panel chrome."

That contract was retired two days before this drive.

The evidence

The product deliberately serves the panel on every host now. dashboard/src/lib/portalRouting.ts:38 carries export const APEX_SURFACE: ApexSurface = 'panel';, and chooseBootSurface (dashboard/src/lib/portalRouting.ts:67-75) short-circuits on it:

if (APEX_SURFACE === 'panel') {
  return 'panel';
}
return isAdminHost(host) ? 'panel' : 'portal';

The host is never consulted — isAdminHost is dead under this posture. dashboard/src/entry/main.ts:36-40 then boots bootServedDashboard (the operator SPA). The Go half agrees: internal/hostnames/hostnames.go:113 sets ApexServes = ApexSurfacePanel, and the two are pinned in lockstep by TestApexSurface_MatchesBundleConstant (internal/hostnames/apexsurface_test.go:28). The Portal is switched off and has no address at all — there is no host this fixture could dial to get PT-S0.

The run's own snapshot confirms the panel rendered, alive and branded. From artifacts/provision-brands.live-bran-08f5b-→-kit-at-the-door-→-remove-/error-context.md:

- complementary:
  - text: E2E Drive
  - navigation:
    - button "Overview"
    - button "Fleet"
    - button "Services"
    - button "Members"
    - button "Backups"
    - button "Settings"
  - text: operator
  - button "Sign out"
- heading "Overview" [level=1]
- paragraph: Your community is standing. Here's how to make it a community.

The substantive fact this step exists to prove — the served bundle is alive, branded, and wearing the community's own name E2E Drive — is TRUE on this drive. Only the face the assertion names is retired. This is not a product regression.

This fixture is the one caller ADR 0247's sweep missed. Commit 98757010 ("feat: ADR 0247 — the apex serves the control panel; admin. retired; the Portal switched off behind one switch", 2026-09-16) updated app/tests/e2e/fixtures/cutover.ts, app/tests/e2e/fixtures/provision.ts, app/tests/e2e/journey.droplet.spec.ts and app/tests/e2e/private-path.live.spec.ts — but not app/tests/e2e/fixtures/foundingPrefix.ts. Its message even names the pattern it used: "the live legs are inverted rather than skipped, because a skipped leg auto-closes a drive ticket green here."

The switch it exported for exactly this purpose is app/tests/e2e/fixtures/provision.ts:138:

export const portalIsLive: boolean = (APEX_SURFACE as ApexSurface) === 'portal';

and the house shape is at app/tests/e2e/private-path.live.spec.ts:114, app/tests/e2e/journey.droplet.spec.ts:501, :554 and :662 — if (!portalIsLive) { <inverted panel proof>; return; }, the Portal assertions left byte-for-byte intact so they return when the switch flips back.

The suspected layer

Harness/fixture only. No product change is needed: internal/ and dashboard/src/ are behaving exactly as ADR 0247 specifies. The defect is an incomplete mechanical sweep in app/tests/e2e/fixtures/.

Which refusal rule fired, and why

Rule 1 — would weaken (change) what a check proves. Two assertions must change value, and one of them has no verbatim twin:

  1. app/tests/e2e/fixtures/foundingPrefix.ts:502 — [data-field="portal-signed-out"] must become the panel's booted marker. On its own this could be healed without touching the assertion, using the repo's own guard shape (if (!portalIsLive) { …; return; }), leaving :502 and :505 untouched.

  2. app/tests/e2e/fixtures/foundingPrefix.test.ts:42-45 blocks that. It is a live source pin over foundingPrefix.ts:

it('proves the served bundle over loopback by the PORTAL face, never the panel chrome (#1365 host-aware boot)', () => {
  expect(src).toContain(`locator('[data-field="portal-signed-out"]')`);
  expect(src).not.toContain(`locator('[data-status="dashboard-chrome"]')`);
});

The inverted proof needs [data-status="dashboard-chrome"] — the marker app/tests/e2e/fixtures/cutover.ts:303 already uses for "the panel booted" — and line 44 forbids that exact string appearing anywhere in the fixture. Satisfying the fix means deleting or inverting line 44, an expect(...) whose value changes with no byte-for-byte twin elsewhere. That is rule 1, not a move.

The only way to dodge it would be to pick some other selector for the panel purely to slip past line 44 — which is gaming a rail that exists precisely to rule which face this leg proves (#1365, #1366 re-ruling #1236). I did not do that.

I verified the pin is live and green today: pnpm --filter app exec vitest run tests/e2e/fixtures/foundingPrefix.test.ts → 6 passed. The stale assertion is actively held in place by it.

The shape of the fix (for whoever takes it)

Two files, both test-tier:

  1. app/tests/e2e/fixtures/foundingPrefix.ts — import portalIsLive from ./provision; after the goto at :501, guard with the house shape. Under !portalIsLive, assert the panel booted ([data-status="dashboard-chrome"]) and still carries E2E Drive, then return — leaving :502-505's Portal assertions untouched so they return with the switch. Update the :483-497 comment, which still cites the #1365 host-aware contract as current.

  2. app/tests/e2e/fixtures/foundingPrefix.test.ts:42-45 — this needs the human ruling. The pin's intent (this leg proves a real face, not nothing) should survive; its value must follow ADR 0247. The natural rewrite pins both postures the way 98757010 pinned the render tests — require the portal locator to still be present (it is, behind the guard) and pin the panel locator's presence rather than its absence.

Worth confirming as part of the ruling: whether any other pre-ADR-0247 fixture reads the Portal face without a portalIsLive guard. grep -rn 'portal-signed-out' app/tests/e2e/ shows portalJourney.ts, cutover.ts and foundingPrefix.ts; the first two were swept, this one was not, so the sweep's miss may be isolated to this file — but the next drive is expensive enough to be worth one grep.

Why the drive is otherwise healthy

artifacts/legs.json carries exactly one leg and one red — founding-prefix, founding: "founded". The community stood up, the wizard walked, the passkey ceremony committed (credentialCount > 0 passed, kanidm landed /ui/apps at foundingPrefix.ts:480), and the bundle served branded. The rail note (snapshot key 5996e429ecc957f8 ≠ current a27c64a7ca86c7c3 — product bits drifted since capture, GOTCHAS #92, founding in full) is the snapshot-reuse rail working as designed, not a fault.

No artifacts/live-box.json was written for this run and logs/qemu.log records ps -o pid,etime,args -C qemu-system-x86_64 exiting 1 with no rows, so no box was available to question; the harvested ARIA snapshot above is conclusive on its own.

drive 20260918T183207Z red at founding-prefix: expect(locator).toBeVisible() failed Locator: locator('[data-field="portal-signed-out"]') Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 6
evidence: /home/swarm/swarm/Matou/idss/test-results/private-path/20260918T183207Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure The `founding-prefix` leg reds at its last step, `the served bundle is alive and branded — the Portal face on loopback`: ``` expect(locator).toBeVisible() failed Locator: locator('[data-field="portal-signed-out"]') Expected: visible Timeout: 60000ms Error: element(s) not found ``` `app/tests/e2e/fixtures/foundingPrefix.ts:501-505` navigates the ceremony window to `http://127.0.0.1:<apiPort>` and asserts the Portal's signed-out face (PT-S0), then its `[data-field="community-name"]`. Its comment (`:490-497`) states the contract it was written against: "Since #1365 (spec #1361 s1) the bundle boots HOST-aware: on any host that is not the admin door it renders the PORTAL's signed-out face (PT-S0) … never the panel chrome." That contract was retired two days before this drive. ## The evidence **The product deliberately serves the panel on every host now.** `dashboard/src/lib/portalRouting.ts:38` carries `export const APEX_SURFACE: ApexSurface = 'panel';`, and `chooseBootSurface` (`dashboard/src/lib/portalRouting.ts:67-75`) short-circuits on it: ```ts if (APEX_SURFACE === 'panel') { return 'panel'; } return isAdminHost(host) ? 'panel' : 'portal'; ``` The host is never consulted — `isAdminHost` is dead under this posture. `dashboard/src/entry/main.ts:36-40` then boots `bootServedDashboard` (the operator SPA). The Go half agrees: `internal/hostnames/hostnames.go:113` sets `ApexServes = ApexSurfacePanel`, and the two are pinned in lockstep by `TestApexSurface_MatchesBundleConstant` (`internal/hostnames/apexsurface_test.go:28`). The Portal is switched off and has **no address at all** — there is no host this fixture could dial to get PT-S0. **The run's own snapshot confirms the panel rendered, alive and branded.** From `artifacts/provision-brands.live-bran-08f5b-→-kit-at-the-door-→-remove-/error-context.md`: ```yaml - complementary: - text: E2E Drive - navigation: - button "Overview" - button "Fleet" - button "Services" - button "Members" - button "Backups" - button "Settings" - text: operator - button "Sign out" - heading "Overview" [level=1] - paragraph: Your community is standing. Here's how to make it a community. ``` The substantive fact this step exists to prove — the served bundle is alive, branded, and wearing the community's own name `E2E Drive` — is TRUE on this drive. Only the face the assertion names is retired. This is not a product regression. **This fixture is the one caller ADR 0247's sweep missed.** Commit `98757010` ("feat: ADR 0247 — the apex serves the control panel; admin.<apex> retired; the Portal switched off behind one switch", 2026-09-16) updated `app/tests/e2e/fixtures/cutover.ts`, `app/tests/e2e/fixtures/provision.ts`, `app/tests/e2e/journey.droplet.spec.ts` and `app/tests/e2e/private-path.live.spec.ts` — but **not** `app/tests/e2e/fixtures/foundingPrefix.ts`. Its message even names the pattern it used: "the live legs are inverted rather than skipped, because a skipped leg auto-closes a drive ticket green here." The switch it exported for exactly this purpose is `app/tests/e2e/fixtures/provision.ts:138`: ```ts export const portalIsLive: boolean = (APEX_SURFACE as ApexSurface) === 'portal'; ``` and the house shape is at `app/tests/e2e/private-path.live.spec.ts:114`, `app/tests/e2e/journey.droplet.spec.ts:501`, `:554` and `:662` — `if (!portalIsLive) { <inverted panel proof>; return; }`, the Portal assertions left byte-for-byte intact so they return when the switch flips back. ## The suspected layer Harness/fixture only. No product change is needed: `internal/` and `dashboard/src/` are behaving exactly as ADR 0247 specifies. The defect is an incomplete mechanical sweep in `app/tests/e2e/fixtures/`. ## Which refusal rule fired, and why **Rule 1 — would weaken (change) what a check proves.** Two assertions must change value, and one of them has no verbatim twin: 1. `app/tests/e2e/fixtures/foundingPrefix.ts:502` — `[data-field="portal-signed-out"]` must become the panel's booted marker. On its own this could be healed without touching the assertion, using the repo's own guard shape (`if (!portalIsLive) { …; return; }`), leaving `:502` and `:505` untouched. 2. `app/tests/e2e/fixtures/foundingPrefix.test.ts:42-45` blocks that. It is a live **source pin** over `foundingPrefix.ts`: ```ts it('proves the served bundle over loopback by the PORTAL face, never the panel chrome (#1365 host-aware boot)', () => { expect(src).toContain(`locator('[data-field="portal-signed-out"]')`); expect(src).not.toContain(`locator('[data-status="dashboard-chrome"]')`); }); ``` The inverted proof needs `[data-status="dashboard-chrome"]` — the marker `app/tests/e2e/fixtures/cutover.ts:303` already uses for "the panel booted" — and line 44 forbids that exact string appearing anywhere in the fixture. Satisfying the fix means **deleting or inverting line 44**, an `expect(...)` whose value changes with no byte-for-byte twin elsewhere. That is rule 1, not a move. The only way to dodge it would be to pick some *other* selector for the panel purely to slip past line 44 — which is gaming a rail that exists precisely to rule which face this leg proves (`#1365`, `#1366` re-ruling `#1236`). I did not do that. I verified the pin is live and green today: `pnpm --filter app exec vitest run tests/e2e/fixtures/foundingPrefix.test.ts` → **6 passed**. The stale assertion is actively held in place by it. ## The shape of the fix (for whoever takes it) Two files, both test-tier: 1. `app/tests/e2e/fixtures/foundingPrefix.ts` — import `portalIsLive` from `./provision`; after the `goto` at `:501`, guard with the house shape. Under `!portalIsLive`, assert the panel booted (`[data-status="dashboard-chrome"]`) and still carries `E2E Drive`, then `return` — leaving `:502-505`'s Portal assertions untouched so they return with the switch. Update the `:483-497` comment, which still cites the #1365 host-aware contract as current. 2. `app/tests/e2e/fixtures/foundingPrefix.test.ts:42-45` — this needs the human ruling. The pin's *intent* (this leg proves a real face, not nothing) should survive; its *value* must follow ADR 0247. The natural rewrite pins both postures the way `98757010` pinned the render tests — require the portal locator to still be present (it is, behind the guard) and pin the panel locator's presence rather than its absence. Worth confirming as part of the ruling: whether any *other* pre-ADR-0247 fixture reads the Portal face without a `portalIsLive` guard. `grep -rn 'portal-signed-out' app/tests/e2e/` shows `portalJourney.ts`, `cutover.ts` and `foundingPrefix.ts`; the first two were swept, this one was not, so the sweep's miss may be isolated to this file — but the next drive is expensive enough to be worth one grep. ## Why the drive is otherwise healthy `artifacts/legs.json` carries exactly one leg and one red — `founding-prefix`, `founding: "founded"`. The community stood up, the wizard walked, the passkey ceremony committed (`credentialCount > 0` passed, kanidm landed `/ui/apps` at `foundingPrefix.ts:480`), and the bundle served branded. The `rail` note (`snapshot key 5996e429ecc957f8 ≠ current a27c64a7ca86c7c3 — product bits drifted since capture, GOTCHAS #92, founding in full`) is the snapshot-reuse rail working as designed, not a fault. No `artifacts/live-box.json` was written for this run and `logs/qemu.log` records `ps -o pid,etime,args -C qemu-system-x86_64` exiting 1 with no rows, so no box was available to question; the harvested ARIA snapshot above is conclusive on its own. drive `20260918T183207Z` red at `founding-prefix`: `expect(locator).toBeVisible() failed Locator: locator('[data-field="portal-signed-out"]') Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 6` evidence: `/home/swarm/swarm/Matou/idss/test-results/private-path/20260918T183207Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 34c8b588d941 -->
ben self-assigned this 2026-09-18 19:00:13 +00:00
Owner

Ruled by agent under ADR 0174 — veto anytime. Fixed in d99cd09d (interactive session, claimed via assignee).

The ruling the healer asked for (the source pin, foundingPrefix.test.ts:42-45): the pin keeps its INTENT — the loopback read proves a real served face wearing the community's own name, never nothing — and its VALUE follows ADR 0247. It no longer forbids [data-status="dashboard-chrome"]; it now requires BOTH locators, requires the panel proof to sit after an if (!portalIsLive) { guard that returns before the Portal assertions, and requires each face to be read with toContainText('E2E Drive'). Two-way door: test-tier only, reverts with one commit, and the Portal assertions are byte-for-byte intact for the day the switch flips back.

The fixture: foundingPrefix.ts takes the house guard exactly as cutover.ts / journey.droplet.spec.ts / private-path.live.spec.ts do. Under !portalIsLive it asserts the panel chrome booted over the loopback forward and that the chrome's community-name reads E2E Drive, then returns.

The grep you asked for: portal-signed-out / PT_SIGNED_OUT appear in portalJourney.ts, cutover.ts and foundingPrefix.ts only; no *.spec.ts reads the face unguarded. The miss was isolated to this file.

Checked: foundingPrefix.test.ts 6/6, app vue-tsc clean, eslint clean. No import cycle (provision.ts does not import the prefix). Product untouched. Live proof = #1277's re-fire, which closing this triggers. GOTCHAS #219 carries the third sighting.

**Ruled by agent under ADR 0174 — veto anytime.** Fixed in `d99cd09d` (interactive session, claimed via assignee). **The ruling the healer asked for (the source pin, `foundingPrefix.test.ts:42-45`):** the pin keeps its INTENT — the loopback read proves a real served face wearing the community's own name, never nothing — and its VALUE follows ADR 0247. It no longer forbids `[data-status="dashboard-chrome"]`; it now requires BOTH locators, requires the panel proof to sit after an `if (!portalIsLive) {` guard that `return`s before the Portal assertions, and requires each face to be read with `toContainText('E2E Drive')`. Two-way door: test-tier only, reverts with one commit, and the Portal assertions are byte-for-byte intact for the day the switch flips back. **The fixture:** `foundingPrefix.ts` takes the house guard exactly as `cutover.ts` / `journey.droplet.spec.ts` / `private-path.live.spec.ts` do. Under `!portalIsLive` it asserts the panel chrome booted over the loopback forward and that the chrome's `community-name` reads `E2E Drive`, then returns. **The grep you asked for:** `portal-signed-out` / `PT_SIGNED_OUT` appear in `portalJourney.ts`, `cutover.ts` and `foundingPrefix.ts` only; no `*.spec.ts` reads the face unguarded. The miss was isolated to this file. Checked: `foundingPrefix.test.ts` 6/6, `app` vue-tsc clean, eslint clean. No import cycle (`provision.ts` does not import the prefix). Product untouched. **Live proof = #1277's re-fire**, which closing this triggers. GOTCHAS #219 carries the third sighting.
ben closed this issue 2026-09-18 19:02:47 +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#1598
No description provided.