1// Detects Turborepo cache bypass patterns that cause every commit to rebuild every project,2// driving Build Minutes to dominate the bill on monorepos.3//4// Three signal subtypes:5// force-flag — `TURBO_FORCE=true` env var or `turbo run ... --force` in build script6// cache-disabled — `turbo.json` declares `"cache": false` for the build pipeline7// no-ignore-step — repo has turbo.json and no repo-declared ignoreCommand;8// verify Vercel's skip-unaffected project setting before recommending one9//10// This pattern has caused full-monorepo rebuilds on every commit. Build-skip11// settings and right-sized build machines can reduce Build Minutes when the12// project is rebuilding unchanged work.1314export
19 trafficIndependent: true, // build-time, fires regardless of route traffic
20 description:
21 "Turborepo's per-task cache can be bypassed by an explicit force flag, a `cache: false` config, or missing build-skip configuration. Every commit can rebuild unchanged work; Build Minutes climb with project count.",
22 fix:
23 "Remove `TURBO_FORCE=true` from build env/scripts unless intentional. Set `tasks.build.cache: true` in `turbo.json` (or remove the override), and include generated outputs in Turbo's cache contract. Prefer Vercel's skip-unaffected monorepo behavior when available; use `ignoreCommand` only when that setting cannot cover the project.",