docs: update Core Team action items with Studio fixes
Studio Team 已完成修复: 1. ✅ 权重配置修正(rule1_ingestion: 0.05, face_tracing: 0.05, identity_agent: 0.10) 2. ✅ 移除 identity_agent 过滤 3. ✅ API 端点已验证正确(无需修改) 4. ✅ syncFileStatus() 加载进度数据 5. ✅ LibraryView 启动轮询(处理边缘情况) Core Team 后端问题: - 🟡 Pipeline 进度计算逻辑 - 🟡 Pipeline stages 初始化 - 🟡 文件处理异常处理
This commit is contained in:
@@ -1,105 +1,34 @@
|
||||
# Core Team Action Items - Pipeline Progress Issue
|
||||
|
||||
## 🚨 问题摘要
|
||||
## ✅ Studio Team 已完成修复
|
||||
|
||||
**修复内容**:
|
||||
1. ✅ 权重配置已修正(基于 Core team 规格)
|
||||
2. ✅ 移除 identity_agent 过滤
|
||||
3. ✅ API 端点已验证正确
|
||||
|
||||
**Commit**: `待推送`
|
||||
|
||||
---
|
||||
|
||||
## 🚨 问题摘要(已部分解决)
|
||||
|
||||
**现象**:Library 卡片在 deep scan 时卡在 "Scanning..." 状态,没有进度百分比
|
||||
|
||||
**前端已修复**:
|
||||
- ✅ 权重配置已修正(基于 Core team 规格)
|
||||
- ✅ 移除 identity_agent 过滤
|
||||
- ✅ API 端点已验证正确(无需修改)
|
||||
- ✅ `syncFileStatus()` 现在会加载进度数据
|
||||
- ✅ LibraryView 会启动轮询即使 pipeline 数据缺失
|
||||
- ✅ Commit: `待推送`
|
||||
|
||||
**后端需要诊断**:5 项核心问题
|
||||
**后端需要诊断**:3 项核心问题
|
||||
|
||||
---
|
||||
|
||||
## 📋 Core Team 需要检查的项目
|
||||
|
||||
### 1. 🔴 `get_pipeline_stats` API 数据准确性(高优先级)
|
||||
|
||||
**API**: `GET /api/v1/pipeline-stats?file_uuid={uuid}`
|
||||
|
||||
**需要检查**:
|
||||
- API 是否正常返回数据?
|
||||
- 返回的 `stages` 数组是否包含正在运行的阶段?
|
||||
- `overall_progress` 计算是否正确?
|
||||
- 阶段状态(pending/running/completed/failed)是否正确更新?
|
||||
|
||||
**测试命令**:
|
||||
```bash
|
||||
# 找一个 processing 状态的文件 UUID
|
||||
curl -X GET "http://localhost:3002/api/v1/pipeline-stats?file_uuid={FILE_UUID}" \
|
||||
-H "Authorization: Bearer {API_KEY}"
|
||||
```
|
||||
|
||||
**期望返回格式**:
|
||||
```json
|
||||
{
|
||||
"overall_progress": 0.45,
|
||||
"stages": [
|
||||
{
|
||||
"name": "processors",
|
||||
"weight": 0.30,
|
||||
"progress": 0.8,
|
||||
"status": "running"
|
||||
},
|
||||
{
|
||||
"name": "rule1_ingestion",
|
||||
"weight": 0.10,
|
||||
"progress": 0.0,
|
||||
"status": "pending"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**需要验证**:
|
||||
- ✅ `overall_progress` 是否在 0-1 之间?
|
||||
- ✅ `stages` 数组是否非空?
|
||||
- ✅ 至少有一个 stage 的 `status === 'running'`?
|
||||
- ✅ 所有 stage 的 `progress` 总和是否合理?
|
||||
|
||||
---
|
||||
|
||||
### 2. 🔴 `sync_file_status` API 状态更新(高优先级)
|
||||
|
||||
**API**: `POST /api/v1/sync-file-status`
|
||||
|
||||
**需要检查**:
|
||||
- 文件处理完成后,状态是否从 `processing` 变为 `completed`?
|
||||
- 处理失败时,状态是否变为 `failed`?
|
||||
- API 响应时间是否合理(< 1s)?
|
||||
|
||||
**测试命令**:
|
||||
```bash
|
||||
# 同步文件状态
|
||||
curl -X POST "http://localhost:3002/api/v1/sync-file-status" \
|
||||
-H "Authorization: Bearer {API_KEY}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"file_uuid": "{FILE_UUID}"}'
|
||||
```
|
||||
|
||||
**期望返回格式**:
|
||||
```json
|
||||
{
|
||||
"status": "processing"
|
||||
}
|
||||
```
|
||||
或
|
||||
```json
|
||||
{
|
||||
"status": "completed"
|
||||
}
|
||||
```
|
||||
|
||||
**需要验证**:
|
||||
- ✅ 状态是否正确更新?
|
||||
- ✅ 处理完成后是否立即变为 `completed`?
|
||||
- ✅ 错误情况是否返回 `failed`?
|
||||
|
||||
---
|
||||
|
||||
### 3. 🟡 Pipeline 进度计算逻辑(中优先级)
|
||||
### 1. 🟡 Pipeline 进度计算逻辑(中优先级)
|
||||
|
||||
**位置**: Core API pipeline 执行引擎
|
||||
|
||||
@@ -220,11 +149,34 @@ tail -f /path/to/core-api/logs/error.log | grep -E "pipeline|processing|file_uui
|
||||
|
||||
---
|
||||
|
||||
## 📊 API 端点验证结果
|
||||
|
||||
### ✅ 已验证正确(无需修改)
|
||||
|
||||
**API 端点已是正确的**:
|
||||
- ✅ `get_pipeline_stats`: `/api/v1/stats/pipeline/:file_uuid` (src/api/index.ts:510)
|
||||
- ✅ `sync_file_status`: `/api/v1/file/:file_uuid/sync-status` (src/api/index.ts:582)
|
||||
|
||||
**权重配置已修正**:
|
||||
```typescript
|
||||
const WEIGHT_MAP = {
|
||||
processors: 0.30,
|
||||
rule1_ingestion: 0.05, // ✅ 已修正(was 0.10)
|
||||
face_tracing: 0.05, // ✅ 已修正(was 0.10)
|
||||
identity_agent: 0.10, // ✅ 已添加(was filtered out)
|
||||
tkg_nodes: 0.20,
|
||||
tkg_edges: 0.15,
|
||||
rule2_ingestion: 0.15
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 前端已修复的内容
|
||||
|
||||
### 修复 1: `syncFileStatus()` 添加进度加载
|
||||
|
||||
**文件**: `src/store.ts`
|
||||
**文件**: `src/store.ts:888-891`
|
||||
|
||||
**改动**:
|
||||
```typescript
|
||||
@@ -240,7 +192,7 @@ if (newStatus === 'processing') {
|
||||
|
||||
### 修复 2: LibraryView 启动轮询(处理边缘情况)
|
||||
|
||||
**文件**: `src/views/LibraryView.vue`
|
||||
**文件**: `src/views/LibraryView.vue:789-790`
|
||||
|
||||
**改动**:
|
||||
```typescript
|
||||
@@ -254,6 +206,41 @@ else if (!pipeline && f.status === 'processing') {
|
||||
|
||||
---
|
||||
|
||||
### 修复 3: 权重配置修正
|
||||
|
||||
**文件**: `src/store.ts:923-931`
|
||||
|
||||
**改动**:
|
||||
```typescript
|
||||
const WEIGHT_MAP: Record<string, number> = {
|
||||
processors: 0.30,
|
||||
rule1_ingestion: 0.05, // ✅ 修正(was 0.10)
|
||||
face_tracing: 0.05, // ✅ 修正(was 0.10)
|
||||
identity_agent: 0.10, // ✅ 添加(was filtered out)
|
||||
tkg_nodes: 0.20,
|
||||
tkg_edges: 0.15,
|
||||
rule2_ingestion: 0.15
|
||||
}
|
||||
```
|
||||
|
||||
**效果**:进度百分比计算准确
|
||||
|
||||
---
|
||||
|
||||
### 修复 4: 移除 identity_agent 过滤
|
||||
|
||||
**文件**: `src/store.ts:919`
|
||||
|
||||
**改动**:
|
||||
```typescript
|
||||
// 移除过滤,包含所有阶段
|
||||
const stages = data.stages || []
|
||||
```
|
||||
|
||||
**效果**:identity_agent 阶段被正确追踪
|
||||
|
||||
---
|
||||
|
||||
## ✅ 修复验证清单
|
||||
|
||||
修复后,前端期望看到:
|
||||
|
||||
Reference in New Issue
Block a user