Skip to content

Fix e2e tests on Node 24 and re-enable them in CI - #118

Merged
abernier merged 11 commits into
mainfrom
e2e-node24
Jul 30, 2026
Merged

Fix e2e tests on Node 24 and re-enable them in CI#118
abernier merged 11 commits into
mainfrom
e2e-node24

Conversation

@abernier

@abernier abernier commented Jul 30, 2026

Copy link
Copy Markdown
Member

Problem

pnpm test has been broken locally since the Node 24 bump (16e8b16), and silently disabled in CI since the pnpm catalogs migration (#104) — the CI test step was commented out, so nothing caught it. On top of that, the CI turbo cache had been silently dead for months.

Two distinct e2e failures on Node 24:

  1. Crash: Node 24 loads playwright.config.ts natively with type stripping (bypassing Playwright's Babel transform), and PlaywrightTestConfig is a type-only export → SyntaxError at import.
  2. Deadlock: Playwright 1.45.3's ESM loader thread deadlocks on Node 24 (stuck in MessagePort processing, no browser ever launches) — the run hangs forever.

Changes

  • import type in packages/e2e/playwright.config.ts
  • @playwright/test 1.45.3 → 1.62.0 (Node 24 support) + CI image → playwright:v1.62.0-jammy
  • turbo 2.9.4 → 2.10.7 (2.9.4 couldn't parse the patchedDependencies format pnpm 11 writes in the lockfile)
  • CI: caching-for-turbo v1.5 → v2.5.1 — v1.x predates GitHub's cache service v2 migration and had been silently failing to save: the repo had zero turbo cache entries, every CI run rebuilt all 160 demos. Verified fixed: a rerun goes Cached: 160/161 in ~30s (FULL TURbo).
  • CI: test step re-enabled (only 3 demos are wired into e2e: aquarium, backdrop-and-cables, baking-soft-shadows)
  • CI: workflow_dispatch input update_snapshots to regenerate baselines on the runner: gh workflow run CI --ref <branch> -f update_snapshots=true, then commit the run's snapshots artifact. Uses turbo --force (a cached test task would restore the stale baselines being regenerated) and --update-snapshots=all. Regen dispatches skip build/deploy; deploy is now also pinned to refs/heads/main (the github-pages environment protection already rejected non-main deploys).
  • Linux baselines regenerated under Chromium 151 (the Chromium 127 aquarium baseline drifted right at the 5% threshold: flaky red). Playwright test timeout 30s → 60s (flaked on 2-core runners under parallel load).

Verified

  • Local (macOS/Node 24.12): pnpm --filter @demo/aquarium test → 1 passed.
  • CI cache: rerun of the same commit → 160/161 cached, test step 30s vs 13min cold.
  • Baseline regen dispatch (run 30529310256): 3/3 passed, all baselines rewritten.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

abernier and others added 7 commits July 30, 2026 07:58
…s the config natively, where PlaywrightTestConfig has no runtime export

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
…npm 11

Playwright 1.45.3 predates Node 24: its ESM loader thread deadlocks before
any browser launches, so every e2e test hung forever. 1.62.0 runs fine.

Turbo 2.9.4 could not parse the patchedDependencies format written by
pnpm 11 in pnpm-lock.yaml (bare hash string); 2.10.7 parses it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
The test step had been commented out since the pnpm catalogs migration
(#104). Note: only 3 demos have linux baselines; the others will fail
with 'snapshot doesn't exist' until their baselines are generated in
the CI container.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
The repo's Actions cache contains only setup-node pnpm-store entries —
zero turbo artifacts — so every CI run rebuilds all 160 demos. v1.x of
the action predates GitHub's cache service v2 migration (legacy backend
shut down early 2025) and has been silently failing to save since.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
gh workflow run CI --ref <branch> -f update_snapshots=true
then download the 'snapshots' artifact and commit it. Baselines must be
generated on the CI runner (amd64 + CI Chromium build) to match what
the test step compares against.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
abernier and others added 4 commits July 30, 2026 09:01
The github-pages environment protection already rejects non-main deploys
(the regen dispatch run failed on this); make it explicit and stop
wasting the build on regen runs.

Also drop the stale aquarium linux baseline (Chromium 127): its drift
under Chromium 151 sits right at the 5% threshold, so update-snapshots
'changed' mode won't reliably rewrite it — a missing baseline always is.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
--force because a cached test task restores its cached outputs — i.e.
the very stale baselines being regenerated (bitten by this: a regen run
went FULL TURBO and resurrected a deleted baseline). =all because mode
'changed' keeps baselines whose drift sits under the diff threshold.
e2e-test now forwards the mode value to playwright.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
…ner)

Generated by the update_snapshots dispatch (run 30529310256).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
Regenerate locally on demand: pnpm --filter @demo/aquarium test -- --update-snapshots

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe
@abernier
abernier merged commit 726bea3 into main Jul 30, 2026
2 checks passed
@abernier
abernier deleted the e2e-node24 branch July 30, 2026 09:29
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.

1 participant