Files
momentry_core/docs_v1.0/issues_2026-06-21.md
Accusys 7e548f8b08 release: v1.3.0 - TKG node type renaming
Changes:
- Rust: face_trace → face_track (45 occurrences in 8 files)
- Rust: gaze_trace → gaze_track, lip_trace → lip_track
- Python: tkg_builder.py unified + pipeline_checklist.py fixed
- Swift: swift_hand.swift hand state detection (empty vs holding)

Node type changes:
  face_trace    → face_track
  person_trace  → body_track
  gaze_trace    → gaze_track
  lip_trace     → lip_track
  hand_trace    → hand_track
  speaker       → speaker_segment
  object        → detected_object
  text_trace    → text_region

Migration:
  PUBLIC schema: 12970 + 892 + 305 rows updated
2026-06-22 07:18:21 +08:00

5.9 KiB

Issue Report: 2026-06-21

Issue 1: Worker Process Stuck

Description

Worker process (PID 58279) started on Fri10PM was stuck and not processing new jobs. Last log entry dated 2026-06-20 06:52.

Symptoms

  • Jobs triggered via API returned "Processing triggered" but never executed
  • Redis keys for new jobs were not created
  • Progress API returned empty response
  • Worker logs showed old timestamps

Resolution

  • Killed stuck worker: kill 58279
  • Restarted worker: cd /Users/accusys/momentry_core && ./target/release/momentry worker
  • New worker PID: 52908

Root Cause (Suspected)

  • Worker process running for extended period without proper cleanup
  • Possible Redis connection timeout or job queue corruption

Recommendation

  • Add worker health check mechanism
  • Implement automatic worker restart on inactivity timeout
  • Add logging for job queue polling status

Issue 2: Face/YOLO Processor Failure - Missing OpenCV

Description

Face and YOLO processors failed with ModuleNotFoundError: No module named 'cv2'

Error Log

[ERROR] Processor face failed for job d8acb03870f0cc9b14e01f14a7bf24d6: Failed to run "/Users/accusys/momentry_core/scripts/face_processor.py"
[ERROR] Processor yolo failed for job d8acb03870f0cc9b14e01f14a7bf24d6: Failed to run "/Users/accusys/momentry_core/scripts/yolo_processor.py"

Python Test Result

python3 /Users/accusys/momentry_core/scripts/face_processor.py --help
Traceback (most recent call last):
  File ".../face_processor.py", line 25, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

Resolution

pip3 install opencv-python

Recommendation

  • Add Python dependency check in worker startup
  • Document required Python packages in README
  • Add requirements.txt with all processor dependencies

Issue 3: Redis Prefix Configuration Confusion

Description

Two different Redis namespaces exist:

  • momentry: - Production server (port 3002)
  • momentry_dev: - Playground server (port 3003)

Impact

  • Jobs triggered on production server not visible to playground worker
  • Progress data stored in different namespaces
  • API proxy needs to match correct prefix

Current Setup

Production Server (port 3002): Redis prefix "momentry:"
Playground Server (port 3003): Redis prefix "momentry_dev:"

Recommendation

  • Document Redis prefix configuration clearly
  • Add environment variable for Redis prefix selection
  • Consider using same prefix for development simplicity

Issue 4: Progress API Behavior

Description

GET /api/v1/progress/:file_uuid returns empty response when:

  1. No job exists for the file
  2. Job is complete (all processors finished)
  3. Worker is stuck/not processing

Expected Behavior (from docs)

{
  "file_uuid": "...",
  "overall_progress": 71,
  "processors": [
    {"processor_type": "asr", "status": "complete", "progress": 100},
    {"processor_type": "yolo", "status": "running", "progress": 65}
  ]
}

Actual Behavior

  • Returns empty response (no output) when job complete or missing
  • Frontend cannot distinguish between "not started" vs "completed"

Recommendation

  • Return explicit status for completed jobs (e.g., {"overall_progress": 100, "status": "completed"})
  • Return 404 when job not found (file never processed)
  • Add status field to response: pending, running, completed, failed

Issue 5: Frontend Status Display Bug

Description

Frontend showed "處理中" (processing) status for Gamma Carry file but:

  • Database status: registered (not processed)
  • No job in Redis
  • No progress data

Cause

Frontend code sets f.status = 'processing' immediately after process trigger, without verifying job creation:

// LibraryView.vue line 463
if (result.success) {
  f.status = 'processing'  // Sets status prematurely
  pollProgress(f.file_uuid)
}

Impact

  • User sees "processing" status but actual processing never started
  • Misleading UI feedback

Recommendation

  • Verify job creation before setting status
  • Check Redis job key existence
  • Poll progress API and set status based on actual response
  • Handle case when progress API returns empty (job not created)

Test Results Summary

File: Gamma Carry Saves the World..mp4

  • UUID: d8acb03870f0cc9b14e01f14a7bf24d6
  • Processing triggered: 2026-06-21 12:13

Processor Results

Processor Status Output
cut ✓ Complete 4825 frames
asr ✓ Complete 0 segments
face ✗ Failed Missing cv2
yolo ✗ Failed Missing cv2
ocr - Not run Dependency failed
pose - Not run Dependency failed

Redis Keys Created

momentry:job:d8acb03870f0cc9b14e01f14a7bf24d6
momentry:progress:d8acb03870f0cc9b14e01f14a7bf24d6
momentry:job:d8acb03870f0cc9b14e01f14a7bf24d6:processor:cut
momentry:job:d8acb03870f0cc9b14e01f14a7bf24d6:processor:asr
momentry:job:d8acb03870f0cc9b14e01f14a7bf24d6:processor:face
momentry:job:d8acb03870f0cc9b14e01f14a7bf24d6:processor:yolo

API Test Results

API Status Note
POST /api/v1/file/:uuid/process ✓ Works Job created
GET /api/v1/file/:uuid/processor-counts ✓ Works Returns correct counts
GET /api/v1/progress/:uuid Partial Empty when complete/missing
GET /api/v1/jobs - Not tested No response via proxy

Immediate

  1. Install OpenCV: pip3 install opencv-python
  2. Add worker health monitoring
  3. Fix progress API to return status for completed jobs

Short-term

  1. Add Python dependency validation in worker
  2. Document Redis prefix configuration
  3. Improve frontend status verification

Long-term

  1. Add requirements.txt for processor scripts
  2. Implement worker auto-restart mechanism
  3. Add comprehensive logging for job lifecycle
  4. Create integration tests for processing pipeline

Report generated: 2026-06-21 12:15 Reporter: momentry_studio development session