fix(people): pipeline fixes — embedding UNION ALL, auto-create persons, periodic scan #625
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/people-pipeline-coupled-fixes"
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?
Summary\n\nFixes 3 coupled pipeline failures preventing /people from working after V115:\n\n### P0 — Embedding chicken-and-egg\nOwnerFaceEmbeddingsController now includes pending_face_embeddings via UNION ALL CTE. When no accepted occurrences exist, embeddings from pending_face_embeddings are returned. Dedup prefers accepted over pending for same (face_annotation_id, model_name, model_version).\n\n### P1 — Auto-create first persons\npersistWorkerCandidates auto-creates class_instance + accepted occurrences for new_person_cluster candidates when no embedding match found. Guarded by !autoMatched flag to prevent double-creation after embedding match.\n\n### P2 — Periodic recognition scan\nCherry-picked from unmerged PR #603: PeopleDiscoveryRecognitionScheduler with @Scheduled(fixedDelay=300000) scans for owner_tentative results and enqueues owner face recognition jobs. Idempotent via NOT EXISTS subquery.\n\n## Commits\n- feat(people): add periodic recognition scan scheduler (@Scheduled 5min)\n- fix(people): add error handling in scan loop + scheduler tests\n- fix(people): include pending_face_embeddings in embedding query (UNION ALL)\n- fix(people): auto-create persons for new_person_cluster candidates\n- fix(people): guard auto-create to prevent firing after embedding match\n- fix(tests): update MLResultAcceptanceTest assertions for P1 auto-create\n- chore: bump version to 1.12\n\n## Test results\n- Full API test suite: BUILD SUCCESSFUL (713 tests, 0 failures)\n- PeopleDiscoveryPostCompletionListenerTest: 18/18\n- MLResultAcceptanceTest: 28/28\n- PeopleDiscoveryRecognitionSchedulerTest: 8/8