Finding
The Python setup layer has become a broad orchestration module. cli/python/base_setup/engine.py is currently over 1,100 lines and carries a # pylint: disable=too-many-lines marker. It owns command dispatch, manifest action orchestration, Brewfile/mise checks, artifact checks and reconciliation, IDE install/extension/settings behavior, user IDE preference merging, process execution helpers, and project venv helpers in one file.
Concrete hotspots:
cli/python/base_setup/engine.py:3 disables too-many-lines.
reconcile_manifest starts at cli/python/base_setup/engine.py:159 and coordinates all setup domains.
- IDE behavior spans roughly
effective_ide_config, reconcile_ide_*, check_ide_*, and settings helpers from cli/python/base_setup/engine.py:487 through cli/python/base_setup/engine.py:999.
- Generic artifact behavior resumes at
cli/python/base_setup/engine.py:1001.
Proposed direction
Split the module by stable responsibility boundaries, for example:
base_setup.actions or base_setup.engine: command/action orchestration only.
base_setup.checks: ArtifactCheck, doctor/check rendering, common check helpers.
base_setup.artifacts: Homebrew and Python artifact reconcile/check behavior.
base_setup.delegates: Brewfile and mise path resolution plus reconcile/check behavior.
base_setup.ide: IDE definitions, effective config, install/extension/settings behavior.
base_setup.process: run_command, run_check, dry_run_command, format_command if those stay setup-specific.
Keep public behavior unchanged and preserve existing tests while moving code.
Acceptance criteria
cli/python/base_setup/engine.py no longer needs # pylint: disable=too-many-lines.
- Each new module has a coherent ownership boundary and no circular imports.
- Existing setup/check/doctor behavior is unchanged.
- Existing Python tests and relevant BATS tests pass.
Parent audit: #287
Finding
The Python setup layer has become a broad orchestration module.
cli/python/base_setup/engine.pyis currently over 1,100 lines and carries a# pylint: disable=too-many-linesmarker. It owns command dispatch, manifest action orchestration, Brewfile/mise checks, artifact checks and reconciliation, IDE install/extension/settings behavior, user IDE preference merging, process execution helpers, and project venv helpers in one file.Concrete hotspots:
cli/python/base_setup/engine.py:3disablestoo-many-lines.reconcile_manifeststarts atcli/python/base_setup/engine.py:159and coordinates all setup domains.effective_ide_config,reconcile_ide_*,check_ide_*, and settings helpers fromcli/python/base_setup/engine.py:487throughcli/python/base_setup/engine.py:999.cli/python/base_setup/engine.py:1001.Proposed direction
Split the module by stable responsibility boundaries, for example:
base_setup.actionsorbase_setup.engine: command/action orchestration only.base_setup.checks:ArtifactCheck, doctor/check rendering, common check helpers.base_setup.artifacts: Homebrew and Python artifact reconcile/check behavior.base_setup.delegates: Brewfile and mise path resolution plus reconcile/check behavior.base_setup.ide: IDE definitions, effective config, install/extension/settings behavior.base_setup.process:run_command,run_check,dry_run_command,format_commandif those stay setup-specific.Keep public behavior unchanged and preserve existing tests while moving code.
Acceptance criteria
cli/python/base_setup/engine.pyno longer needs# pylint: disable=too-many-lines.Parent audit: #287