mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
chore(turbo): lint against recursive \turbo run\ calls in child packages
CLAUDE.md flagged this as "CRITICAL" — a child package.json defining e.g. \`"build": "turbo run build"\` causes a 10+ minute CI hang with thousands of duplicate task spawns. The rule was documented but never enforced, so it re-emerged every couple of months as someone copied a parent script pattern. - \`scripts/validate-no-recursive-turbo.mjs\` walks every tracked package.json (via \`git ls-files\`, so node_modules is auto-skipped) and fails if any non-root package has build/type-check/lint/test/ test:coverage/check scripts containing \`turbo run\`. \`dev\` stays allowed — delegating it from a parent is the intended ergonomic. - Wired as \`pnpm run validate:turbo\` + a new CI step in the validate job (before type-check — fails fast). - CLAUDE.md §Turborepo updated to point at the enforcer and call out the full task list (test/test:coverage/check were missing from the original prose). Verified: 138 non-root package.json files scan clean. Drift simulation (injecting \`"build": "turbo run build"\` into apps/mana/apps/web) fails with a clear message pointing at the offending file + script + fix. This closes audit item #32 from the architecture review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c7af693c6d
commit
1eda3f5395
4 changed files with 98 additions and 1 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -440,6 +440,9 @@ jobs:
|
|||
- name: Validate monorepo best practices
|
||||
run: pnpm run validate:monorepo
|
||||
|
||||
- name: Validate no recursive turbo calls
|
||||
run: pnpm run validate:turbo
|
||||
|
||||
- name: Audit crypto registry (Dexie ↔ registry ↔ allowlist)
|
||||
run: pnpm run check:crypto
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue