Skip to content

fix(e2e): stop caching tsc incremental state so Playwright always has dist/#1842

Merged
numnx merged 1 commit into
codeux-ai:devfrom
numnx:fix/e2e-tsc-cache-skips-dist-emit
Jun 30, 2026
Merged

fix(e2e): stop caching tsc incremental state so Playwright always has dist/#1842
numnx merged 1 commit into
codeux-ai:devfrom
numnx:fix/e2e-tsc-cache-skips-dist-emit

Conversation

@numnx

@numnx numnx commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Playwright E2E Tests job fails intermittently with:

[WebServer] Error: Cannot find module '/home/runner/work/codeux/codeux/dist/index.js'
Error: Process from config.webServer was not able to start. Exit code: 1

Root cause

The server build runs tsc --incremental --tsBuildInfoFile .cache/tsc/server-build.tsbuildinfo, emitting to dist/. The Playwright workflow restored .cache/tsc but never cached the matching dist/ output. On a cache hit, incremental tsc reads the restored .tsbuildinfo, concludes nothing changed, and emits nothing — so dist/index.js is absent and the Playwright webServer (node dist/index.js) crashes. The dashboard/vite half always builds because vite unconditionally emits.

This matches the run history: the job passed only when the tsc cache missed (full emit) and failed once a prior run (e.g. on main) populated the shared e2e-cache key.

Fix

Cache only Vite's transform cache and drop .cache/tsc from the Playwright workflow, so the server tsc always performs a full emit. Vite caching is unaffected.

Testing

CI on this PR exercises the fix directly — the Playwright job should now find dist/index.js and start the web server regardless of cache state.

🤖 Generated with Claude Code

The Playwright workflow restored .cache/tsc (the server build's
--tsBuildInfoFile) but never cached the matching dist/ output. On a cache
hit, incremental tsc reads the restored .tsbuildinfo, concludes nothing
changed, and emits nothing — leaving dist/index.js absent. The Playwright
webServer then fails to start with "Cannot find module dist/index.js".

This made the job pass only when the tsc cache missed and fail whenever a
prior run (e.g. on main) had populated the shared e2e cache key, which
matched the intermittent failure pattern in run history.

Cache only Vite's transform cache and drop .cache/tsc so the server tsc
always performs a full emit. Vite always emits, so its cache was never
affected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@numnx numnx merged commit dd1656a into codeux-ai:dev Jun 30, 2026
4 checks passed
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