Surfaced by #1153 (fast-gate oracle restore)
When the vacuous python-fast-shard gate was restored to a real oracle (#1153), the only failing cluster across the ~17.6k fast tests was cli_import_shadowing.
Symptom
4 test modules error at collection in CI:
tests/unit/cli/test_amm_cli.py (from cli import amm_cli)
tests/unit/cli/test_cli_golden.py (from cli.geosync_cli import cli)
tests/unit/cli/test_fete_backtest_cli.py (from cli.geosync_cli import cli)
tests/unit/test_geosync_cli.py (from cli.geosync_cli import cli)
ImportError: cannot import name 'amm_cli' from 'cli' (/home/runner/work/GeoSync/GeoSync/scripts/cli.py)
Root cause
cli/ (repo root) holds amm_cli.py / geosync_cli.py but is not declared in [tool.setuptools.packages.find] (which DOES declare scripts/scripts.*). The same-named regular module scripts/cli.py (scripts.cli) shadows the cli package under the CI editable install, so top-level cli resolves to scripts/cli.py.
Notably: pytest tests/ --collect-only resolves cli correctly (the ids ARE collected), but the explicit-node-id run step resolves it to scripts/cli.py — invocation-dependent sys.path/rootdir difference. Adding cli/__init__.py alone did NOT fix CI.
Why this is import-architecture (separate PR)
A clean fix is one of: declare cli in packages.find, rename scripts/cli.py, or restructure so cli and scripts.cli cannot collide as top-level cli. All are outside the #1153 CI-oracle boundary.
Interim
These 4 modules are quarantined in tests/ci/fast_quarantine.txt with this issue ref so the fast gate is real-green, not fake-green. Quarantine expiry condition: from cli import amm_cli resolves to cli/amm_cli.py in CI.
Owner lane: ci-import-architecture
🤖 Generated with Claude Code
Surfaced by #1153 (fast-gate oracle restore)
When the vacuous
python-fast-shardgate was restored to a real oracle (#1153), the only failing cluster across the ~17.6k fast tests wascli_import_shadowing.Symptom
4 test modules error at collection in CI:
tests/unit/cli/test_amm_cli.py(from cli import amm_cli)tests/unit/cli/test_cli_golden.py(from cli.geosync_cli import cli)tests/unit/cli/test_fete_backtest_cli.py(from cli.geosync_cli import cli)tests/unit/test_geosync_cli.py(from cli.geosync_cli import cli)Root cause
cli/(repo root) holdsamm_cli.py/geosync_cli.pybut is not declared in[tool.setuptools.packages.find](which DOES declarescripts/scripts.*). The same-named regular modulescripts/cli.py(scripts.cli) shadows theclipackage under the CI editable install, so top-levelcliresolves toscripts/cli.py.Notably:
pytest tests/ --collect-onlyresolvesclicorrectly (the ids ARE collected), but the explicit-node-id run step resolves it toscripts/cli.py— invocation-dependent sys.path/rootdir difference. Addingcli/__init__.pyalone did NOT fix CI.Why this is import-architecture (separate PR)
A clean fix is one of: declare
cliinpackages.find, renamescripts/cli.py, or restructure socliandscripts.clicannot collide as top-levelcli. All are outside the #1153 CI-oracle boundary.Interim
These 4 modules are quarantined in
tests/ci/fast_quarantine.txtwith this issue ref so the fast gate is real-green, not fake-green. Quarantine expiry condition:from cli import amm_cliresolves tocli/amm_cli.pyin CI.Owner lane: ci-import-architecture
🤖 Generated with Claude Code