test: honor capability overrides during example collection - #1451
test: honor capability overrides during example collection#1451snowyukitty wants to merge 2 commits into
Conversation
Signed-off-by: snowyukitty <270071858+snowyukitty@users.noreply.github.com> Assisted-by: Claude Code Assisted-by: Codex
Signed-off-by: snowyukitty <270071858+snowyukitty@users.noreply.github.com> Assisted-by: Claude Code Assisted-by: Codex
planetf1
left a comment
There was a problem hiding this comment.
Thanks for the thorough write-up and the mutation coverage — the per-flag count table is a nice touch.
One thing before merge: the original failure was on BlueVela (LSF job 1683402) and the full Linux matrix couldn't run on the Windows review host. I'll kick off an LSF job to confirm it holds in the exact environment that filed the bug. The fix should be solid there — --ignore-all-checks makes the subprocess count environment-independent, and even with CICD=1 filtering qualitative examples the floor of 50 has plenty of headroom (86 collected). Just want to close the loop on the reported platform before merging.
|
BlueVela result (LSF job 464348, |
planetf1
left a comment
There was a problem hiding this comment.
Ran three jobs on BlueVela (the platform from #1346):
- Focused regression file: 11/11 passed, no-service environment
- Fast loop (
test/ -m "not qualitative"): 3,589 passed - Full suite with Ollama (
WITH_VLLM=0): 3,619 passed — 2 OOM errors ontest_groundedness_requirementare pre-existing GPU memory pressure on that node, not introduced by this PR
All good.
Pull Request
Issue
Fixes #1346.
Description
test_example_collection_sanityis intended to detect regressions that silently prevent mostexamples from being collected. On
mainat8774ad5, however, the test collects only 7 exampleson a machine without Ollama, a GPU, or API credentials and fails its floor of 50. The result is
therefore a property of the host rather than only of the collection hooks.
This change keeps the existing floor, support-file checks, and duplicate guard while making the
sanity probe capability-independent:
_should_skip_collection;overrides;
skip_always, explicitskip, qualitative-in-CI, andSKIP_SLOWremain authoritative;repository's
not slowselection preserved, vLLM excluded defensively, nested coveragedisabled, and non-zero collection exits rejected;
fail-open behaviour as well;
tests cover module-hook wiring, exact nodeids, duplicate collection, and real CLI option
registration.
The vLLM exclusion currently deselects no additional item because all vLLM examples are also
explicitly
skip-marked. It prevents a future unskipped vLLM example from reachingpytest_collection_finish, which can launch multiple files even during--collect-only.Default collection without an override is unchanged. An explicit override may allow an example to
run far enough to fail when the bypassed service, hardware, or credential is genuinely absent;
that is the documented purpose of these options.
Observed collection counts in the no-service test environment:
Sibling #1345 was reported in the same two-failure baseline, but it concerns a different test and
root cause. It remains separate, so this PR does not claim that the reporter's complete baseline
becomes green.
Testing
Additional local validation:
PYTEST_ADDOPTS="--rootdir=C:/w -m unit": 11 passed;support-file leakage, duplicate collection, and large collection loss were killed after their
intermediate states were confirmed;
possibly-undefined), SPDX, andgit diff --checkpass.The full Linux pre-commit and unit matrix could not be run on the Windows review host and remains
for repository CI.
Attribution
Adding a new component, requirement, sampling strategy, or tool?
If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.
NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.