testsAndMisc/docs/superpowers/evidence/fix-python-tests-ci-resolution-too-deep-2026-08-23.json
Krzysztof kuhy Rudnicki 32de221550 Fix the Python tests CI workflow: drop mitmproxy
Python tests has been red since ~2026-08-19, failing in "Install
dependencies" with pip's resolution-too-deep. That is an install failure,
not a test failure -- which means no Python test has actually run in CI
for days, on a repo whose Python bar is 100% branch coverage.

The CI log names the cause: the resolver backtracks through Brotli
1.0.6 -> 1.0.4 -> 1.0.1 and asgiref 3.8.0 -> 3.7.1 -> 3.6.0, all dragged
in by mitmproxy>=10.0, then gives up. Nothing imports it: `git grep
mitmproxy` finds it only in a pacman whitelist and a docs file, and
check_requirements_sync.py passes without it.

Reproduced and fixed locally rather than guessed, on Python 3.11.11 with
pip 26.2.1 -- the versions CI uses:

  pip install --dry-run -r <with mitmproxy>     exit 1, resolution-too-deep
  pip install --dry-run -r <without mitmproxy>  exit 0

Left standing: 78 of the 80 requirements are unpinned >= ranges, so this
can recur the next time a package with a wide dependency graph is added.

CI_GREEN_SKIP=1: this commit IS the fix for the red baseline.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 16:13:28 +02:00

37 lines
1.9 KiB
JSON

{
"intent": "Turn the Python tests CI workflow green. It has failed since ~2026-08-19 in 'Install dependencies' with pip's resolution-too-deep error, so no Python test has actually run in CI for days.",
"scope": [
"meta/requirements.txt (root requirements.txt is a symlink to it)",
"Non-goal: pinning the other 78 unpinned dependencies, which would be a much larger change"
],
"changes": [
"Removed mitmproxy>=10.0. The CI log shows the resolver backtracking endlessly through Brotli 1.0.6/1.0.4/1.0.1 and asgiref 3.8.0/3.7.1/3.6.0, all pulled in by mitmproxy, before giving up.",
"It is safe to remove: nothing under python_pkg/ imports mitmproxy, and `git grep mitmproxy` finds it only in a pacman whitelist and a docs file. check_requirements_sync.py passes without it."
],
"verification": [
{
"command": "python3.11 -m venv; pip install --dry-run -r <requirements WITH mitmproxy>",
"result": "fail",
"evidence": "exit 1, 'error: resolution-too-deep' -- the CI failure reproduced locally on Python 3.11.11 with pip 26.2.1, the same versions CI uses"
},
{
"command": "pip install --dry-run -r <requirements WITHOUT mitmproxy> in the same venv",
"result": "pass",
"evidence": "exit 0, resolution completes"
},
{
"command": "python3 meta/scripts/check_requirements_sync.py --package python_pkg",
"result": "pass",
"evidence": "exit 0 -- no python_pkg import needs the dropped package"
}
],
"risks": [
"If a future script wants mitmproxy it must be re-added, and the resolver problem returns. Pinning it to an exact version would be the way back in.",
"The underlying fragility remains: 78 of 80 requirements are unpinned >= ranges, so another wide-dependency package could reintroduce this."
],
"rollback": [
"Re-add 'mitmproxy>=10.0' to meta/requirements.txt in sorted position.",
"Expect Python tests CI to go red again at the Install dependencies step."
]
}