Commit Graph

464 Commits

Author SHA1 Message Date
Accusys
0afc70fc5b test: Production (3002) Phase 2.5 release verification
Test results:
- TKG rebuild: 1.75s (2.4x faster than Playground)
- gaze_trace_nodes: 21 (PostgreSQL fallback)
- lip_trace_nodes: 21 (PostgreSQL fallback)
- Rule2 chunks: 75 ✓

Findings:
- Production faster than Playground (1.75s vs 4.2s)
- Qdrant collection empty (0 points)
- Using PostgreSQL fallback for Phase 2.5
- New videos will auto-populate Qdrant

Status:  Release successful
2026-06-21 04:31:52 +08:00
Accusys
721c343486 release: Phase 2.5 to production (3002) - gaze_trace and lip_trace Qdrant migration
Release: 2026-06-21 02:35
Binary: Jun 21 02:33
PID: 16386

Features:
- Phase 2.5.1: gaze_trace_nodes from Qdrant
- Phase 2.5.2: lip_trace_nodes from Qdrant + face.json
- Qdrant collection: momentry_face_embeddings (dim=512)

Verification:
- gaze_trace_nodes: 21 ✓
- lip_trace_nodes: 21 ✓
- Rule2 chunks: 75 ✓
- Performance: TKG rebuild 1.85s ✓

Backup: momentry_backup_20260619
2026-06-21 03:12:38 +08:00
Accusys
c39805bb8e feat: Phase 2.5 gaze_trace and lip_trace Qdrant migration + Charade Q&A test
Phase 2.5.1: gaze_trace_nodes from Qdrant
- build_gaze_trace_nodes_from_qdrant()
- Read trace_id, frame, bbox from Qdrant payload
- Compute gaze stats (yaw, pitch, roll, gaze direction, blink)
- No PostgreSQL face_detections dependency

Phase 2.5.2: lip_trace_nodes from Qdrant + face.json
- build_lip_trace_nodes_from_qdrant()
- Match trace_id using Qdrant embeddings + face.json bbox
- Compute lip stats (openness, variance, speaking frames)
- Fixed face.json bbox structure (x,y,width,height not bbox object)

Test results:
- 23 gaze_trace nodes from Qdrant
- 23 lip_trace nodes from Qdrant + face.json
- 51 lip_sync edges created
- Charade Q&A: 20 identities, 75 relationship chunks

Docs:
- TKG_PHASE2_NONFACE_MIGRATION_V1.0.md (migration plan)
- 2026-06-21_charade_qa_test.md (Q&A test report)
2026-06-21 02:17:08 +08:00
Accusys
23c440104b feat: Phase 2-3 TKG-only architecture
Phase 2.1: build_face_trace_nodes_from_qdrant()
- Read trace_id, frame, bbox directly from Qdrant payload
- No dependency on face_detections table

Phase 2.3: Rule2 queries TKG nodes
- identity resolution from tkg_nodes.properties.identity_id
- TKG-only architecture (Phase 2.3)

Phase 3: Identity Agent updates TKG nodes
- match_faces_iterative() updates tkg_nodes.properties
- bind_identity_trace() syncs identity_id to TKG
- unbind_identity() removes identity_id from TKG

Test results:
- 23 face_trace nodes from Qdrant (Phase 2.1)
- 75 relationship chunks (Rule2)
- TKG rebuild: Phase0 → Phase1 → Phase2
2026-06-21 01:30:04 +08:00
Accusys
2f2ccc94f7 feat: Identity Agent query Qdrant for face embeddings
Phase 1.4: Modify match_faces_iterative to use Qdrant

Changes:
- match_faces_iterative() now queries FaceEmbeddingDb
- Fallback to PostgreSQL if Qdrant is empty
- Group embeddings by trace_id from Qdrant payload
- Sample 3-angle embeddings (front, mid, back)
- Match against TMDb seeds (threshold=0.50)
- Propagate to unmatched traces
- Update face_detections.identity_id in PostgreSQL

New functions:
- match_faces_iterative() - Qdrant-based matching
- match_faces_iterative_pg() - PostgreSQL fallback

Flow:
1. Load TMDb identities with face_embedding
2. Query Qdrant for file embeddings
3. Sample 3 embeddings per trace
4. Match against TMDb seeds
5. Propagate matches iteratively
6. Update identity_id in PostgreSQL
2026-06-21 00:31:25 +08:00
Accusys
3ad6f8740a feat: Rule2 TKG relationship chunks + Phase0-1 Qdrant integration
Phase 0: TKG builder populate face_detections from face.json
- Fix face.json parser for pose_angle format
- Call store_traced_faces.py to set trace_id
- Skip if trace_id already populated

Phase 1: Qdrant face embeddings integration
- Add FaceEmbeddingDb module (src/core/db/face_embedding_db.rs)
- Create dev_face_embeddings collection (dim=512)
- Store 1122 face embeddings with pose metadata
- API: init_collection, batch_upsert, search_similar

Rule2: TKG edges → relationship chunks
- Design: RULE2_TKG_RELATIONSHIP_V1.0.md
- Implementation: rule2_ingest.rs
- ChunkType::Relationship added
- Edge types: SPEAKS_AS, MUTUAL_GAZE, CO_OCCURS_WITH, HAS_APPEARANCE, WEARS
- Auto-trigger on TKG rebuild

API:
- POST /api/v1/file/:file_uuid/rule2 (vectorization)
- POST /api/v1/file/:file_uuid/tkg/rebuild (auto Rule2)

Test: 75 relationship chunks created + vectorized
2026-06-21 00:22:41 +08:00
Accusys
17e4e15860 feat: add Vision LLM integration (CLIP + Qwen3-VL cascade)
- Add Qwen3-VL dynamic management (start/stop/status CLI)
- Add CLIP + Qwen3-VL cascade detection strategy
- Add Vision CLI commands (vision start/stop/status, detect)
- Add cascade_vision processor module
- Add clip processor module
- Add qwen_vl_manager module

Changes:
- scripts/start_qwen3vl.sh, stop_qwen3vl.sh: Qwen3-VL management scripts
- src/core/vision/: Qwen3-VL manager module
- src/core/processor/cascade_vision.rs: CLIP + Qwen3-VL cascade logic
- src/core/processor/clip.rs: CLIP classification and detection
- src/api/clip_api.rs: CLIP API endpoints
- src/cli/vision.rs: Vision CLI implementation
- src/cli/args.rs: Add Vision and Detect commands
- src/main.rs: Integrate Vision CLI
- src/core/mod.rs: Add vision module
- src/core/processor/mod.rs: Add cascade_vision module
v1.2.0
2026-06-13 16:25:52 +08:00
Accusys
834b0d4865 feat: score-based search, LLM re-ranking endpoint, video title search, pipeline module
Core search changes:
- Replace RRF with score-based merge (max of semantic/keyword/identity)
- Add video title ILIKE search for brand/name queries (score 0.9)
- Add /api/v1/search/llm-smart endpoint with Gemma 4 re-ranking
- Fix LLM JSON parsing (markdown fences, empty responses)

Infrastructure:
- Rebuild Qdrant collection (clear 347K contaminated points)
- Add dotenv loading to main.rs for config parity
- Implement store_pre_chunk in postgres_db.rs

Pipeline module (WordPress):
- store-asrx, rule1, vectorize, phase1, complete endpoints
- CLI commands for pipeline operations

Docs:
- SEARCH_SCORE_IMPROVEMENT.md (score-based merge proposal)
2026-06-04 07:40:41 +08:00
Accusys
e1572907ae feat: ASRX hybrid pipeline, identity history, worker fixes, checkpoint system v1.1.0 2026-06-02 07:13:23 +08:00
Accusys
e3066c3f49 Add Charade face matching experience report
Documents the journey from Rust pipeline snowball bug through
5 iterations of pgvector-based matching to the final 11-identity
centroid approach with dual-gate and ambiguity cleanup.
2026-06-02 05:01:56 +08:00
Accusys
3731a1230f docs: add Identity Best-Face API requirement document for frontend team 2026-06-01 21:58:54 +08:00
Accusys
874d688987 feat: deploy hybrid search (semantic+keyword+identity) with RRF fusion
- Replace smart_search with hybrid RRF implementation
- Add speaker_detections table for identity-agent binding
- Fix identity queries: direct SQL to avoid type mismatches
- Add debug logs to job_worker for processor debugging
- Deployed to production (3002) successfully

Key changes:
- search.rs: Complete rewrite with 3 strategies + RRF
- postgres_db.rs: speaker_detections table + identity query fixes
- job_worker.rs: Debug logs for output file checks

Tested:
- Hybrid search works with semantic + keyword + identity
- Identity search: 'identity:Charade' returns correct results
- Chinese keyword search: '調光' matches Charade summaries

Bugs found:
- Case mismatch: 'ASRX' vs 'asrx' in processors field
- Missing CUT dependency for ASRX processor
2026-06-01 15:15:17 +08:00
Accusys
0d58a738a1 feat: add processor state machine and alert mechanism
- Add ProcessorJobStatus enum (8 states: Idle/Waiting/Ready/Pending/Running/Completed/Failed/Skipped)
- Add processor_alerts table (migrations/034)
- Add emit_processor_alert() to redis_client.rs
- Add ConditionResult enum + check_dependencies() to job_worker.rs
2026-05-30 10:03:49 +08:00
Accusys
08167d73b2 docs: add Processor State Machine V1.0 design 2026-05-30 10:03:48 +08:00
Accusys
3d13d1390e Merge branch 'main' of http://192.168.110.200:3000/admin/momentry_core 2026-05-29 23:14:14 +08:00
Accusys
04cbb71ca0 docs: save handoff - library page flash & filter fix 2026-05-29 23:12:09 +08:00
Accusys
e96cc8c8de docs: record WordPress API URL update session progress 2026-05-29 19:06:15 +08:00
M5Max128
f5cf12409b docs: expand JPEG validation plan to include Python scripts 2026-05-27 15:55:20 +08:00
M5Max128
ea20e27a4d docs: add JPEG validation implementation plan for M5Max48 2026-05-27 15:40:15 +08:00
M5Max128
a036d985b7 docs: add Thumbnail QA Analysis for M5Max48 implementation 2026-05-27 14:35:53 +08:00
M5Max128
c85794292a docs: add processor refactoring assessment from M5Max128 workspace research 2026-05-27 03:59:13 +08:00
M5Max128
955282e587 docs: add LaunchDaemon architecture reference for M5Max128/M5Max48 collaboration 2026-05-27 01:12:37 +08:00
Accusys
127d646ef1 fix: worker processor_results + rule3 SQL + unregister cleanup bugs
- job_worker.rs: add upsert_processor_result when output file exists
- job_worker.rs: add load JSON and store to pre_chunks when output exists
- rule3_ingest.rs: fix SQL bind order (scene_number was occupying chunk_type slot)
- files.rs: fix unregister WHERE clause (uuid -> file_uuid) + add pre_chunks delete
- asrx_self/main_fixed.py: fix KeyError (s['start'] -> s['start_time'])
- wrapper_worker_playground.sh: add Worker launchd script
- com.momentry.playground.plist: add Playground launchd config
2026-05-26 04:35:51 +08:00
Accusys
87dead7f65 fix: POST /api/v1/jobs 500 — wrong column names + NULL file_name v1.0.0-build2 2026-05-25 10:50:37 +08:00
Accusys
20dae387ee docs: sync case-insensitive variant 2026-05-25 10:31:37 +08:00
Accusys
b9e93c6293 docs: update API Ref (V4.2), CHANGELOG, Release Notes for de88fd4e 2026-05-25 10:31:32 +08:00
Accusys
de88fd4e44 fix: restore accidentally deleted type definitions
Add back PipelineType enum, ProcessorType::pipeline() method, and
OLLAMA_URL/EMBED_URL/LLM_HEALTH_URL config constants — all of
which were deleted in commits 78923a89 and 0856b92e while the
referencing code was left intact, causing 5 compilation errors.
2026-05-25 08:50:53 +08:00
Accusys
d7f89a962b fix: frame_number is BIGINT in DB, use i64 not i32
frame_number column in face_detections table is defined as BIGINT (INT8).
Using i32 caused sqlx type mismatch at runtime. Fixed in:
- identity_agent_api.rs: query_as tuples and HashMap key
- qdrant_db.rs: upsert_face_embedding signature and row extraction
2026-05-25 04:07:30 +08:00
M5Max128
25ec1625df Merge branch 'main' of 10.10.10.201:/Users/accusys/momentry_core_0.1/ 2026-05-25 03:59:54 +08:00
M5Max128
0806d44df4 fix: add status/duration/fps to FileDetailResponse; fix progress API with HSET+HGETALL 2026-05-25 03:40:02 +08:00
M5Max128
29eabf6d88 chore: remove swift build artifacts from tracking 2026-05-25 03:37:19 +08:00
Accusys
a2b71fef0d fix: i64→i32 for INT4 cols (identity_binding, identity_agent, qdrant_db) 2026-05-25 03:18:50 +08:00
Accusys
8fdd1d741b fix: stranger_id=NULL on bind/merge; doc: add traces+mergeinto endpoints 2026-05-25 03:03:27 +08:00
M5Max128
78923a8973 fix: system consistency - store_vector, search, worker trigger
- store_vector: stub -> actual PG embedding storage
- search_parent_chunks_semantic: include sentence chunks
- Remove early return in check_and_complete_job
2026-05-24 23:20:02 +08:00
M5Max128
932e43518d fix: trigger_processing — remove fake QUEUED state, create monitor_job if missing
- Remove SET processing_status = 'QUEUED' (no queue exists)
- Fix COALESCE type mismatch (jsonb vs text)
- Fix UPDATE WHERE id =  should be WHERE uuid =
- Check monitor_jobs existence, INSERT if missing via create_monitor_job
- Add UNIQUE constraint on monitor_jobs.uuid
- Fix response message: 'Processing queued' → 'Processing triggered'
2026-05-23 23:06:37 +08:00
M5Max128
5d8449b07c fix: compile processing.rs + mount processing_routes
- Fix 9 compilation errors in processing.rs:
  - memory_mb typo (mem_mb)
  - download_json return type
  - Chunk from_row (use row_to_json)
  - ProgressResponse/SystemHealthInfo/ProcessorProgressInfo Deserialize
  - Remove flush_all/flush (methods don't exist)
- Add pub mod processing to api/mod.rs
- Merge processing::processing_routes() into server router
2026-05-23 22:40:19 +08:00
M5Max128
0856b92ec6 fix: resource path cleanup + mount processing_routes WIP
- config.rs: SCRIPTS_DIR fix, EMBED/OLLAMA_URL 127.0.0.1, PYTHON_PATH restored
- executor.rs: use config::PYTHON_PATH instead of hardcoded path
- probe.rs/watcher.rs: use config::SCRIPTS_DIR instead of hardcoded path
- release.rs: momentry_core_0.1 → momentry_core
- .env.development: fix REDIS_URL host, PYTHON_PATH, SCRIPTS_DIR
- api/mod.rs + server.rs: add processing module declaration (routes not yet mountable due to pre-existing compile errors)
2026-05-23 22:26:03 +08:00
M5Max128
f8bcc0356c feat: frame/time pipeline split + output validation
- Add PipelineType enum + pipeline() to ProcessorType
- Split ProcessorPool into frame_slots (max 2) and time_slots (max 1)
- Add can_start_for() for pipeline-aware scheduling
- Add validate_output_file() — checks JSON validity before marking complete
- Add 3 unit tests for validate_output_file()
- Create DESIGN/FRAME_TIME_PIPELINE_V1.0.md (492 lines)
2026-05-23 21:14:28 +08:00
M5Max128
dddb5d4cbd refactor: centralize port config + fix 8082 conflict
- Add EMBED_URL, OLLAMA_URL, LLM_HEALTH_URL to config.rs
- Fix health.rs hardcoded ports → config references
- Fix sync_db.rs Ollama URL → config::OLLAMA_URL
- Create config/port_registry.tsv (single source of truth for ports)
- Remove Caddy 8082 proxy block (port belongs to LLM)
- Fix .env LLM_URL: localhost → 127.0.0.1 (avoid IPv6 Caddy conflict)
2026-05-23 02:54:34 +08:00
M5Max128
a008bb865b feat: add Gitea to startup script, update AGENTS.md token
- Add Gitea (port 3000) as step 10 in startup script
- Update AGENTS.md Gitea token record
2026-05-23 02:37:19 +08:00
M5Max128
1c30af9557 fix: correct service paths, nohup removal, MongoDB graceful fallback, add MariaDB + Caddy to startup
- Fix Qdrant binary path (services/ -> momentry_resources/bin/)
- Fix LLM binary/model paths (llama/ -> momentry_resources/llama/, models/ -> models/llm/)
- Fix PostgreSQL data path (pgsql/data -> momentry/var/postgresql)
- Remove nohup (fails in LaunchDaemon environment)
- Add MongoDB graceful fallback with 5s timeout in server.rs
- Add MariaDB + Caddy steps to startup script for WordPress
- Revert all unrelated changes
2026-05-23 01:46:23 +08:00
Accusys
6967b99142 Merge remote-tracking branch 'origin/main' 2026-05-22 17:38:34 +08:00
Accusys
4cd5d63e64 feat: RustDesk 1.4.6 verified and installed 2026-05-22 17:37:35 +08:00
M5Max128
3ccdf403b6 feat: add Ollama to verified sources (Gitea repo + manifest + build from source) 2026-05-22 17:20:14 +08:00
Accusys
c09268f3d3 docs: add go(golang) and ollama verification reports 2026-05-22 16:58:08 +08:00
Accusys
84a2f71e30 docs: add verification_doc links to service sources manifest 2026-05-22 16:57:45 +08:00
Accusys
9b32d1fed4 docs: add Gitea repo URLs to service sources manifest 2026-05-22 16:45:55 +08:00
Accusys
3ef2e6e150 docs: add service sources manifest (replace src/ directory) 2026-05-22 16:38:58 +08:00
Accusys
c4e30e4234 fix: list_resources returns data (config+metadata); register source code resource 2026-05-22 16:01:33 +08:00
Accusys
bd82028f34 refactor: unified LLM config - CHAT_URL/VISION_URL/SUMMARY_URL with env var overrides 2026-05-22 15:47:17 +08:00