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

@ -33,6 +33,19 @@ body:
validations:
required: false
- type: textarea
id: acceptance
attributes:
label: Acceptance Criteria
description: "Describe the concrete behaviors or outcomes that should be validated before this is considered done."
placeholder: |
Example:
- API route returns 200 with valid payload
- Unit coverage added for the new branch
- Existing integrations remain green
validations:
required: true
- type: dropdown
id: area
attributes:
@ -68,3 +81,16 @@ body:
description: "Any other context, mockups, or references."
validations:
required: false
- type: textarea
id: test-plan
attributes:
label: Expected Test Plan
description: "Which automated tests or coverage changes should accompany this work?"
placeholder: |
Example:
- Add unit tests for open-sse/services/combo.ts
- Extend integration coverage for /api/v1/models
- Keep npm run test:coverage at 60%+
validations:
required: false