Skip to content

Bound test run time: per-test wall clock in the runner, per-case bound in the corpus tests - #2179

Merged
remigiusz-antczak merged 1 commit into
mainfrom
land/wave-casetmo
Nov 1, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
land/wave-casetmo

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

A test that never returns now fails after 900 seconds instead of running until someone stops it, and each security-gate corpus case is bounded to 5 seconds.

What changes

  • scripts/run-ci-tests.sh runs each test under PERUN_TEST_TIMEOUT_S (default 900; a missing, non-numeric, non-positive or over-long value means 900). A test the alarm stops prints run-ci-tests: FAIL <test> (timed out after Ns) and fails like any other failure.
  • scripts/test_security_gates_corpus.py and the in-process Python blocks of scripts/test-destructive-guard.sh bound each guard check to 5 seconds, so a hung check is a FAIL line naming the case. The privacy-gate call gets a 120 second timeout.
  • New test scripts/ci-tests.d/run-ci-tests-timeout.sh; scripts/test_hermetic_children.py now reads the wrapped runner line.

Known limits

The alarm stops the test's own process, not children it started, so a caller that pipes the runner's output waits for those. A test that arms its own alarm replaces the runner's, and both corpus tests do: outside a case they run unbounded. The destructive-guard selftest and hook calls are bounded by the runner only.

Verification

Tests: affected 19/19 (run-ci-tests --affected against main, incl. the new timeout test and the security-gates corpus), changelog fragments 23/23

🤖 Generated with Claude Code

…d in the corpus tests

run-ci-tests.sh runs each test under PERUN_TEST_TIMEOUT_S (default 900; a bad value falls back to 900) and reports a timed-out test as a FAIL line. The two security-gate corpus tests bound each guard check to 5 seconds, and the privacy-gate call gets a 120 second timeout. Child processes a test starts are outside the bound; the fragment states the limits.

Tests: affected 19/19 (run-ci-tests --affected against main, incl. the new timeout test and the security-gates corpus), changelog fragments 23/23

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit 2447ccb into main Nov 1, 2026
11 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the land/wave-casetmo branch November 1, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant