[claude] Poka-yoke: make test skips/flakes impossible to ignore (#1094) #1104
Reference in New Issue
Block a user
Delete Branch "claude/issue-1094"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1094
What this does
1. Skip enforcement (
tests/conftest.py)Adds a
pytest_runtest_makereporthookwrapper that converts any skipped test to a failure unless:#NNN, URL, or JIRA key)@pytest.mark.quarantineskipifcondition (e.g.requires RUN_INTEGRATION_TESTS=1)This means
@pytest.mark.skip(reason="TODO")now fails loudly instead of silently disappearing.2. Flake detector (
scripts/flake_detector.py)A standalone script that:
pytest --json-report).test-history.json3. Quarantine directory (
tests/quarantine/)A holding area for flaky/broken tests with
README.mdexplaining the rules (30-day time-box,@pytest.mark.quarantine(reason="#NNN")required).4. Quarantine process (
docs/QUARANTINE_PROCESS.md)Documents the full Prevention → Detection → Correction workflow: when to quarantine, how to do it step-by-step, escalation rule, and how to un-quarantine.
5.
pytest.iniCentralises
--strict-markers,asyncio_mode, andtestpathsso these are not scattered across individual CI scripts.