Description
Switching dlib -> SFace changes the embedding space, so old templates become invalid. Replace the untyped model_store.py with a versioned store that stamps each template with the producing model and refuses cross-space comparison, plus a re-enroll path so users regenerate templates once.
Tasks
Acceptance criteria
- Legacy templates still load and match under
pipeline=legacy
- ONNX path refuses mismatched-
model_id templates instead of silently mis-scoring
- Re-enroll writes v2 templates that authenticate successfully
Description
Switching dlib -> SFace changes the embedding space, so old templates become invalid. Replace the untyped
model_store.pywith a versioned store that stamps each template with the producing model and refuses cross-space comparison, plus a re-enroll path so users regenerate templates once.Tasks
auth/template_store.py: on-disk shape{model_id, dim, created, embeddings: [...]}model_id≠ active recognizer, with an actionable errormodel_store.pybecomes a thin shim delegating to the new storeclire-enroll command (regenerate a user's templates under the active model)Acceptance criteria
pipeline=legacymodel_idtemplates instead of silently mis-scoring