Tracking issue for the pinned entries in scripts/vitest-slow-test-reporter.ts (the slow-test gate). Every pin is a unit test that waits REAL time — production timeout constants, 1Hz poll loops, real retry backoff. Measured 2026-07-04: the unit suite's 48s wall clock was bounded by these files (worst single test: 10.8s proving "times out" by waiting out the full production budget).
Conversion patterns, in preference order:
- Budget-derived cadence (production-legit, no seams): poll intervals scale with the caller's timeout —
waitForAndroidEmulatorByAvdName conversion took devices.test.ts from 25.6s to 2.8s (9x) while making short-budget production calls more responsive.
- Budget-wiring assertion (for "times out" tests): don't re-prove the exec layer's timeout end-to-end per call site — mock the tool-command layer and assert the right
timeoutMs constant is passed. The exec layer's timeout semantics are proven once in its own tests. Requires the call site's test file to mock cleanly, which for the platform monolith test files rides the topology split (see AGENTS.md test-mirror rule).
- Fake clocks (
createFakeClock pattern) where the code takes an injected clock.
Rules: the pin list only shrinks, or grows in the same PR with a justification; no test-only DI seams (the CI gate enforces this) — prefer pattern 1 and 2, which are production improvements and test restructurings respectively.
Tracking issue for the pinned entries in
scripts/vitest-slow-test-reporter.ts(the slow-test gate). Every pin is a unit test that waits REAL time — production timeout constants, 1Hz poll loops, real retry backoff. Measured 2026-07-04: the unit suite's 48s wall clock was bounded by these files (worst single test: 10.8s proving "times out" by waiting out the full production budget).Conversion patterns, in preference order:
waitForAndroidEmulatorByAvdNameconversion tookdevices.test.tsfrom 25.6s to 2.8s (9x) while making short-budget production calls more responsive.timeoutMsconstant is passed. The exec layer's timeout semantics are proven once in its own tests. Requires the call site's test file to mock cleanly, which for the platform monolith test files rides the topology split (see AGENTS.md test-mirror rule).createFakeClockpattern) where the code takes an injected clock.Rules: the pin list only shrinks, or grows in the same PR with a justification; no test-only DI seams (the CI gate enforces this) — prefer pattern 1 and 2, which are production improvements and test restructurings respectively.