Commit Graph

134 Commits

Author SHA1 Message Date
Accusys
37f8aea4aa feat: GET file/:uuid/trace/:tid/representative-face endpoint 2026-05-22 04:50:07 +08:00
M5Max128
3c458dfc5c Merge remote-tracking branch 'origin/main' 2026-05-21 16:38:52 +08:00
M5Max128
3a33d00449 refactor: modularize server.rs into separate route modules
- Extract scan.rs, files.rs, types.rs, processing.rs, visual_chunk_search.rs
- Move AppState and AppConfig to types.rs
- Each module exposes pub fn xxx_routes() -> Router<AppState>
- server.rs reduced from 5005 to 118 lines (orchestrator only)
- All stubs filled with real implementations from git history
- Verify: cargo check, clippy, tests all pass
2026-05-21 16:38:49 +08:00
Accusys
e7eb90b987 docs: sync notes + identity_binding.rs traces pagination 2026-05-21 16:30:27 +08:00
M5Max128
80812128e2 merge: resolve conflicts with M5Max128 local changes 2026-05-21 01:11:44 +08:00
Accusys
bebaa743ed feat: trace-level matching, health watcher/worker status, timezone config 2026-05-21 01:08:30 +08:00
Accusys
ba68cd2548 feat: Identity JSON sync + schema-aware column selection
- storage.rs: add local_profile field, check disk for profile.jpg
- tmdb_api.rs: trigger JSON sync after TMDb probe
- identity_api.rs: upload_profile_image triggers JSON sync
- identity_binding.rs: bind/unbind/merge trigger JSON sync
- get_identity_json: Lazy Sync (generates JSON from DB if missing)
- identities.rs + identity_api.rs: use schema-aware column selection (dev:name vs public:real_name)
- Fixes 500 errors on identities endpoints across schemas
2026-05-19 23:10:49 +08:00
Accusys
0eb08acaae feat: Identity JSON sync mechanism
- storage.rs: add local_profile field, check disk for profile.jpg in save_identity_file_by_pool
- tmdb_api.rs: trigger JSON sync after TMDb probe
- identity_api.rs: upload_profile_image triggers JSON sync
- identity_binding.rs: bind/unbind/merge trigger JSON sync
- get_identity_json: replace DB fallback with Lazy Sync (generates JSON from DB if missing)
- Fixes missing/obsolete JSON files for all identity mutations
2026-05-19 22:20:19 +08:00
Accusys
58c283a1fc fix: playground ASR field names (start_time/end_time) + add 3003 specific test script
- playground.rs: seg.start/end -> seg.start_time/end_time
- scripts/test_m5api_phase5_3003.sh: tests bind, unbind, match-from-trace on localhost:3003
- Note: bind fails on dev (real_name column missing), match-from-trace returns 404 for no embeddings
2026-05-19 21:07:39 +08:00
Accusys
e3c7e347b7 fix: identity binding + JSON endpoint + Phase 5 test script
- identity_binding.rs: fix i32->i64 type mismatch, COALESCE name column
- identity_api.rs: get_identity_json fallback to DB if file missing
- test_m5api_phase5.sh: fixed variable expansion, updated request bodies
- Phase 5: 21/23 passed (2 known: multipart + proxy 404)
2026-05-19 20:30:05 +08:00
Accusys
1ea23a6d51 fix: identity detail 502 - IdentityDetailRecord.id i32->i64 type mismatch panic
- identities.id is BIGINT (8 bytes), Rust struct was i32 (4 bytes)
- sqlx type mismatch caused panic, crashing backend process
- Proxy returned 502 due to empty reply from crashed backend
- Phase 5: 17/23 passed (was 16/23)
2026-05-19 18:33:21 +08:00
Accusys
02ad015b86 fix: type mismatch BIGINT->INT4 and FLOAT8->FLOAT4 in traces and faces endpoints
- trace_agent_api: CAST trace_id, frame_number to int; CAST confidence to float4
- identities: CAST frame_number to int; CAST confidence to float4
- Fixes 500 errors on /traces, /trace/:id/faces, /faces/candidates
2026-05-19 18:09:25 +08:00
Accusys
47a480a5e2 fix: identity search - fix i.name column and simplify identity_bindings join
- search_identity_text: COALESCE(i.real_name, i.actor_name) AS identity_name
- search_identities_by_text:
  - Removed broken identity_bindings join (table has wrong schema)
  - Fixed i.id type mismatch (bigint -> i32 via ::int cast)
  - Simplified to direct face_detections join
- Added error logging for debugging
- Phase 4 now 11/11 passed
2026-05-19 16:21:15 +08:00
Accusys
77098b88ba feat: Phase 2-5 API test scripts + create_monitor_job fix
Phase 2: 10/10 passed 
Phase 3: 7/7 passed 
Phase 4: 9/11 passed (2 known bugs - i.name column)
Phase 5: 13/23 passed (10 failures - pre-existing bugs)

Fixes:
- create_monitor_job: ON CONFLICT (uuid) DO UPDATE to prevent duplicate key errors
- test scripts: Correct request bodies for all visual search endpoints
2026-05-19 16:05:46 +08:00
Accusys
ea6ea02925 fix: delete_video - add file existence check + fix pre_chunks UUID cast
- unregister: check file exists before delete, return 200 with success:false if not found
- delete_video: cast pre_chunks.file_uuid parameter as UUID (::uuid)
- Added Phase 2 test script (10/10 endpoints passed)
2026-05-19 15:51:25 +08:00
Accusys
611441662f fix: register_resource - use ON CONFLICT (resource_id) DO UPDATE instead of RETURNING id
- resources table uses resource_id as PK (no auto-increment id column)
- Make register idempotent: duplicate registration updates status + heartbeat
- Added Phase 1 API test script (15 endpoints, 100% pass)
2026-05-19 14:22:40 +08:00
Accusys
67ca846ccd feat: ASR output frame numbers + rename start/end to start_time/end_time
- Python: asr_processor.py detects FPS from CUT/ffprobe (no fallback), outputs start_frame/end_frame
- Rust: All AsrSegment structs use start_time/end_time with #[serde(alias)] for backward compat
- store_asr_chunks: prefers ASR output frames, falls back to time-based conversion
- Added backward compatibility test for old JSON format (start/end)

Breaking change: ffprobe/CUT FPS failure now aborts instead of using default 24fps
2026-05-19 13:22:38 +08:00
Accusys
7b6da4f0d8 fix: identities API - use real_name instead of name for cross-schema compatibility 2026-05-19 10:21:49 +08:00
Accusys
72f4b53357 fix: add emergency API key bypass in middleware (3002+3003) 2026-05-19 09:59:09 +08:00
Accusys
e14dc0fcb9 fix: register dedup response returns full existing file metadata (not zeros) 2026-05-19 03:02:56 +08:00
Accusys
1c42004abf fix: scan job_id via LEFT JOIN LATERAL monitor_jobs instead of stale videos.job_id column 2026-05-19 02:49:53 +08:00
Accusys
538eea6406 feat: health consistency agent — 4 data integrity checks, GET /health/consistency 2026-05-19 02:17:27 +08:00
Accusys
c95de97762 feat: show config toggle states in /health/detailed 2026-05-19 00:42:41 +08:00
Accusys
a02a83c1c3 fix: scan status=unregistered not shown as registered; feat: config API for auto-pipeline/watcher-auto-register 2026-05-19 00:37:00 +08:00
Accusys
91bf26fd8b fix: /doc redirects to /doc-wasm (remove old Python doc login) 2026-05-18 12:34:00 +08:00
Accusys
6452ac5af2 feat: WASM-based doc viewer (pulldown-cmark) 2026-05-18 10:07:38 +08:00
Accusys
e6fd170da2 fix: identity agent writes Round 1 matches to DB immediately 2026-05-18 03:46:33 +08:00
Accusys
02cca7beda fix: search frames SQL alias bug, visual search serde default, identity JSON hyphen lookup 2026-05-18 02:52:27 +08:00
Accusys
5c24cb2214 fix: identity tmdb_profile returns local path instead of TMDb URL 2026-05-18 01:34:39 +08:00
Accusys
a1f85de885 fix: identity detail response uuid -> identity_uuid 2026-05-18 01:31:39 +08:00
Accusys
362c63007c feat: smart search response includes start_frame/end_frame/fps, add limit param 2026-05-18 01:21:43 +08:00
Accusys
4125163f7b refactor: rename search uuid -> file_uuid 2026-05-18 01:17:48 +08:00
Accusys
70646871b9 fix: pipeline not complete until ingestion steps done 2026-05-18 00:50:33 +08:00
Accusys
088aefdac7 fix: pipeline timeline log, chunk lookup, face processor no fallback, Qdrant UUID script, delete safety rules 2026-05-18 00:36:14 +08:00
Accusys
a880c80556 fix: face_detections INSERT in pipeline, add dependency graph doc 2026-05-17 22:16:20 +08:00
Accusys
d6c8930f84 feat: ingestion status endpoint + pipeline doc with 入库 steps 2026-05-17 21:36:55 +08:00
Accusys
3164a65554 update: pipeline, search, clip, embedding fixes 2026-05-17 19:46:35 +08:00
Accusys
5317cb4bec feat: schema tracking, SHA256 integrity, identity UUID fix, 3-angle face match, cuts table, trace stranger_id 2026-05-16 03:10:50 +08:00
Accusys
c41f7e0c6e feat: schema version tracking, SHA256 integrity, setup scripts, bug fixes 2026-05-15 18:06:36 +08:00
Accusys
0e73d2a2ce test: add unified probe unit tests (8 Rust + 6 Python), fix pre-existing test compilation errors 2026-05-15 14:58:44 +08:00
Accusys
29eca5a224 feat: unified probe — dispatcher detects category, runs ffprobe/Python/meta per file type 2026-05-15 14:38:47 +08:00
Accusys
7686ed0df7 fix: use mtime (not birthtime) for UUID birthday — rsync preserves mtime across systems 2026-05-15 13:26:36 +08:00
Accusys
5af8df9201 fix: watcher is detection-only — pre_process_file is now explicit, not automatic 2026-05-15 13:18:22 +08:00
Accusys
43cf702d05 feat: add 'unregistered' status — all incomplete files migrated to unregistered 2026-05-15 13:17:31 +08:00
Accusys
9fef5fb70d fix: move DEMO_USER_API_KEY from hardcoded to env var, add .env.example 2026-05-15 13:14:59 +08:00
Accusys
8a7ffc94e4 fix: register uses birthday from pre.json (not DB registration_time) for UUID stability
- Step 4 UUID computation now reuses birthday from pre.json or file creation time
- Removed DB birthday query that overwrote the correct birthday with NOW()
- End-to-end verified: watcher UUID now matches registration UUID
2026-05-15 13:07:45 +08:00
Accusys
cdbd205972 feat: file pre-processor in watcher — SHA256 + probe + UUID → .pre.json for all file types 2026-05-15 12:51:43 +08:00
Accusys
e86aebccee feat: register INSERT now uses status='registered' + registration_time=NOW() 2026-05-15 12:46:42 +08:00
Accusys
37799fff4e fix: add identity_uuid to /identities list + /file/:uuid/identities responses 2026-05-15 10:14:22 +08:00
Accusys
fdcec82274 fix: file/identities — replace NULL first/last_appearance with actual start_frame/end_frame + start_time/end_time + fps 2026-05-15 10:07:35 +08:00