Relax wall-clock bound in canonical capture timeout test - #1245
Conversation
|
Widening the upper bound from 250ms to 5s (with the explanatory comment) is a reasonable fix for CI flakiness, but it substantially weakens this assertion's ability to catch a real regression — a runaway |
The 250ms bound measured real elapsed time and failed on a loaded CI runner (268ms in PR #1243's build-and-test job) despite being unrelated to the change under test. boundedCapture has no injectable clock, so keep the real-clock measurement but widen the bound to a generous 5-second hang guard: it still fails if the timeout path hangs instead of returning first-class timed-out evidence, without depending on scheduler latency. Co-Authored-By: Claude Fable 5 <[email protected]>
23c9546 to
7d64407
Compare
|
Reviewed the diff — no blocking issues. One minor observation: widening the bound from |
Summary
started.duration(to: clock.now) < .milliseconds(250)against a realContinuousClock. On a loaded CI runner it measured 268 ms and failed PR Add per-key wear and highlight variation to the keyboard stage #1243's build-and-test job (run 30470376137) despite being unrelated to that change.SystemValidator.boundedCapturehas no injectable clock (its timeout usesTask.sleepon the default clock), so rather than a larger refactor, the assertion keeps the real-clock measurement but widens the bound to a generous 5-second hang guard with a comment. The test still fails if the timeout path hangs instead of promptly returning first-class timed-out evidence, and thecaptureStatus == .timedOutassertion is unchanged.Testing
TEST_FILTER=SystemValidatorTests ./Scripts/run-tests-safe.sh— all 17 tests passed.Review gate
./Scripts/review-gate.sh: remote review gate selected; GitHubclaude-reviewmust pass before merge.🤖 Generated with Claude Code