Skip to content

Timing tests: convert last 2 wall-clock offenders, allowlist the redos supervisor (Part of #8423) - #8740

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8423-20261120T0523Z
Nov 20, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8423-20261120T0523Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8423 (slice 2 of 2): the last three wall-clock offenders.

  • test_pic_run_lengths_7169.py: the huge-PICTURE test uses assert_cpu_below (CPU time, measured before tracemalloc starts, then a separate tracemalloc pass for peak memory). The capped-subprocess test drops its perf_counter bound; the subprocess timeout=600 is already the guard.
  • test_prefetch.py: the stop-is-prompt test no longer times stop(). Prefetcher.stop() joins its thread with a bounded timeout, so the test asserts the thread is dead afterwards.
  • test_redos_poison.py: unchanged. Its fuzz monitor is a supervisor watching spawned processes for a hang or stall, which the parent's CPU time cannot measure. It moves from WALL_CLOCK_OFFENDERS (now empty) to the new WALL_CLOCK_ALLOWED dict in test_no_raw_wall_clock_timing_8423.py, with its reason. A new test requires a reason for every allowed entry; a stale or new unlisted file still fails.
  • .claude/rules/test-writing.md: one line on the allowlist.

Class / Sibling gaps

Class: tests that judge elapsed time with raw time.time() / perf_counter() / monotonic() differences. After this PR the shrink-only list is empty and every remaining use is allowlisted with a stated reason. Sibling gaps: none: every member handled. (Tests under tests/tools/ and golden fixtures are outside the gate by design, SKIP_PREFIXES.)

Gates: pytest on the four changed test files (49 passed, also 25 passed from an unrelated cwd), ruff format --check, audit_check.py all clear, test_source_reads.py + test_change_classifier.py pass. Not run: pr_gates --ratchets (tests only, no engine or golden change).

🤖 Generated with Claude Code

…s supervisor with a reason (Part of #8423)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 20, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 20, 2026 05:37
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 20, 2026 05:53
@squid-shepherd
squid-shepherd Bot merged commit 619e1a9 into main Nov 20, 2026
62 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8423-20261120T0523Z branch November 20, 2026 06:25
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant