- qdrant_db.rs: ensure_collection now uses PUT /collections/{name}
(was POST /collections without name) and checks response status.
Previous code silently no-op'd, so every upsert got 404 on clean
installs with empty Qdrant.
- face.rs: store_face_embeddings_to_qdrant ensures _faces (512D)
collection exists before upsert (fixes face→facenet→Qdrant broken
link on fresh machines).
- pipeline/mod.rs: vectorize_chunks ensures main text collection
(768D) before upserts.
- job_worker.rs: vectorize_chunks ensures main collection (768D)
before upserts; also 3 additional lines of job_worker WIP fixes.
Verified: after these fixes, Qdrant collections are auto-created
on first upsert, resolving the face embedding + rule1 vectorize
failures on 203.
get_processor_counts built the filename from the queue name
(face_trace.json) while rust_store_traced_faces writes face_traced.json
(per processor_tools_v3 output_file), so the API/UI reported
face_trace has_json=false and face_traced data was unreachable for
existing files. Map face_trace -> face_traced in both
get_processor_counts and get_processor_json.
Verified: dev (201) & 203 processor-counts now report face_trace
has_json=true and /api/v1/processor-json?processor=face_trace returns 200.
The extracted wav used to be written next to the source video
(<video>.wav), polluting the /library listing (002.wav, 025.wav leftovers).
- extract_audio now writes into MOMENTRY_TEMP_DIR (default ~/momentry/temp)
with a unique per-run name (<stem>_asr_<millis>.wav) so concurrent jobs
with the same basename cannot collide and mlx_whisper sidecar JSON is
unique as well.
- TempAudioGuard removes the temp wav + /tmp/<stem>.json sidecar on every
exit path (success, early bail, error).
- Verified: /library source dir stays clean, temp dir empty after run.
- MLX Whisper emits 'avg_logprob: NaN' / 'compression_ratio: Infinity' when a
clip has no intelligible audio (e.g. near-silent test clips). serde_json
strictly refuses those literals, so rust_asr_asrx failed with
'expected value at line 1 column 151' and asrx never completed.
- Sanitize NaN / Infinity / -Infinity literals outside strings into null
before parsing (sanitize_json_nonfinite).
- Add no-audio-track early-out. Clean up .wav byproduct after success.
Verified on dev (m5max48): 002.mp4 asrx re-scan now completes and produces
output/df6376c8....asrx.json; processor_results asrx = completed.
- Removed check_mongodb() function from health.rs
- Health endpoint no longer requires MongoDB (status depends on PG+Redis+Qdrant only)
- ServiceHealth struct: mongodb field commented out
- Both health() and health_detailed() updated
- Removed MongoCache import
Note: Binary rebuild blocked by missing .sqlx cache files for
command/queue.rs and vlm/consumer.rs. Once build env is fixed:
cd momentry_core && SQLX_OFFLINE=true cargo build --release
cp target/release/momentry ../momentry/bin/momentry
- Add is_garbled() function to detect transcription errors:
* Repetitive character detection (>40% same char)
* Language-script mismatch detection
* Compression ratio check for long text
- Expand COMMON_LANGUAGES fallback list: ja, en, zh, ko, th, vi, fr, de, es
- Add get_vad_settings() to disable VAD for short audio (<15s)
- Fix VAD filter causing 0 segments for short clips
- Improve language detection retry logic with garbled output check
Fixes: ASR producing garbled Sinhala text for Japanese audio
- 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)
- MarkBase is managed by launchd, auto-restarts after kill
- Stop API kills process but launchd restarts immediately
- Start API fails because port already in use
- Need to integrate launchctl commands into service API
- Documented problem analysis and proposed solutions
- 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
- Add issue found & fixed section
- Document route conflict problem and solution
- Clarify public vs protected endpoints
- Add authentication requirements for frontend
- Update version to 1.1
- 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
- Explains new automatic trigger-based synchronization
- Provides code examples for removing manual cache updates
- Documents new status query and sync APIs
- Includes migration checklist and testing guide
- 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
- Document new/enhanced API endpoints (worker_status, data-consistency)
- UI improvement recommendations (empty state, worker health, consistency check)
- Priority matrix and implementation guide
- Files to modify list for Studio team
- 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