You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ce-work fixture cache reuses deleted seed repositories across test files #1745
ce-work test files reuse a cached seed repository after another file's cleanup has deleted it. This is reproducible on pristine main at 65dd958da881843868daa219c7f0a5a0e694d9db, before any follow-up edits.
This bug predates and is independent of #1735. The seed cache was introduced in commit 5985d821b9413f590184531d4c35e435d2356abb (2026-08-26, #1548).
Reproduction
Linux x86_64, Bun 1.4.2. In a clean checkout of the commit above:
bun install --frozen-lockfile
bun --version
bun test tests/skills/ce-work-unit-workspace-fallback.test.ts tests/skills/ce-work-unit-workspace-init.test.ts
Result: 17 pass, 17 fail. The failures include:
error: ENOENT: no such file or directory, lstat '/tmp/ce-work-repo-template-.../repo'
at makeRepo (tests/skills/helpers/ce-work-workspace-harness.ts:127:3)
Each file passes in a separate process:
bun test tests/skills/ce-work-unit-workspace-fallback.test.ts
# 15 pass, 0 fail
bun test tests/skills/ce-work-unit-workspace-init.test.ts
# 19 pass, 0 fail
File isolation also avoids the failure:
bun test --isolate tests/skills/ce-work-unit-workspace-fallback.test.ts tests/skills/ce-work-unit-workspace-init.test.ts
# 34 pass, 0 fail
Root cause and scope
In ce-work-workspace-harness.ts, seedTemplates is a module-level map. seedTemplate() returns its cached path without checking whether the template still exists. The helper's afterAll removes every directory in templateRoots, but does not invalidate the cache. With a shared module registry across files, the next file's makeRepo() calls cpSync() on that deleted path.
This distinction matters for the earlier full-suite report: Bun 1.3.11 does not expose --parallel or --isolate, although the current bun run test script supplies --parallel. On that version, the pristine full suite produced 4099 pass, 2 skip and 62 fail, including 60 missing-template errors. The fallback and init files still passed individually on that version.
With Bun 1.4.2, the repository's normal bun run test uses --parallel, which implies file isolation. Its pristine full run had no missing-template errors (4159 pass, 2 skip, 2 separate route/integration failures). This report is about the deterministic non-isolated multi-file failure, not a claim that current CI's isolated run suffers it.
The existing #1635 report concerns nondeterministic transaction failures within a single integration test file; it does not describe this deleted seed/cache failure.
Activity