84447d1d2c
Phase 0 analysis and prioritized roadmap for the cleanup/quality-pass branch. Co-authored-by: Cursor <cursoragent@cursor.com>
2.1 KiB
2.1 KiB
Cleanup Plan — imagepipeline quality pass
Branch: cleanup/quality-pass
Started: 2026-07-18
Phase 0 findings (summary)
| Area | Risk | Notes |
|---|---|---|
| Core (runner, resume, pipeline) | Medium | Solid tests; xcf_stack special-case in runner — defer refactor |
| Modules | Low–Medium | gmic_grayscale missing finalize_gmic_output (resume parity) |
| Dependencies | High | dependencies = [] but Pillow/numpy imported at module load |
| Pipelines | Low | Machine-local paths intentional (SOUL); stale CONTINUE_FROM left as-is |
| Tests | Medium | 87/88 pass; watermark integration fails on darktable-cli 5.6 |
| Tooling | Safe | No linter/formatter/CI |
Roadmap
Phase 1 — Low-risk quick wins
- Add Ruff (lint + format) and apply once
- Expand
.gitignore - Remove dead duplicate branch in
imagemagick_grayscale - Fix flaky
test_watermark_pipeline(darktable probe skip)
Phase 2 — Structure & config
- Explicit
import imagepipeline.modulesinpipeline.py gmic_grayscale: callfinalize_gmic_output(parity withgmic)- Pipeline
CONTINUE_FROMreset — skipped (machine-local resume state) xcf_stackrunner hook — deferred (medium refactor risk)
Phase 3 — Code quality
- Pytest markers (
integration,slow) - Broad dedup of pipeline scripts — deferred (domain-specific, RECIPES first)
Phase 4 — Dependencies & CI
- Declare Pillow in core; numpy in dev for import-time ai_tone_map
- Add Ruff to dev extras
- Gitea Actions: pytest on push
Phase 5 — Docs
- README sync (resume,
.env,[ai], external tools) docs/ARCHITECTURE.md,CONTRIBUTING.mdLICENSE(MIT, matches pyproject)
Known bugs (not fixed — behavior change or out of scope)
- darktable-cli 5.6 — integration test fails locally; style file exists but CLI exits 1 on PNG export (possible upstream CLI change).
- Eager module imports —
ai_tone_mappulls numpy at import; mitigated via dev dep, not lazy-import refactor.
Verification
pip install -e ".[dev,ai]"
ruff check .
ruff format --check .
pytest