feat(people-worker): ship medoid member face id per representative (ADR 0114) #1276
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/rep-thumb-worker"
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?
Additive medoidFaceAnnotationId per rep, computed in the same decomposition pass, deterministic tie-breaks, no contract bump; feeds ADR 0114 representative-thumbnail selection; API lane persists it in parallel.
Worker half of ADR 0114:
_decompose_person_rowscomputes each cluster's medoid MEMBER face (min sum of cosine distances to the other members; singleton = itself; ties -> smallest faceAnnotationId) in the same pass as the ADR 0108 centroids. Linkage path reuses the already-computed pairwise cosine distance matrix; the degraded singleton/over-cap single-centroid path picks its medoid over all usable faces via an O(n·d) similarity-sum matvec (never an n×n matrix — the split cap exists to avoid one). Clustering behavior, cluster order, centroids, cluster_size and all degradation paths are byte-identical.(centroid, cluster_size, medoid_face_annotation_id); thepersonRepresentativesenvelope gainsmedoidFaceAnnotationId(UUID string) per rep — no contract-version bump, existing fields unchanged.medoidFaceAnnotationIdor the fingerprint cache degrades to recompute-every-run.PYTHONPATH=src python -m pytest -q tests: 384 passed.193168d179a9f9230900