US01-07: Automate Phase A End-to-End Acceptance (#53)

This commit was merged in pull request #53.
This commit is contained in:
2026-07-15 22:15:30 +02:00
parent 3d5550b07f
commit 19d4ce3785
6 changed files with 372 additions and 1 deletions

View File

@@ -3,3 +3,49 @@
Integrated, restart-safe photo analysis, duplicate review, metadata, upload, and
archive workflow. Planning lives in `INTEGRATED_PIPELINE_CONCEPT.md` and
`delivery_backlog/`.
## Application (`photo_pipeline`)
The target application lives in `photo_pipeline/` (FastAPI + SQLAlchemy + Alembic).
Run it with:
```bash
python -m photo_pipeline migrate # apply database migrations
python -m photo_pipeline serve # start the API + static review UI (127.0.0.1:8000)
```
Configuration comes from `PHOTO_PIPELINE_*` environment variables (see
`photo_pipeline/config.py`); secrets are referenced, never logged.
## Testing
One offline command runs the whole suite (unit, integration, and browser
end-to-end); it needs no network and uses only deterministic synthetic fixtures:
```bash
work_item/scripts/python -m pytest tests -q
```
Browser end-to-end tests require a one-time Playwright browser install:
```bash
python -m playwright install chromium
```
### Phase A acceptance gate
Phase A (Epic E01: shared identity, inventory, duplicates, thumbnails, review UI) is
gated by a reproducible end-to-end suite:
```bash
work_item/scripts/python -m pytest tests/e2e tests/integration -q
```
- `tests/e2e/test_phase_a_pipeline.py` launches the real API process against a fresh
database and a deterministic fixture library, then drives scan, `_IGNORE/`
exclusion, move reconciliation, exact/fuzzy duplicate review, thumbnail
orientation, canonical selection, browser reload, and a full process restart —
asserting durable API and database state after the restart.
- `tests/phase_a_traceability.json` maps every story (US01-01 … US01-07) to its
tests; `tests/e2e/test_traceability.py` fails if a story loses coverage or a test
file is left unexercised.