Goal
src/tools/built-in/http.test.ts "rejects near the configured timeout" fails intermittently under load in the full suite (npm run test:coverage), then passes alone and on re-run. Seen by three round-2 agents on 2026-10-02/03 (N1a #318, A4 #322 failed it in two of four coverage runs). A flaky test hides real failures; make it deterministic.
Scope
- Make the test independent of wall-clock load: fake timers, or a mocked fetch that resolves on an injected clock, instead of a real delay compared to a real timeout.
- Keep what it proves: the request is aborted near the configured timeout and the error is the documented one.
- Check
src/security/credentialBroker.test.ts and guardrails.test.ts timeout tests (listed as flaky in the brief) for the same pattern; fix them in the same PR only if the fix is the same.
Acceptance criteria
- The test passes 20 times in a row inside the full suite run in parallel (
npx vitest run src/tools src/security src/guardrails repeated, or --repeat), on Windows.
- No production code change unless the test proves a real bug (then say so).
Labels: round-2 follow-up, model sonnet.
🤖 Generated with Claude Code
Goal
src/tools/built-in/http.test.ts"rejects near the configured timeout" fails intermittently under load in the full suite (npm run test:coverage), then passes alone and on re-run. Seen by three round-2 agents on 2026-10-02/03 (N1a #318, A4 #322 failed it in two of four coverage runs). A flaky test hides real failures; make it deterministic.Scope
src/security/credentialBroker.test.tsandguardrails.test.tstimeout tests (listed as flaky in the brief) for the same pattern; fix them in the same PR only if the fix is the same.Acceptance criteria
npx vitest run src/tools src/security src/guardrailsrepeated, or--repeat), on Windows.Labels: round-2 follow-up, model sonnet.
🤖 Generated with Claude Code