You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(test): do not cache filtered PYTEST_ADDOPTS runs as full suite #3916
The bash wrapper does not expose pytest's -k, so focused Python regression runs can be selected through PYTEST_ADDOPTS. A successful focused run with PYTEST_ADDOPTS=-k ... still satisfies test.py's current running_all_tests condition because that condition only checks parsed test/example arguments.
Reproduction:
Run bash test --py --verbose with PYTEST_ADDOPTS selecting five tests.
Pytest reports 5 passed, 911 deselected.
test.py saves python_test.json with status success as if all 916 tests ran.
Run bash test --py --verbose without PYTEST_ADDOPTS.
The runner prints Fingerprint cache valid - skipping Python tests and executes nothing.
This is false green coverage: a partial pytest selection authorizes the full Python-suite cache.
Proposal
Treat any non-empty PYTEST_ADDOPTS as cache-ineligible. Bypass the Python ultra-early cache while it is set, force the Python worker to run, and never persist a full-suite fingerprint from that invocation. Whitespace-only values remain equivalent to unset.
Acceptance criteria
Preserve RED evidence that a focused PYTEST_ADDOPTS=-k ... run can currently produce a reusable full-suite fingerprint.
Non-empty PYTEST_ADDOPTS forces the Python worker to run even when the prior fingerprint is fresh.
A successful filtered run does not save or refresh the full Python-suite fingerprint.
Whitespace-only PYTEST_ADDOPTS does not disable caching.
Focused tests, lint, and a subsequent unfiltered Python suite pass.
Decisions
The guard is conservative: even harmless custom pytest options disable fingerprint reuse because the runner cannot prove they preserve suite semantics.
--no-fingerprint remains forbidden for normal agent workflows; this fix makes focused wrapper runs safe without that flag.
Severity is P1 because the current behavior can report unexecuted tests as cached green.
Activity
fix(test): harden long-running Python supervision (FastLED#3917)