docs: add cleanup roadmap for quality pass

Phase 0 analysis and prioritized roadmap for the cleanup/quality-pass branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Frank Schwenk
2026-07-18 17:34:12 +02:00
parent 9b6c80da42
commit 84447d1d2c
+57
View File
@@ -0,0 +1,57 @@
# 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 | LowMedium | `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
- [x] Add Ruff (lint + format) and apply once
- [x] Expand `.gitignore`
- [x] Remove dead duplicate branch in `imagemagick_grayscale`
- [x] Fix flaky `test_watermark_pipeline` (darktable probe skip)
### Phase 2 — Structure & config
- [x] Explicit `import imagepipeline.modules` in `pipeline.py`
- [x] `gmic_grayscale`: call `finalize_gmic_output` (parity with `gmic`)
- [ ] Pipeline `CONTINUE_FROM` reset — **skipped** (machine-local resume state)
- [ ] `xcf_stack` runner hook — **deferred** (medium refactor risk)
### Phase 3 — Code quality
- [x] Pytest markers (`integration`, `slow`)
- [ ] Broad dedup of pipeline scripts — **deferred** (domain-specific, RECIPES first)
### Phase 4 — Dependencies & CI
- [x] Declare Pillow in core; numpy in dev for import-time ai_tone_map
- [x] Add Ruff to dev extras
- [x] Gitea Actions: pytest on push
### Phase 5 — Docs
- [x] README sync (resume, `.env`, `[ai]`, external tools)
- [x] `docs/ARCHITECTURE.md`, `CONTRIBUTING.md`
- [x] `LICENSE` (MIT, matches pyproject)
## Known bugs (not fixed — behavior change or out of scope)
1. **darktable-cli 5.6** — integration test fails locally; style file exists but CLI exits 1 on PNG export (possible upstream CLI change).
2. **Eager module imports**`ai_tone_map` pulls numpy at import; mitigated via dev dep, not lazy-import refactor.
## Verification
```bash
pip install -e ".[dev,ai]"
ruff check .
ruff format --check .
pytest
```