Skip to content

ci(e2e): run the office kanban suite nightly against a static web export, and prove its red path - #811

Merged
thinkclay merged 2 commits into
mainfrom
ci/root-e2e-nightly
Sep 17, 2026
Merged

thinkclay merged 2 commits into
mainfrom
ci/root-e2e-nightly

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #807.

What

A second job in e2e-nightly.yml, e2e-office, runs the root playwright.config.ts — which nothing in CI executed before; the existing job runs the app-level config only.

  • Static export, not the dev server. expo export --platform web served by expo serve on 8081. Against expo start --web the same suite OOMs Metro's 8 GB heap under parallel SSR loads; the export serves it in 1.6 min at one worker.
  • Named files, not the whole config. Run in full for the first time, the root allow-list is 29 of 123 red (auth, webhooks, api-keys, hardening, user-journeys, profile-audit: stale selectors, not product faults). Shipping that as a nightly would be the "known-red selection" the config's comments warn against. Filed as e2e: 29 of the root config's 123 allow-listed tests are red on their first run — the testMatch list was never green #810 with a per-file table; the job grows one file per verified green run.
  • The red path is a step, not a memory. "Prove the red path" runs the fixture-precondition block with E2E_BREAK_APPLICATIONS=1, under which the spec answers the employer applications endpoint with an empty list, and passes only if that run fails. test(e2e): the office suite never runs — excluded from testMatch, and its auth setup is outside testDir #553's third acceptance box, made repeatable. A route intercept rather than an edge-function revert, because the local edge runtime serves whichever checkout started it and the preview tooling cannot start a second one on Kong's port.
  • The Board segment click takes .first(); an empty board resolved two "Board" texts.

Verified

Locally against the export with the local stack and seeded fixtures, CI settings (CI=true, one worker):

run result
green 22 passed, 0 failed, 1.6 min
red (E2E_BREAK_APPLICATIONS=1, preconditions only) fails on exactly "The kanban is empty…" and "No applications in the "new" column…"

On a real runner: workflow dispatched on this branch as run 35228884569; result to be posted below before merge.

Acceptance from #807

🤖 Generated with Claude Code

thinkclay and others added 2 commits September 17, 2026 09:39
…ort, and prove its red path (#807)

Nothing in CI ran the root playwright.config.ts: e2e-nightly.yml executed
the app-level config only, so the office suites had never run anywhere
but a laptop. A second nightly job now does, the way #553 found works:

- `expo export --platform web` served by `expo serve` on 8081, not
  `expo start --web`, which OOMs Metro's 8 GB heap under parallel SSR
  page loads. Locally the export serves the suite in 1.6 min at one
  worker.
- The job names the spec files with a verified green run instead of
  running the config unfiltered. Run in full for the first time, the
  root allow-list is 29/123 red — stale selectors in the auth, webhooks,
  api-keys, hardening, user-journeys and profile-audit specs (#810). A
  nightly that is red from day one is the "known-red selection" the
  config's own comments warn against.
- A "Prove the red path" step runs the fixture-precondition block with
  E2E_BREAK_APPLICATIONS=1, under which the spec answers the employer
  applications endpoint with an empty list, and passes only if that run
  fails. That is #553's third acceptance box made repeatable; a route
  intercept rather than an edge-function revert, because the local edge
  runtime serves whichever checkout started it.
- The Board segment click takes `.first()`: on an empty board the
  segmented control resolved two "Board" texts.

Verified locally against the export with the local stack: green run
22 passed / 0 failed with CI settings; red run fails on exactly the two
precondition tests ("The kanban is empty…", "No applications in the
"new" column…").

Co-Authored-By: Claude Fable 5.1 <[email protected]>
… app host

The admin and user setup steps built the localStorage key from the
page's hostname and hard-mapped "localhost" to "127", which only holds
when EXPO_PUBLIC_SUPABASE_URL is 127.0.0.1. CI builds the export with
http://localhost:54321, so supabase-js in the app read
`sb-localhost-auth-token`, found nothing, and every dispatched run
bounced to /auth (run 35228884569: 6 failed, 1 passed — the super-admin
step, which already derived the key from the URL).

All three steps now use getStorageKey(), the same first-hostname-label
rule supabase-js applies (SupabaseClient.js: `sb-${hostname.split('.')[0]}-auth-token`).

Verified locally with an export built the way CI builds it (no .env
files, EXPO_PUBLIC_SUPABASE_URL=http://localhost:54321) and the same
URL in the test process: all three setup steps pass first attempt.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@thinkclay

Copy link
Copy Markdown
Contributor Author

On a real runner, run 35231504914 on this branch: both jobs green. In the new e2e-office job every step passed — export, serve, Run the office suites, Prove the red path (the precondition block failed under E2E_BREAK_APPLICATIONS=1, as the step requires), and the report upload.

The first dispatch (35228884569) failed with every setup step bouncing to /auth: the admin and user steps derived the localStorage key from the app host and hard-mapped localhost to 127, which only holds when EXPO_PUBLIC_SUPABASE_URL is 127.0.0.1. CI builds the export with http://localhost:54321, so the client read sb-localhost-auth-token and found nothing. Fixed in 8c7fa26 by deriving the key from the Supabase URL in all three steps, the same first-hostname-label rule supabase-js applies. Reproduced and verified locally with an export built the way CI builds it (no .env files present; Expo silently reads apps/scaffald/.env.local, which is why the first local reproduction attempt still baked 127.0.0.1).

@thinkclay
thinkclay merged commit 9ef9b15 into main Sep 17, 2026
11 checks passed
@thinkclay
thinkclay deleted the ci/root-e2e-nightly branch September 17, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

e2e: run the root Playwright config (office suites) in CI against a static web export

1 participant