- Fixed upsert_trace_profile() SQL: changed trace_profiles.xxx to tp.xxx in ON CONFLICT DO UPDATE
to fix invalid reference to FROM-clause entry error
- Fixed cluster_agent.rs error handling: replaced 'let _ =' with proper error logging
- Created migration script to backfill trace_profiles from tkg_nodes for existing files
- Migration successfully inserted 98 missing trace_profiles records
- Verified merge now works correctly: traces_merged > 0 instead of silent no-op
This fixes both the rename 500 error and the merge silent failure, as they share
the same root cause in upsert_trace_profile() SQL.
- Fixed upsert_trace_profile() SQL: replaced scalar subqueries with LEFT JOIN
to properly reference trace_profiles table in backfill logic
- Fixed face_filter routes: changed {file_uuid} to :file_uuid syntax for
axum 0.7.9 compatibility
- Both fixes resolve HTTP 500 errors in rename and 404 errors in face filter
- Verified both APIs working correctly with test requests
- Database: Added bbox_size column (min(width, height)) to face_filter_features
- API: Updated all endpoints to include bbox_size in responses
- Documentation: Added bbox_size explanation and frontend filtering examples
- Maintains current Swift implementation calculation method
- Enables efficient frontend filtering without backend threshold
This allows the frontend to do real-time filtering using bbox_size
while the backend pre-computes and stores the value.
- Database schema: face_filter_features and filter_rules tables
- Core engine: FilterEngine with 4 filter rules (landmark, mediapipe, embedding, temporal)
- API endpoints:
- GET /faces - Get faces with filtering
- GET /face/{id}/filter-report - Get filter report for single face
- POST /faces/filter - Apply filter rules
- GET /filter-stats - Get filter statistics
- GET/POST /filter-rules - Manage filter rules
- API documentation for Studio team with examples
- Based on FaceNet analysis results from WD and KOBA videos