From the 2026-05-31 code-quality audit (parent archive). app/core/config.py:107 defaults FACE_RECOGNITION_MODEL="Facenet" (128-dim) while EMBEDDING_DIMENSION is 512 — violates the model↔dimension invariant. Prod overrides both (safe), but any default/dev/test run writes 128-dim into a 512 schema. Fix: default to Facenet512, or add a @model_validator mapping model→dim (one already exists for the aged-threshold inversion; none for this).
From the 2026-05-31 code-quality audit (parent archive).
app/core/config.py:107defaultsFACE_RECOGNITION_MODEL="Facenet"(128-dim) whileEMBEDDING_DIMENSIONis 512 — violates the model↔dimension invariant. Prod overrides both (safe), but any default/dev/test run writes 128-dim into a 512 schema. Fix: default toFacenet512, or add a@model_validatormapping model→dim (one already exists for the aged-threshold inversion; none for this).