Commit Graph

12 Commits

Author SHA1 Message Date
3fa35fe21e US07-03: Harden Media and Metadata Edge Cases (#85) 2026-08-17 01:12:57 +02:00
b90d1718be US06-02: Transfer, Verify, and Remove Active Sources (#78) 2026-08-16 18:47:04 +02:00
b4b316acf5 US06-01: Configure and Preflight Archive Destinations (#77) 2026-08-16 17:38:59 +02:00
3c440f3d43 US05-04: Verify, Retry, and Resolve Uncertain Uploads (#74) 2026-08-16 15:31:23 +02:00
e4ae5da440 US05-02: Orchestrate Album Upload Batches (#72) 2026-08-16 13:06:37 +02:00
c7a616f4b5 US04-01: Build and Export Rename Plans (#66) 2026-08-15 14:51:47 +02:00
9681ced9f4 US03-03: Generate and Persist Versioned Proposals (#63) 2026-08-15 13:55:08 +02:00
457dd5bd90 US02-06: Deliver Workflow, Safety, Library, Analysis, and Stats Views
Ports the safety review and the Photo Analyzer Library/Analyze/Stats
experiences onto the shared API + service layer, and adds the Workflow
home, enforcing the pipeline gates and the one-mutating-job policy.

Backend
- migration 0005 + models: safety_reviews (append-only, latest row is the
  current decision) and analysis_results (donor photos schema re-keyed to
  asset_id).
- SafetyService: persist scores/decisions, review queue with filters, and
  the EXIF safety checkpoint (mutually-exclusive sfw/nsfw keyword written,
  read back, current_sha256 refreshed) that upload eligibility depends on.
- AnalysisService: the privacy gate — the vision provider is called ONLY for
  canonical, confirmed-SFW assets; nsfw/undecided are recorded skipped without
  a request. Provider is an injected adapter (real OpenAI-compatible Gemini
  call extracted from photo_analyzer.analyze_image; a fake in tests).
- LibraryService: Library search + Stats read model ported from webapp/query.py
  (LIKE search in place of FTS5; facets, top tags, years, albums, people).
- WorkflowService + GET /api/v1/workflow: per-stage readiness derived from the
  source tables — counts, blockers, last-run, action, and an active_job that
  drives read-only-during-jobs. Safety scoring and analysis run as durable jobs
  under the library_write lock via new domain handlers, so a second mutating
  job is refused.
- routes: workflow, safety (queue/counts/decisions/jobs), analysis
  (counts/results/jobs), library (assets/facets/stats).

Frontend
- five views (frontend/js/views.js) on the US02-05 shell: Workflow stepper
  (status text+icon, not colour alone; actions disabled with a reason while a
  job runs), Safety review (filter tabs, decide, persists across reload),
  Library (search + cards), Analyze (counts + live job log via the SSE
  adapter), Stats. Shared DOM helpers extracted to dom.js; Workflow is the home
  route.

Tests
- integration: provider-call privacy (nsfw never reaches the provider),
  sfw→nsfw flip drops analysis eligibility, decision persistence, one-mutating-
  job rejection, workflow counts, and the exiftool safety-keyword write/verify.
- e2e: Workflow cards, actions disabled+explained during a job, safety
  decide-persists-across-reload, Library search, Stats, Analyze counts.
- traceability map updated for US02-05 and US02-06.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-06 16:52:01 +02:00
0ebacfa544 US02-02: Persist and Coordinate Durable Jobs (#55) 2026-07-15 22:47:13 +02:00
98e9cb2988 US01-05: Generate and Serve Managed Thumbnails (#50) 2026-07-15 21:27:40 +02:00
691d5a5651 US01-04: Detect and Decide Duplicates (#49) 2026-07-15 17:14:24 +02:00
a723b63d55 US01-02: Establish Application and Database Foundation (#47) 2026-07-15 16:33:25 +02:00