Skip to content

Fix the inert integration timeout opt-in and give the RAG ask tests headroom#546

Merged
tobocop2 merged 1 commit into
mainfrom
ci/ask-test-timeout-headroom
Jul 16, 2026
Merged

Fix the inert integration timeout opt-in and give the RAG ask tests headroom#546
tobocop2 merged 1 commit into
mainfrom
ci/ask-test-timeout-headroom

Conversation

@tobocop2

Copy link
Copy Markdown
Owner

Problem

The macos integration leg intermittently failed test_ask_known_fact with a 180s pytest-timeout, the test itself passing: a full sync plus a RAG ask is the heaviest work in the suite, and a slow virtualized runner spent the entire budget on it.

Worse, the conftest's documented escape hatch (opt in with pytest.mark.timeout) has been inert all along: add_marker prepends, so the injected 180s default was always the closest marker and silently overrode every per-test opt-in. A probe test sleeping past a class-level cap survived to prove it.

Solution

The collection hook now only defaults items that carry no timeout marker of their own, which makes the opt-in real, and TestAsk opts in to 300 seconds. Unmarked tests keep the 180s default; a genuine hang still dies well short of the job timeout.

The macos integration leg intermittently blew the 180s budget on
test_ask_known_fact with the test itself passing: a full sync plus a
RAG ask is the heaviest work in the suite and a slow virtualized
runner spent the whole budget on it, the timer landing in teardown.

The conftest's documented escape hatch (opt in with
pytest.mark.timeout) turned out to be inert: add_marker prepends, so
the injected default was always the closest marker and overrode every
per-test opt-in. Proven by a probe test sleeping past a class-level
cap without dying. The hook now only defaults items that carry no
timeout of their own, and TestAsk opts in to 300s; a genuine hang
still dies well short of the job timeout.
@tobocop2
tobocop2 merged commit 504a3d2 into main Jul 16, 2026
7 of 17 checks passed
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