From 04d409d2e46560edf74e8efec15b46b4c6040160 Mon Sep 17 00:00:00 2001 From: Accusys Date: Sun, 27 Sep 2026 07:59:11 +0800 Subject: [PATCH] analysis: pipeline architecture flaws - why it cannot complete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Critical flaws: 1. Data flow inconsistency (face.json → workspace.sqlite broken) 2. Status check flaw (doesn't verify data integrity) 3. Infinite wait (no timeout for missing files) 4. Scattered state (DB + Redis + files + memory) 5. Insufficient error handling (no auto-repair, no retry limits) Root causes: - Data flow broken between stages - Status management chaotic - No atomic state updates - Monitoring lacking Recommendations: - Short-term: add integrity checks, timeout, error reporting - Long-term: unified state management, robust pipeline, monitoring Impact: pipeline frequently stuck, hard to diagnose/recover --- .../2026-09-27_pipeline_architecture_flaws.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 docs_v1.0/M4_workspace/2026-09-27_pipeline_architecture_flaws.md diff --git a/docs_v1.0/M4_workspace/2026-09-27_pipeline_architecture_flaws.md b/docs_v1.0/M4_workspace/2026-09-27_pipeline_architecture_flaws.md new file mode 100644 index 00000000..8b5f82a5 --- /dev/null +++ b/docs_v1.0/M4_workspace/2026-09-27_pipeline_architecture_flaws.md @@ -0,0 +1,117 @@ +--- +title: Pipeline Architecture Flaws Analysis +version: 1.0 +date: 2026-09-27 +author: OpenCode +status: critical +--- + +## Summary + +Pipeline unable to complete due to multiple architectural flaws. + +--- + +## Pipeline Flow + +**Phase 1:** ASR, ASRX, Face, OCR, Pose, CUT, Scene VLM +**Phase 2:** Face Tracing, Face Dedup, TKG, Rule Ingestion + +**Dependency:** Face Detection → Face Tracing → Face Dedup → TKG + +--- + +## Critical Flaws + +### 1. Data Flow Inconsistency + +- Face Detection outputs to `face.json` +- Face Tracing reads from `workspace.sqlite` +- No automatic conversion + +**Result:** Data lost between stages + +--- + +### 2. Status Check Flaw + +```rust +// ❌ Current +if face_traced_json.exists() { skip } + +// ✅ Should +if all_files_exist && data_complete { skip } +``` + +--- + +### 3. Infinite Wait + +- Worker waits for 15 missing files +- No timeout +- No error reporting +- Never completes + +--- + +### 4. Scattered State + +- PostgreSQL `processing_status` +- Redis +- File system (face_traced.json) +- Worker memory + +**Problem:** No single source of truth + +--- + +### 5. Insufficient Error Handling + +- No data integrity check +- No auto-repair +- No user-visible errors +- No retry limits + +--- + +## Root Causes + +1. Data flow broken between stages +2. Status management chaotic +3. Error handling insufficient +4. Monitoring lacking +5. No atomic state updates + +--- + +## Recommendations + +### Short-term + +1. Add data integrity checks +2. Add timeout/retry limits +3. Improve error reporting + +### Long-term + +1. Unified state management (PostgreSQL only) +2. Unified data pipeline +3. Robustness design (timeout + recovery) +4. Monitoring + alerting +5. Test coverage + +--- + +## Impact + +- Pipeline frequently stuck +- Hard to diagnose +- Hard to recover +- Poor user experience + +--- + +## Related + +- `2026-09-27_020mp4_root_cause_zombie_worker.md` +- `2026-09-27_020mp4_stuck_analysis.md`