Skip to content

fix: build package before running its own e2e tests#167

Merged
uhyo merged 1 commit into
masterfrom
claude/ci-failure-master-hd360p
Jul 22, 2026
Merged

fix: build package before running its own e2e tests#167
uhyo merged 1 commit into
masterfrom
claude/ci-failure-master-hd360p

Conversation

@uhyo

@uhyo uhyo commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Problem

The e2e-vite7 CI job on master failed intermittently (example run) with:

Failed to resolve entry for package "@funstack/static" while loading e2e/fixture/vite.config.ts

Root cause

In turbo.json, test:e2e / test:e2e:dev only declared dependsOn: ["^build"], which covers upstream packages' builds but not the package's own build. Turbo therefore runs @funstack/static#build and @funstack/static#test:e2e concurrently, and tsdown cleans dist/ while the Playwright webServer is resolving @funstack/static (the e2e fixtures import from dist/ via package exports).

The regular ci job dodges this because its earlier pnpm run build step primes the Turbo cache, making the build task an instant replay during test:e2e. The e2e-vite7 job builds with pnpm --filter @funstack/static build, which bypasses Turbo's cache, so turbo run test:e2e re-executes the real build in parallel with the tests — a timing-dependent race.

Fix

Add the package's own build task to dependsOn for test:e2e and test:e2e:dev, so the build is always ordered before the e2e tests. Verified with turbo run test:e2e --dry=json that @funstack/static#test:e2e now depends on @funstack/static#build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JZUuLgc4ndfHC8GT7JWDv2


Generated by Claude Code

The test:e2e and test:e2e:dev turbo tasks only depended on ^build
(upstream packages), so @funstack/static#build could run concurrently
with @funstack/static#test:e2e. When the build was not already in the
turbo cache (as in the e2e-vite7 CI job, which builds via
pnpm --filter and bypasses turbo), tsdown cleaned dist/ while the
Playwright webServer was resolving @funstack/static, failing with
'Failed to resolve entry for package'. Depending on the package's own
build task removes the race.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZUuLgc4ndfHC8GT7JWDv2
@uhyo
uhyo merged commit 0fccb7d into master Jul 22, 2026
2 checks passed
@uhyo
uhyo deleted the claude/ci-failure-master-hd360p branch July 22, 2026 11:50
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.

2 participants