Multi-persona review (coherence, feasibility, product-lens, security-lens,
adversarial) surfaced that the spike proved DB access but not that DB access
was the right path or that the signal was useful, and pinned a contract
against a private, in-flight-changing schema. Applied 11 fixes:
- Requirement 0: test the "REST can't expose embeddings" premise instead of
asserting it; record which endpoints were checked and why insufficient.
- Reframe Req 1 "real go/no-go" to access-only; signal-usefulness is M1.5's
first task, not this spike's.
- Mark the schema unsupported/internal, version-pinned; require an M1.5
re-probe/version-guard per Immich upgrade; tie shape to recorded model+ver.
- Fix probe correctness: pgvector adapter / server-side vector_dims (psycopg3
returns vector as string); Postgres-internal join with optional SQLite
cross-check; coverage over the image/embeddable population (both ratios).
- DB-enforced read-only session; standalone .env loading; psycopg+pgvector
added to Deliverables; roadmap correction now fixes both false claims.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Defines the read-only Postgres/pgvector feasibility spike that the
roadmap claims ran in M1 but the M1 plan deferred. Pins the four
pass/fail requirements, the disposable-probe approach, and the
findings-doc contract that unblocks M1.5.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A later successful asset could push last_ingest_at past an earlier asset whose
thumbnail download failed, permanently excluding it from later incremental runs
(only --full recovered it). Now the cursor never advances to/past the earliest
failed asset, never below the prior cursor, and not at all on a --subset run.
Regression tests added. (review finding #9)
- write-back: call upsert_tag inside _apply_tag's try so a tag-create failure
is caught per-asset and apply_all no longer aborts mid-batch (was P1)
- write-back: surface _pipeline/processed write failures in the result instead
of discarding them (was reported as success)
- ui: add title to the high confidence badge so approve-high-confidence's
pre-action count is non-zero; confirm() before single-cluster apply
- core: Store context manager; close DB connection even if a route raises;
guard split_cluster against a first-member boundary (empty cluster); add
writeback_log lookup index
- ingest: split thumbnail download/write error handling and clean up the
.tmp file on a write failure
- tests: upsert/processed write-failure regression tests + split-guard test