From 7d644073991b5b9aa7e8ab0bc1528fb4030dc65b Mon Sep 17 00:00:00 2001 From: Micah Alpern Date: Wed, 29 Jul 2026 09:47:49 -0700 Subject: [PATCH] Relax wall-clock bound in canonical capture timeout test 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 --- Tests/KeyPathTests/Services/SystemValidatorTests.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tests/KeyPathTests/Services/SystemValidatorTests.swift b/Tests/KeyPathTests/Services/SystemValidatorTests.swift index aa5f5f796..110c3a445 100644 --- a/Tests/KeyPathTests/Services/SystemValidatorTests.swift +++ b/Tests/KeyPathTests/Services/SystemValidatorTests.swift @@ -300,7 +300,9 @@ struct SystemValidatorTests { } #expect(snapshot.captureStatus == .timedOut) - #expect(started.duration(to: clock.now) < .milliseconds(250)) + // Generous bound: only guards against boundedCapture hanging past its + // 10ms deadline, not scheduling latency on a loaded runner. + #expect(started.duration(to: clock.now) < .seconds(5)) } @Test("Canonical capture returns completed evidence before its deadline")