fix(api): resolve embeddingString missing candidate.modelName lookup #637
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/people-regressions"
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
embeddingString()only checkedcandidate.embeddingModelNameandcandidate.faceEmbedding.modelName, ignoringcandidate.modelNamesent directly by the people worker.For
discovery_peoplejobs, the worker sendsmodelName(e.g.arcface-r50) in each face candidate. ButupsertDiscoveryPeopleFaceEmbeddingspasses the job payload'smodelNameas the default — and thediscoveryPayloaddoesn't includemodelName. All three lookups returned null, so embeddings were buffered topending_face_embeddingswithmodel_name = null.When
PendingEmbeddingFlushListenerlater tried to INSERT intoclass_occurrence_embeddings(which hasmodel_name VARCHAR(255) NOT NULL\}), the INSERT failed silently (listener transaction rolled back). The 24h cleanup inPendingEmbeddingReconciliationScheduler` then deleted the orphaned pending embeddings.Result: both
class_occurrence_embeddingsandpending_face_embeddingsempty → no merge suggestions on people page.Fix
Added
candidate.get(nestedKey)as a third fallback inembeddingString(), before thedefaultValue. This picks up the worker'smodelNamefrom the candidate whenembeddingModelNameisn't set.