- ensure_face_track_node now UPDATEs label instead of returning early
- Fixes rename persistence - names are now stored in database
- Enables consistent names across all access points (localhost, DDNS)
- When videos table has null values, use MarkBase file info as fallback
- Ensures registered files display correct size and date
- Fixes issue where registered files showed '0B' and no date
- Add fallback path when MOMENTRY_SFTP_ROOT env var is not set
- Default: /Users/accusys/momentry/var/sftpgo/data/demo
- Fixes 500 error when registering files (file_path was empty)
- Log tags count and content after generation
- Log JSON extraction and parsing status
- Log parsed objects and tags count
- Helps debug why vlm_tags may be empty in some cases
- Remove duplicate health::health_routes() merge that was conflicting with public_health_routes
- Move service_management::router() to protected_routes for proper auth
- Service management now works correctly:
- /api/v1/mbe/health (public) - shows VLM status
- /api/v2/service/start (protected) - starts llama-server
- /api/v2/service/stop (protected) - stops llama-server
- Add /api/v1/mbe/health endpoint for status checks
- Add /api/v2/service/start to start llama-server
- Add /api/v2/service/stop to stop llama-server
- Use TCP connection test for port detection (more reliable than lsof)
- Add ps aux fallback for PID detection
- Implement structured bilingual VLM tags
- Add VLM integration documentation for Studio team
Endpoints tested and working with Momentry Studio AdminView UI.
- Added Redis SREM to clear jobs:paused set in unregister_internal
- Ensures re-scan always starts with clean state
- Fixes issue where paused files remain paused after re-scan
- Created PostgreSQL trigger to sync videos.status with monitor_jobs.status
- Added GET /api/v1/jobs/:uuid/status endpoint
- Added POST /api/v1/admin/sync-status endpoint for batch sync
- Status mapping: paused→paused, pending→registered, running→processing, completed→completed, failed→failed
- Migration file: 008_sync_video_status_trigger.sql
- Added Redis paused set for job management
- Worker skips paused jobs during polling
- Added POST /api/v1/jobs/:uuid/pause endpoint
- Added POST /api/v1/jobs/:uuid/resume endpoint
- Added GET /api/v1/jobs/paused endpoint
- Paused jobs are excluded from worker processing queue
- Added GET /api/v1/file/:uuid/data-consistency endpoint
Checks consistency across tkg_nodes, trace_profiles, FS trace dirs, and Qdrant
- Marked 6 old face documents as deprecated with link to Face_Operations_Complete.md
- Created trace_sync module with sync_trace_label() to sync labels across:
1. tkg_nodes.label (PostgreSQL)
2. trace_profiles.name (PostgreSQL)
3. trace_profile.json label (FS)
4. Qdrant _faces payload.label (NEW - was missing)
- Fixed is_tkg_done: allow 0 trace dirs if tkg_nodes exist
(prevents permanent stuck in 'Scanning' status)
- Updated Face Cluster to use sync_trace_label
- Updated merge_trace to use sync_trace_label + cleanup source dir
- Created Face_Operations_Complete.md reference document
(consolidates all face-related docs into single source of truth)
- Added endpoint to serve trace_profile.json files
- Fixes Studio proxy bug (missing file_uuid in path)
- Studio proxy at proxy.rs:809 constructs path without file_uuid
- Core endpoint now provides correct implementation
- Studio can proxy to this endpoint instead of local file reading
- Worker was calling Python store_traced_faces.py instead of Rust version
- This caused trace_id=0 in Qdrant, blocking TKG and file completion
- Now uses rust_binary_path() to find and execute rust_store_traced_faces
- Also removed all Python implementations from processor config
- Removed POSE processor (deprecated)
- Added redis_publisher.py symlink for face clustering
Fixed: file stuck in 'Scanning' due to trace stability check failure
- Add DynamicSemaphore, SystemMonitor, VlmMonitor, AutoScaler
- Replace static SCENE_VLM_SEM with dynamic version (max: 3)
- Start AutoScaler in Worker::run() for automatic adjustment
- Configured for M5Max48: 48GB, thresholds at 38GB/41GB
- Expected processing time: 23-28 days for 10000 files
Note: VLM response tracking to be added separately if needed
- Update face clustering processor
- Update TKG processor
- Update Rust face cluster and trace storage
- Add M4 workspace documentation
Note: Work in progress, not yet tested
- Add TraceProfilePath struct for path parameters
- Refactor get_trace_profile_handler to support both formats:
- Query parameters: /api/v1/trace-profile?file_uuid=...&trace_id=...
- Path parameters: /api/v1/trace-profile/:file_uuid/:trace_id
- Maintain backward compatibility with existing query parameter format
- Fix 404 error when Studio calls trace profile API with path format
Fixes: Studio right-click key frame trace profile error
Deployment: Released to production (3002) on 2026-10-17
Core changes:
- Face clustering threshold: 0.35 → 0.15 (better male/female separation)
- Add auto-filtering for low-quality clusters (face_count<20, bbox_area>150000)
- Add filesystem fallback for trace-profile API
Face clustering improvements:
- Correctly separates male and female faces
- Filters hand detections and isolated faces
- Result: 2 persons (186 male, 174 female) vs 4 persons before
Trace profile API:
- GET /api/v1/trace-profile?file_uuid=X&trace_id=Y
- Returns data from PostgreSQL or filesystem fallback
- Simplifies frontend: no need to know filesystem structure
- Fixes Studio 'trace profile not found' error
Issue: docs_v1.0/M4_workspace/2026-10-16_studio_trace_profile_bug_report.md
Consolidated snapshot (previously WIP in working tree).
- core/pipeline_config: new module loading config/pipeline_flows.json as the
source of truth for stage execution mode (parallel/blocking) and dependencies
- worker/job_worker: dispatch Scene VLM to a background task when the stage is
declared parallel, unblocking the worker poll loop; resolve processor
dependencies from pipeline_flows.json (fallback to built-in)
- config/pipeline_flows.json: asrx depends on [cut, asr]
- scripts/fix_stuck_jobs: fix UTC timezone comparison, raise default threshold
to 6h, skip jobs with recent processor activity
- rust_asrx: Rust speaker diarization CLI + processor wiring
- processor metadata helper; fast_face_clustering script; file_progress pipeline
API; scan API; VAD updates
Major Changes:
- Pipeline Queue integration completed (internal.file + pipeline.commands)
- Fixed old job_worker database compatibility with new command_queue table
- Compiled Swift OCR binary (was missing, causing empty OCR results)
- Added deep scan functionality through re-scan API
Fixes:
- Changed CommandJob.id from i32 to i64 for database compatibility
- Added UUID generation in create_command (message_id field)
- Fixed claim_pending_commands to query queue_name = 'internal.file'
- Fixed field mappings: command_id → message_id, job_type → command_type
- Added support for 'processing' status in CommandJobStatus
Queue System:
- internal.file queue: for register/unregister/re-scan commands (job_worker)
- pipeline.commands queue: for vectorize/store_asrx/etc commands (pipeline_worker)
Documentation:
- Added comprehensive queue system documentation
- Created M4 workspace status reports
- Updated AGENTS.md with queue system details
- Core API now calls MarkBase API instead of scanning filesystem
- Returns file_uuid and file_path from MarkBase
- Merges Core database registration status
- Returns 176 files (116 from MarkBase + 60 registered but deleted)
- Tested and verified on M5Max128
Related: #markbase-integration
Issue: Files with face_traced.json status=null and total_faces=0 stuck in PROCESSING forever
Root cause:
- ingestion_complete checks trace_status == 'no_faces' to skip TKG
- But some old files have status=null instead of 'no_faces'
- TKG check fails because no nodes for no-face videos
Solution:
- Check both status='no_faces' AND total_faces=0
- Skip TKG check for no-face videos (total_faces=0)
- Also update face_cluster_done to handle total_faces=0
Impact:
- Fixes stuck files with null status in face_traced.json
- Consistent with scan.rs fix (commit 0d11c601)
Affected: M4ProMini file 18173b62d80bf829910348fa1a6ddcf5
- Gemma4 returns both content and reasoning_content
- reasoning_content is the thinking process, not the final answer
- content contains the actual scene description
- Changed priority: content first, reasoning_content as fallback
Fixes: Scene VLM generated 0 descriptions issue
Root cause: Using reasoning_content (thinking) instead of content (answer)
- Improve face fast-path trigger: recognize has_faces with empty frames
- Add re-evaluation mechanism: check PROCESSING files every 10 mins
- Enhance ASRX silent fast-path: detect empty segments array
- Fix files stuck in PROCESSING status when all data is produced
Related: M4ProMini deep scan (114 files, 89 bad + 2 stuck)
Issue: ASRX & FACE_CLUSTER forever running/0, no completion trigger
**Problem**:
- Changed to hyphenated format (36 chars)
- videos.file_uuid is varchar(32)
- Caused regression: 'value too long for type'
**Fix**:
- Reverted to simple().to_string() (32 chars)
- Schema convention: ~10 tables use varchar(32)
- Hyphenated format is for command_id, not file_uuid
**Kept**:
- FFPROBE_PATH environment variable (verified working)
**Reference**: M4 analysis of schema constraints
**Fixes**:
1. file_uuid: Use standard format with hyphens (consistent with other 11 places)
- Changed from simple().to_string() to to_string()
- Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
2. ffprobe: Use FFPROBE_PATH environment variable
- Fallback to 'ffprobe' in PATH
- Follows project convention (DATABASE_URL, AUDIT_ENCRYPTION_KEY)
- Solves non-interactive PATH issue
**Rationale**:
- Both are one-line changes
- Reduces packaging cycles (avoiding 4th binary sync issue)
- Critical for data consistency and deployment automation