Repository navigation
test: let seven browser-test waits take the suite's deadline - #5455
Merged
Merged
Conversation
test_a_wait_takes_the_suites_deadline refuses a literal timeout, since a deadline sized to the author's machine fails a correct product on a busy runner. #5359 added four (two pin-clearance waits in test_pins.py, Copy's click and the withheld-row expectation in test_scrollers.py), #5399 one (the motion study's shared clock) and #5371 two (the closed-tab document attributes). Each now takes SERVED_TIMEOUT_MS, the default render_harness gives every wait that names none; none of the waits times its subject. Refs #4225
leaf-agent
added a commit
that referenced
this pull request
Nov 8, 2026
…5701) The nightly journey `test_a_wait_takes_the_suites_deadline` has failed since scheduled run [42365682113](https://github.com/max-sixty/leaf/actions/runs/42365682113). It found 24 waits with literal 2 s or 3 s timeouts, added by #5617 (`test_previews.py`, `test_charts.py`) and #5618 (`test_render_anchors.py`). This PR drops each `timeout=` argument, so those waits take the suite's default deadline (`SERVED_TIMEOUT_MS`, which `render_harness` sets). What each wait waits for doesn't change. The literal values were sized to a fast machine, which is why the check rejects them. Verification on main `fcad5fa09`: the check fails before this change, listing all 24 sites, and passes after it. The 19 browser tests that hold those waits pass under `--run-main` (42 cases). The same check went red for the same reason on Nov 5, and #5455 fixed that. It's a 2–6 s static scan of the test sources, but it lives in `tests/journeys/`, which only the scheduled run reaches. So a pull request that adds a literal deadline passes its own CI, and main finds out the next day. The durable fix is to run this check on every pull request; I'm filing that separately. Refs #4225 — automated triage Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Nov 9, 2026
…r test module (#5735) 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 Co-authored-by: leaf-agent <[email protected]>
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.
test_a_wait_takes_the_suites_deadlinerefuses a literal timeout anywhere in the suite. A deadline sized to the author's machine fails a correct product on a busy runner (tests/AGENTS.md, "Functional results do not depend on execution speed"). It has failed in the last two scheduled runs and on current main because of seven new literal timeouts:wait_for_functioncalls intests/browser/margin/test_pins.py, plus Copy'sclickand thelf-withheldexpectation intests/browser/margin/test_scrollers.py(timeout=5000)tests/browser/widgets/test_motion.py(timeout=10_000)data-lf-sourceexpectations intests/browser/widgets/test_code_and_documents.py(timeout=15_000)None of these waits measures how long its subject takes, so each now takes
SERVED_TIMEOUT_MS, the default thatrender_harnessgives every wait that names none.The lint test fails on main
e0c0f9c5fand passes with this change. These tests also pass with it:test_a_control_an_authored_anchor_name_moves_into_a_pin_s_seat_moves_the_pin,test_a_page_s_reaction_to_a_runtime_mark_moves_a_pin_clear,test_a_pin_on_a_code_block_s_first_line_leaves_copy_pressable,test_a_row_in_content_skipped_until_near_stands_once_the_page_scrolls_to_it,test_recordings_a_revision_adds_join_the_studys_clockandtest_a_tab_opened_while_closed_documents_draw_reports_its_document_at_once.test_a_comment_on_a_closed_tab_s_document_never_reads_as_earlier_datafails with and without this change: its thread quote is never found, the same failure as in push run 41976158322.Refs #4225 — automated triage