Repository navigation
test: run the suite's source rules on every pull request, one case per test module - #5735
Merged
Merged
Conversation
…r test module The literal-deadline, fixture-resource and SIGKILL rules each parsed all of tests/ in one case, too slow for the model tier, so they sat in journeys/ and only the nightly run checked them: a pull request that broke one merged green and turned main's scheduled run red (#5455, #5684, #5701). Each rule is now parametrized over the test modules in tests/model/test_suite_source.py, so a case reads one module and the every-run tier holds them. The rules themselves are unchanged; a finding names its module and line as before. Refs #4225 Closes #5712
Collaborator
Author
|
The |
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.
The literal-deadline, fixture-resource and SIGKILL rules each parsed every module under
tests/in one case, too slow for themodel/budget. So they sat intests/journeys/, which only the scheduled run reaches. A pull request that broke one merged green and turned main's nightly red: #5455 and #5701 cleaned up literal deadlines, and #5684 a fixture resource taken outside its fixture. The three tests now live intests/model/test_suite_source.py, keeping their names and rules, and each is parametrized over the test modules. A case reads one module, so the tier every pull request runs holds them.Verified locally:
uv run pytest tests --collect-onlynow collects 1056 cases (3 rules × 352 modules). Before, broad discovery skipped all three tests.thread.join(5),timeout=1000,signal.SIGKILLand a barePopenfails all three rules, and each finding names the module and line.model/budget. Total case time is about 11 s locally, against about 10 s for the three old tests. CI'stestjob runs-n 3, so this adds a few seconds of wall time to each pull request.Each rule parses its module separately, which triples the parse work. One test that applies all three rules to a single parse would cost about 8 s instead of 11 s. But
tests/AGENTS.mdandinteract_support.pycite these test names, and changing agent instructions needs a maintainer's approval, so this PR keeps the names. Each finding of a fixed deadline now names the constant that should bound the wait, since the old one-off assertion message no longer exists.Closes #5712 — automated triage