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
This commit is contained in:
diegosouzapw 2026-04-06 00:29:54 -03:00
parent 592ca9b5c4
commit 78db90e4bf
17 changed files with 617 additions and 65 deletions

View file

@ -119,6 +119,20 @@ body:
validations:
required: true
- type: dropdown
id: test-impact
attributes:
label: Test Impact
description: "What automated test coverage should exist for this bug?"
options:
- Needs a new unit test
- Needs a new integration test
- Needs a new e2e test
- Existing automated test already fails
- Unsure
validations:
required: true
- type: textarea
id: logs
attributes:
@ -143,3 +157,15 @@ body:
description: "Any other context about the problem (e.g. proxy config, number of accounts, network setup)."
validations:
required: false
- type: textarea
id: validation-plan
attributes:
label: Validation Plan
description: "Which commands or tests should prove this bug is fixed?"
placeholder: |
Example:
- node --import tsx/esm --test tests/unit/my-file.test.mjs
- npm run test:coverage
validations:
required: false