Skip to content

CI's test-suite step has no timeout, and four test files are severe runtime outliers from real subprocess invocations

Id: TD-PPagop-26082413 · Status: resolved · Filed: 2026-08-24 · Resolved: 2026-09-12 · Ref: #1383 · Review: reviews/project-review-2026-08-23 R-08 F-TEST-01 F-TEST-03

Severity: Medium

scripts/run-tests.sh wraps every test in timeout 600 bash "$t"; .github/workflows/build-image.yml‘s test-suite step runs the identical loop with no timeout at all, and no job sets timeout-minutes — a hang is bounded only by GitHub Actions’ default 6-hour job timeout, in a suite that includes tests exercising real signal/process-group handling with background sleep stand-ins. Separately, a full 140-file run on comparable hardware (no Docker; Ubuntu 24.04 + jq 1.7, matching the image’s own base) takes ~45-50 minutes, not the “a few minutes” README.md states, because 9 files are severe runtime outliers (doctor.test.sh ~6m23s, toggle.test.sh ~5m41s, review-not-before.test.sh ~4m49s, publish-dashboard.test.sh ~4m25s, review-claim.test.sh ~3m19s, config-schema.test.sh ~3m02s, role.test.sh ~2m54s, state-sync.test.sh ~1m57s, coordinator-input-wiring.test.sh ~1m22s — together ~34 of those minutes), from repeatedly invoking the real, large entry-point scripts as subprocesses rather than calling library functions directly. All 9 were confirmed as genuine passes when reproduced standalone without a time limit — this is a runtime characteristic, not a correctness bug.

The CI timeout gap likely fell through because scripts/run-tests.sh’s own timeout 600 was assumed to carry over when CI was set up to call it indirectly. The slow tests grew organically as each was written to prove an end-to-end property genuinely worth proving via a real subprocess, with no one timing the full suite together to notice the cumulative cost.

Ongoing cost: the one environment that actually gates a merge has the weakest hang protection — a watchdog-kill regression could sit as a spinning, unexplained CI step for hours. The 9 slow files consume roughly 70% of the suite’s actual runtime while being only 6.4% of its files, undermining the fast-filter workflow (scripts/run-tests.sh <filter>) for anyone iterating on doctor, toggle, config-schema, or publish-dashboard-related changes, and README.md’s stated runtime could lead a contributor to mistake a normal full run for a hang.

Suggested fix: add timeout-minutes: to the CI build job (or port scripts/run-tests.sh’s own timeout 600 into the CI loop). Correct README.md’s “a few minutes” claim. Separate the minority of assertions in the 9 slow files that truly need a real subprocess invocation from the majority that only need the underlying library functions, or consolidate their repeated subprocess spawns into fewer invocations.

Migrated to https://github.com/Poetic-Poems/agent-ops/issues/969.