Repository navigation
Timing tests: convert last 2 wall-clock offenders, allowlist the redos supervisor (Part of #8423) - #8740
Merged
Conversation
…s supervisor with a reason (Part of #8423) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
2 of 3 tasks
Contributor
|
No description provided. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #8423 (slice 2 of 2): the last three wall-clock offenders.
test_pic_run_lengths_7169.py: the huge-PICTURE test usesassert_cpu_below(CPU time, measured before tracemalloc starts, then a separate tracemalloc pass for peak memory). The capped-subprocess test drops itsperf_counterbound; the subprocesstimeout=600is already the guard.test_prefetch.py: the stop-is-prompt test no longer timesstop().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 fromWALL_CLOCK_OFFENDERS(now empty) to the newWALL_CLOCK_ALLOWEDdict intest_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 undertests/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.pyall clear,test_source_reads.py+test_change_classifier.pypass. Not run:pr_gates --ratchets(tests only, no engine or golden change).🤖 Generated with Claude Code