Skip to content

test: let 24 preview, mark and chart waits take the suite's deadline - #5701

Merged
leaf-agent merged 1 commit into
mainfrom
fix/schedule-literal-deadlines
Nov 8, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/schedule-literal-deadlines

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

The nightly journey test_a_wait_takes_the_suites_deadline has failed since scheduled run 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. #5712 proposes running it on every pull request.

Refs #4225 — automated triage

#5617 and #5618 added waits with literal 2 s and 3 s timeouts in
test_previews.py, test_charts.py and test_render_anchors.py. The nightly
journey test_a_wait_takes_the_suites_deadline rejects a literal deadline,
since a busy runner takes many times what the work took where the test was
written. Each wait now takes the suite's default (SERVED_TIMEOUT_MS through
render_harness). No assertion changes what it waits for.

Refs #4225
@leaf-agent
leaf-agent merged commit f926f4f into main Nov 8, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/schedule-literal-deadlines branch November 8, 2026 08:36
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]>
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.

1 participant