[Build] Test suite exceeds 900s verify-gate budget — split or scope #122

Closed
opened 2026-06-30 08:09:46 +00:00 by Mark · 0 comments
Owner

Problem

The full npm test (and npx vitest run equivalent) on the kin app exceeds the kilo-gsd verify-gate budget of 900s. As of 2026-06-29 the full run takes longer than 900 seconds on a clean machine, causing every dispatch that uses npm test as a verify command to fail the gate after Bugfix retries exhaust.

Confirmed empirically:

  • npx vitest run --no-coverage (full suite): >900s
  • npx vitest run <single file> (e.g. touched tests for #105): ~3s
  • Some other file is the slow one. Pre-existing slowness, not caused by #105.

Why this matters

Every kilo-gsd dispatch on this repo currently hits the same wall. The verify gate times out before Bugfix retries burn up and the issue gets parked as blocked:needs-attention. This blocks the dispatch queue globally.

Scope (proposed)

Identify the slow test file via time npx vitest run <file> against each of the 49 test files. Once the slow file is found, two options:

  1. Split the test target — add a smaller npm test:unit that runs only the fast subset, used as the gate command. Full suite stays as npm test.
  2. Slow test optimization — instrument the slow test, address the actual slowness (sleep, network, animation timer, etc.).

Recommend (1) as the dispatchable fix; (2) as a follow-up.

Constraints

  • Don't disable tests.
  • Don't raise the gate budget globally — that hides the problem.
  • Don't hardcode a test list — derive it from find src -name '*.test.*' at config time so new tests aren't silently dropped.

Verification

  • time npm run test:unit (proposed) returns under 90s
  • Full npm test still runs end-to-end (just not as the gate)
  • kilo-gsd dispatch on #105 (and any subsequent) clears the verify gate on first try
## Problem The full `npm test` (and `npx vitest run` equivalent) on the kin app exceeds the kilo-gsd verify-gate budget of 900s. As of 2026-06-29 the full run takes longer than 900 seconds on a clean machine, causing every dispatch that uses `npm test` as a verify command to fail the gate after Bugfix retries exhaust. Confirmed empirically: - `npx vitest run --no-coverage` (full suite): >900s - `npx vitest run <single file>` (e.g. touched tests for #105): ~3s - Some other file is the slow one. Pre-existing slowness, not caused by #105. ## Why this matters Every kilo-gsd dispatch on this repo currently hits the same wall. The verify gate times out before Bugfix retries burn up and the issue gets parked as `blocked:needs-attention`. This blocks the dispatch queue globally. ## Scope (proposed) Identify the slow test file via `time npx vitest run <file>` against each of the 49 test files. Once the slow file is found, two options: 1. **Split the test target** — add a smaller `npm test:unit` that runs only the fast subset, used as the gate command. Full suite stays as `npm test`. 2. **Slow test optimization** — instrument the slow test, address the actual slowness (sleep, network, animation timer, etc.). Recommend (1) as the dispatchable fix; (2) as a follow-up. ## Constraints - Don't disable tests. - Don't raise the gate budget globally — that hides the problem. - Don't hardcode a test list — derive it from `find src -name '*.test.*'` at config time so new tests aren't silently dropped. ## Verification - `time npm run test:unit` (proposed) returns under 90s - Full `npm test` still runs end-to-end (just not as the gate) - kilo-gsd dispatch on #105 (and any subsequent) clears the verify gate on first try
Mark 2026-07-01 23:21:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_kin_app_sync#122
No description provided.