pnpm test:e2e replays a cached pass after app code changes because the task hash covers only the testing package
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- build-system, testing
Research direction
Read the test:e2e task in turbo.json and the “Turbo task graph” section of .agents/docs/architecture/testing-strategy.md. Add cache: false to the task and update the documentation to match. Verify with pnpm exec turbo run test:e2e --dry=json that @opendatacapture/testing#test:e2e reports cache: false, then run pnpm test:e2e twice and confirm the second run starts the web servers rather than replaying cached logs.
Written by the indexing model from the issue text.
Description
pnpm test:e2e can replay an earlier pass instead of running Playwright against the code you just changed. Turbo caches the test:e2e task by default. In turbo.json it declares no cache: false, and the only package that owns the script, @opendatacapture/testing, hashes just its own files and the builds of its own dependencies (schemas, playground-url, type-fest). apps/api, apps/gateway, apps/web and apps/playground are what the suite exercises, but testing does not depend on them, so their source is not part of the hash. After one green run, edit any file in those apps and run pnpm test:e2e again: Turbo reports a cache hit for @opendatacapture/testing#test:e2e, prints the old logs and exits 0 without starting a browser. The root AGENTS.md makes pnpm test:e2e the end-to-end gate in "Before you are done", so a regression in an app can be reported as e2e-green. CI is not affected, because nothing persists .turbo between runs.
Where
turbo.json:41-43:
"test:e2e": {
"dependsOn": ["^build", "^db:generate", "db:push"]
},
testing/package.json depends on @douglasneuroinformatics/libjs, @opendatacapture/playground-url, @opendatacapture/schemas, @playwright/test and type-fest, and on no app.
Reproduce
- Run
pnpm exec turbo run test:e2e --dry=jsonand note thehashof@opendatacapture/testing#test:e2e(resolvedTaskDefinition.cacheistrue). - Add or edit any file under
apps/web/srcorapps/api/src. - Repeat step 1.
Actual: the hashes of @opendatacapture/web#test:e2e and @opendatacapture/api#test:e2e change, but @opendatacapture/testing#test:e2e keeps the same hash (7f787e155ec6b83e before and after in a local check). After a passing run, step 3 followed by pnpm test:e2e is a cache hit that replays the old result.
Expected: every pnpm test:e2e runs the suite against the current app code.
Tests
No unit or Playwright test can observe Turbo's cache. Verify the fix with pnpm exec turbo run test:e2e --dry=json. @opendatacapture/testing#test:e2e should report "cache": false in resolvedTaskDefinition, and a second consecutive pnpm test:e2e should start the web servers again instead of printing cache hit, replaying logs.
Suggested fix
Add "cache": false to the test:e2e task in turbo.json. The suite drives live servers and a database, so a cached result is never valid. Then update the "Turbo task graph" section of .agents/docs/architecture/testing-strategy.md to match.
- Dominant language
- TypeScript
- Stars
- 119
- Forks
- 19
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 56
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DouglasNeuroInformatics/OpenDataCapture
-
Area: Playground Bug Difficulty: Low Good First Issue Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
DouglasNeuroInformatics/OpenDataCapture#1805 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DouglasNeuroInformatics/OpenDataCapture#1801 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Good First Issue Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
DouglasNeuroInformatics/OpenDataCapture#1800 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Good First Issue Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
DouglasNeuroInformatics/OpenDataCapture#1799 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Performance Priority: Medium
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
DouglasNeuroInformatics/OpenDataCapture#1795 ·
Maintainers usually reply within 1 day
All issues in DouglasNeuroInformatics/OpenDataCapture
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
lukilabs/beautiful-mermaid#160 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
rescript-lang/rescript-lang.org#1420 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
chthollyphile/folia-major#520 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
databuddy-analytics/Databuddy#1106 ·
Maintainers usually reply within 1 day