OmniRoute/.github/copilot-instructions.md
diegosouzapw 78db90e4bf chore: optimize local git hooks and fix T11 any budget strictness
- Removed the expensive (40s+) `npm run test:unit` step from the `pre-commit` hook
- Created `.husky/pre-push` to run the unit test suite before pushing rather than per commit
- This prevents spurious async teardown errors from local test runners from blocking fast commits
- Replaced an explicit `any` cast with `Record<string, unknown> | undefined` in `chatCore.ts` to pass the `check:any-budget:t11` strict checker which enforces a budget of 0
2026-04-06 00:29:54 -03:00

981 B

OmniRoute PR and Coverage Instructions

  • Treat npm run test:coverage as a required gate for PR work.
  • The repository minimum is 60% for statements, lines, functions, and branches.
  • If a PR changes production code in src/, open-sse/, electron/, or bin/, it must include automated tests in the same PR.
  • When reviewing or updating a PR, if the report shows missing tests or coverage below 60%, do not stop after reporting the problem. Add or update tests in the PR first, rerun the coverage gate, and only then ask for confirmation.
  • Prefer the smallest test layer that proves the behavior:
    • unit tests first
    • integration tests when multiple modules or DB state are involved
    • e2e only when the behavior is truly UI or workflow-dependent
  • For bug issues, try to encode the reproduction as an automated test before or alongside the fix.
  • In the final PR report, include:
    • the commands you ran
    • the changed test files
    • the final coverage result