Skip to content

test: run the suite's source rules on every pull request, one case per test module - #5735

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5712
Nov 9, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5712

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The literal-deadline, fixture-resource and SIGKILL rules each parsed every module under tests/ in one case, too slow for the model/ budget. So they sat in tests/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 in tests/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-only now collects 1056 cases (3 rules × 352 modules). Before, broad discovery skipped all three tests.
  • All cases pass on this head. A scratch module with thread.join(5), timeout=1000, signal.SIGKILL and a bare Popen fails all three rules, and each finding names the module and line.
  • Cost: the slowest case takes 0.29 s, well under the 3 s model/ budget. Total case time is about 11 s locally, against about 10 s for the three old tests. CI's test job 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.md and interact_support.py cite 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

…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
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

The test job's one red result at this head isn't caused by this change. tests/smoke/test_plain_page.py::test_a_display_widget_draws_on_a_page_without_leaf failed at teardown with a 5 px passive shift of the host page's select. This PR only edits test-source rules, and the same node id passes 5/5 at this head and 3/3 on main locally. Per tests/AGENTS.md, it lands without a rerun. The intermittent failure is tracked in #5745.

@leaf-agent
leaf-agent merged commit 57eb1d4 into main Nov 9, 2026
6 of 7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5712 branch November 9, 2026 08:52
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.

Run the test-source rules (literal deadlines, fixture resources, SIGKILL) on pull requests, not only nightly

1 participant