fix(api/people): include confirmed (state='accepted') anchors in owner-face-embeddings feed #976
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/anchor-feed-accepted-state"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause of 'carousel only shows new people' (part 2 of the clustering regression)
PR #969 shipped the constrained forward clustering (ADR 0100). PR #975 fixed the worker segfault (OOM at 26k faces). This PR fixes the remaining defect that keeps merge suggestions from appearing.
Chain: auto-accept (06:37 today, 50 accepted
new_person_clustercandidates) moved those faces'discovery_results.statetoacceptedviaPeopleDomainCandidateDecisionStrategy.afterAcceptance. But the accepted-occurrence branch ofGET /api/worker/jobs/{id}/owner-face-embeddingsfiltersdr.state IN ('owner_tentative','owner_recognized')— so all 289 anchor embeddings (193 assignments in payload, 289 accepted faces with occurrence embeddings) are missing from the feed the worker fetches.Consequence:
_anchor_labels(embeddings, assignments)returns{}(anchors must exist in the feed) → zero graph identities → every component takes the 0-identity path → 100%new_person_cluster, noexisting_person_match, nocluster_person_match, no suggestions for existing people. Verified against prod DB: exact feed CTE returns 9399 pending rows, 0 accepted-branch rows, while 289 anchors with embeddings exist.Fix: admit
dr.state = 'accepted'in the accepted-occurrence branch. Still gated on accepted people occurrence + stored occurrence embedding, so nothing but confirmed anchor faces is re-exposed. Tentative/pending branch unchanged.Test:
returnsConfirmedAnchorFacesWithAcceptedDiscoveryState(Testcontainers, mirrors existing suite): accepted-state anchor + owner_tentative face both appear in the feed response.Post-merge
Re-trigger recognition (dirty mark). The next run should finally produce
existing_person_match/cluster_person_matchsuggestions against the 195 confirmed anchors.