feat: port face clustering to Rust (rust_face_cluster) with A/B gating

- rust_face_cluster: seed-leader + agglomerative clustering port of
  fast_face_clustering_processor.py (Qdrant _faces scroll, trace aggregation,
  auto speaker bind, strict 2dp rounding parity)
- A/B verified vs Python on same Qdrant snapshot: both methods match on
  cluster membership/trace_id/confidence (leader + agglomerative)
- face_clustering.rs: USE_RUST_PROCESSORS switch with Python fallback
- executor.rs: run_rust_with_output_idx_and_frames (+ QDRANT env passthrough)
- appearance/pose: re-use rust runner path (previous migration)
- verify_face_cluster.py / verify_pose.py / verify_appearance.py: A/B harness
This commit is contained in:
Accusys
2026-09-16 21:50:07 +08:00
parent 362a735a91
commit e25c279eeb
14 changed files with 4473 additions and 27 deletions
+10
View File
@@ -43,6 +43,16 @@ pub fn set_auto_pipeline_enabled(enabled: bool) {
tracing::info!("Auto-pipeline enabled set to: {}", enabled);
}
// ─────────────────────────────────────────────────────────────
// Sensitive configs (always from ENV, never in JSON)
// ─────────────────────────────────────────────────────────────
pub static USE_RUST_PROCESSORS: Lazy<bool> = Lazy::new(|| {
env::var("MOMENTRY_USE_RUST_PROCESSORS")
.map(|v| v == "true" || v == "1")
.unwrap_or(false)
});
pub static DATABASE_URL: Lazy<String> = Lazy::new(|| {
env::var("DATABASE_URL")
.unwrap_or_else(|_| "postgres://accusys@localhost:5432/momentry".to_string())