testsAndMisc/docs/superpowers/evidence/requirements-test-closure-2026-11-27.json
Krzysztof kuhy Rudnicki c2f4040acc
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
Python tests / test (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Test the requirements --testpaths closure
Bug-class-check: linux_configuration/tests/test_requirements_closure.py

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 12:45:39 +01:00

43 lines
2.6 KiB
JSON

{
"intent": "Fix the red Python tests CI job (ModuleNotFoundError: hypothesis, jeepney) and block the bug class: requirements-test.txt missing an import the CI pytest run makes.",
"scope": [
"meta/requirements-test.txt and meta/requirements.txt: pin hypothesis==6.170.17 and jeepney==0.9.0 (newest stable)",
"meta/scripts/check_requirements_sync.py: new --testpaths mode; meta/scripts/_requirements_closure.py walks the import closure",
".pre-commit-config.yaml: requirements-test-sync hook uses --testpaths and triggers on linux_configuration and meta/scripts .py files",
"Non-goal: the --package mode used by requirements-sync is unchanged",
"linux_configuration/tests/test_requirements_closure.py: regression test for the --testpaths mode"
],
"changes": [
"The old check skipped tests/ directories and never looked at linux_configuration, so a test-only import (hypothesis in phone_lease tests) and a dependency of a script that linux_configuration/tests loads (jeepney via game_rec_dbus) passed locally and failed CI",
"--testpaths starts from every .py under the pytest testpaths, follows bare first-party imports into python_pkg, linux_configuration and meta/scripts, skips if TYPE_CHECKING blocks, and reports non-stdlib names missing from the requirements file"
],
"verification": [
{
"command": "python3 meta/scripts/check_requirements_sync.py --testpaths python_pkg linux_configuration/tests --requirements meta/requirements-test.txt",
"result": "pass",
"evidence": "before the pins: exit 1 listing exactly hypothesis and jeepney (the two CI ImportErrors); after: exit 0"
},
{
"command": "check_requirements_sync.py --root ~/data/claude-scratch/reqsync --testpaths pkg lc/tests --requirements req.txt",
"result": "pass",
"evidence": "scratch tree: flags test-only import hyp and lazydep imported by a sibling helper; skips a TYPE_CHECKING import"
},
{
"command": "check_requirements_sync.py --package python_pkg (with and without --requirements meta/requirements-test.txt)",
"result": "pass",
"evidence": "exit 0 both, old mode unchanged"
},
{
"command": "python3 -m pytest -q linux_configuration/tests/test_requirements_closure.py",
"result": "pass",
"evidence": "2 passed; with the TYPE_CHECKING skip disabled both fail (red first)"
}
],
"risks": [
"A lazy import inside a function of a linux_configuration script counts as required even if no test reaches that function; the fix is to pin it, which costs CI install time only"
],
"rollback": [
"git revert the commit; the hook returns to the --package python_pkg mode"
]
}