`config/config.py` (1,210 LOC) mixes five distinct responsibilities in one file: YAML lifecycle, CRUD operations, target generation, build orchestration, and registry cleanup. It imports from `image.bake.bake`, `registry_management.ghcr`, and `image.image_target`, coupling config parsing to build and registry concerns. Tests for config parsing are entangled with tests for build orchestration.
Split into:
- `BakeryConfigDocument` — pure Pydantic model (already exists in name)
- `BakeryConfigManager` — YAML CRUD, stays in `config/`
- Build orchestration service — moves to `image/` or a new `orchestration/` module
The target-generation slice maps to `select_targets()` from `RFC-TARGET-SELECTION.md`, which is a prerequisite for the full split.
Files: `config/config.py`, `config/image/image.py`
`config/config.py` (1,210 LOC) mixes five distinct responsibilities in one file: YAML lifecycle, CRUD operations, target generation, build orchestration, and registry cleanup. It imports from `image.bake.bake`, `registry_management.ghcr`, and `image.image_target`, coupling config parsing to build and registry concerns. Tests for config parsing are entangled with tests for build orchestration.
Split into:
The target-generation slice maps to `select_targets()` from `RFC-TARGET-SELECTION.md`, which is a prerequisite for the full split.
Files: `config/config.py`, `config/image/image.py`