fix(ci): hash root configs and infra fixtures into the Turbo cache #360

Manually merged
ullrich merged 1 commit from ci/turbo-cache-inputs into main 2026-11-18 08:58:20 +00:00
Owner

Problem

CI keeps the Turbo cache between runs (/ci-cache). A cache hit replays the old result. Turbo hashed only the files inside each package, so a change to one of these files got a cached green result for typecheck, lint and test:

  • tsconfig.base.json, vitest.shared.ts, vitest.setup.ts, eslint.config.js (every package uses them)
  • infrastructure/scripts/poi-selectors.sql and infrastructure/brouter-host/poi-extract/osmium-filters.txt (the map-core sync tests read them)

Change

  • Root configs become globalDependencies.
  • The two fixtures become inputs of @trails-cool/map-core#test. The declaration is in the root turbo.json, so this PR changes no file below packages/ and starts no preview deployment.

Verification

turbo run … --dry=json, task hashes before and after a one-line change:

Changed file Before this PR With this PR
vitest.shared.ts, vitest.setup.ts, tsconfig.base.json, eslint.config.js no hash changes all task hashes change
poi-selectors.sql, osmium-filters.txt no hash changes only map-core#test changes
infrastructure/docker-compose.yml, README.md no hash changes no hash changes

Cost: the first CI run after the merge has no cache hits. After that, the cache misses only when one of these files changes.

🤖 Generated with Claude Code

## Problem CI keeps the Turbo cache between runs (`/ci-cache`). A cache hit replays the old result. Turbo hashed only the files inside each package, so a change to one of these files got a cached green result for typecheck, lint and test: - `tsconfig.base.json`, `vitest.shared.ts`, `vitest.setup.ts`, `eslint.config.js` (every package uses them) - `infrastructure/scripts/poi-selectors.sql` and `infrastructure/brouter-host/poi-extract/osmium-filters.txt` (the map-core sync tests read them) ## Change - Root configs become `globalDependencies`. - The two fixtures become inputs of `@trails-cool/map-core#test`. The declaration is in the root `turbo.json`, so this PR changes no file below `packages/` and starts no preview deployment. ## Verification `turbo run … --dry=json`, task hashes before and after a one-line change: | Changed file | Before this PR | With this PR | |---|---|---| | `vitest.shared.ts`, `vitest.setup.ts`, `tsconfig.base.json`, `eslint.config.js` | no hash changes | all task hashes change | | `poi-selectors.sql`, `osmium-filters.txt` | no hash changes | only `map-core#test` changes | | `infrastructure/docker-compose.yml`, `README.md` | no hash changes | no hash changes | Cost: the first CI run after the merge has no cache hits. After that, the cache misses only when one of these files changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ci): hash root configs and infra fixtures into the Turbo cache
All checks were successful
CI / Security Scan (pull_request) Successful in 9s
CI / Dockerfile Package Check (pull_request) Successful in 4s
CI / Visual Tests (pull_request) Successful in 45s
CI / Journal Image Smoke Test (pull_request) Successful in 1m31s
CI / Checks (pull_request) Successful in 2m59s
CI / E2E Tests (pull_request) Successful in 4m37s
CD Staging / Build & Push journal Image (pull_request) Has been skipped
CD Staging / Build & Push planner Image (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
Cancel superseded CI / Cancel in-flight CI (pull_request) Successful in 4s
CD Staging / Tear Down PR Preview (pull_request) Successful in 12s
6bc22e5ec4
CI keeps the Turbo cache between runs, and a cache hit replays the old
result. Turbo hashed only the files inside each package, so these inputs
did not invalidate the cache:

- tsconfig.base.json, vitest.shared.ts, vitest.setup.ts and
  eslint.config.js, which every package uses
- infrastructure/scripts/poi-selectors.sql and
  infrastructure/brouter-host/poi-extract/osmium-filters.txt, which the
  map-core sync tests read

A change to one of them got a cached green result for typecheck, lint
and test. Declare the root configs as globalDependencies and the two
fixtures as inputs of the map-core test task.

Verified with turbo --dry=json: the task hashes now change when one of
these files changes, and stay the same for unrelated files.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ullrich manually merged commit c343b96a09 into main 2026-11-18 08:58:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!360
No description provided.