проектdocs/Agents/rules/ci-type-check-first.md
ci-type-check-first.md
Обновлён 1 апр. 2026 г., 12:41 · 0 комментариев
title: Run Type Check Before Tests impact: HIGH impactDescription: Type errors are often the root cause of test failures tags: ci, typescript, type-check
Паспорт документа
- Статус документа: living standard
- Актуально на: 28 марта 2026 года
- Владелец: backend/platform-команда
- Пересмотр: при изменении инженерной практики, CI/CD, архитектурных правил или локального workflow
- Область применения: внутренние rule/reference-card документы для инженерной команды
- Связанные документы:
Run Type Check Before Tests
Impact: HIGH
Always run pnpm type-check before running tests. Many test failures are caused by type errors. Fixing types first often resolves test issues.
Order of Checks
pnpm type-check— Fix type errors firstpnpm lint— Fix linting issuespnpm test— Run unit testspnpm e2e— Run E2E tests (if needed)
After Schema Changes
If you changed schema.prisma, always regenerate types first:
pnpm --filter=api prisma generate
pnpm type-check
Rules
- Type errors before test failures — fix types first
- If CI fails, run
pnpm type-checklocally before debugging tests - Missing type errors after
prisma generateusually mean stale generated client - Run type check on changed packages:
pnpm --filter=web type-check