Description
10 Go test files call time.Sleep for synchronization/timing purposes without t.Parallel(), serializing wall-clock time that could otherwise overlap and making the tests fragile on slow filesystems/CI runners:
pkg/console/spinner_test.go (7 sleeps — most sleep-heavy file)
pkg/cli/compile_context_cancellation_test.go (3)
pkg/cli/run_push_test.go (3 — three 100ms sleeps)
pkg/workflow/compiler_skip_write_test.go (3 — three 100ms sleeps used purely to separate file mtimes)
pkg/cli/mcp_inspect_inspector_test.go (2)
pkg/cli/logs_orchestrator_test.go, pkg/cli/compile_integration_test.go, pkg/cli/logs_summary_integration_test.go, pkg/workflow/compiler_test.go, pkg/logger/logger_test.go (1 each)
The compiler_skip_write_test.go and run_push_test.go cases are the clearest wins: both use a hardcoded 100ms sleep three times purely to force distinguishable file-modification timestamps between writes, rather than asserting on content/hash directly or using a monotonic clock injection — a pattern that is both slow (300ms+ serial per test) and theoretically flaky on filesystems with coarser mtime resolution.
Expected Impact
Adding t.Parallel() where the test body has no shared mutable state lets these tests overlap instead of serializing, and replacing the two hardcoded mtime-differentiation sleeps with direct content/hash assertions (or an injectable clock) removes both the wall-clock cost and the filesystem-timing fragility.
Suggested Agent
GitHub Copilot coding agent (test-only change: add t.Parallel() to the 10 listed files where safe, and refactor the two mtime-differentiation sleep patterns in compiler_skip_write_test.go/run_push_test.go).
Estimated Effort
Quick (< 1 hour) for the t.Parallel() additions; the two mtime-sleep refactors are closer to Medium given they touch assertion logic.
Data Source
DeepReport Intelligence Briefing — 2026-10-01, sourced from Repository Quality Improvement Report #64772 ("Uncancellable Sleep & Sleep-Based Test Synchronization"), file list independently re-verified via grep -rl time.Sleep --include=*_test.go pkg/ cross-checked against t.Parallel() presence.
Generated by 🔬 Deep Report · claude · agent · 302 AIC · ⌖ 15.3 AIC · ⊞ 7.3K · ◷
Description
10 Go test files call
time.Sleepfor synchronization/timing purposes withoutt.Parallel(), serializing wall-clock time that could otherwise overlap and making the tests fragile on slow filesystems/CI runners:pkg/console/spinner_test.go(7 sleeps — most sleep-heavy file)pkg/cli/compile_context_cancellation_test.go(3)pkg/cli/run_push_test.go(3 — three 100ms sleeps)pkg/workflow/compiler_skip_write_test.go(3 — three 100ms sleeps used purely to separate file mtimes)pkg/cli/mcp_inspect_inspector_test.go(2)pkg/cli/logs_orchestrator_test.go,pkg/cli/compile_integration_test.go,pkg/cli/logs_summary_integration_test.go,pkg/workflow/compiler_test.go,pkg/logger/logger_test.go(1 each)The
compiler_skip_write_test.goandrun_push_test.gocases are the clearest wins: both use a hardcoded 100ms sleep three times purely to force distinguishable file-modification timestamps between writes, rather than asserting on content/hash directly or using a monotonic clock injection — a pattern that is both slow (300ms+ serial per test) and theoretically flaky on filesystems with coarser mtime resolution.Expected Impact
Adding
t.Parallel()where the test body has no shared mutable state lets these tests overlap instead of serializing, and replacing the two hardcoded mtime-differentiation sleeps with direct content/hash assertions (or an injectable clock) removes both the wall-clock cost and the filesystem-timing fragility.Suggested Agent
GitHub Copilot coding agent (test-only change: add
t.Parallel()to the 10 listed files where safe, and refactor the two mtime-differentiation sleep patterns incompiler_skip_write_test.go/run_push_test.go).Estimated Effort
Quick (< 1 hour) for the
t.Parallel()additions; the two mtime-sleep refactors are closer to Medium given they touch assertion logic.Data Source
DeepReport Intelligence Briefing — 2026-10-01, sourced from Repository Quality Improvement Report #64772 ("Uncancellable Sleep & Sleep-Based Test Synchronization"), file list independently re-verified via
grep -rl time.Sleep --include=*_test.go pkg/cross-checked againstt.Parallel()presence.