forked from admin/PlantAI-rag-new
docs(deploy): §6.7 功能自测五项(部署完成必须实跑,176 实测沉淀)
- 6.7.1 QA 完整 LLM 答案(complete 事件全量答案,非仅 progress 帧) - 6.7.2 新文档入库闭环(上传→嵌入→检索→清理) - 6.7.3 legacy-rag 真实图谱查询(冷缓存 >60s 需 120s 超时) - 6.7.4 methodology 真实任务流(status 路径布局断言) - 6.7.5 生信镜像冒烟+金标 E2E(smoke_golden 4 步全绿+24 ID diff 空) - 自测结论记录要求:5/5 通过+两机一致性对比 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -258,6 +258,68 @@ curl -s -X POST http://127.0.0.1:8090/api/qa/chat/stream -H 'Content-Type: appli
|
||||
curl -s 'http://127.0.0.1:8094/api/vstore/search?q=测试&as_template=false' | python3 -m json.tool # doc 级检索回归
|
||||
```
|
||||
|
||||
### 6.7 功能自测(部署完成后必须实际跑通,非仅探活)
|
||||
|
||||
> §6.1-6.6 证明「起得来」,本节证明「用得了」。以下五项在 2026-09-09 的 176 部署上全部实跑通过;
|
||||
> 新目标机部署完成后同样必须逐项执行并记录结果,任何一项不过不得交付。
|
||||
|
||||
**6.7.1 QA 完整 LLM 答案**(不能只收到 progress 帧就收工)
|
||||
|
||||
```bash
|
||||
curl -s --max-time 300 -N -X POST http://127.0.0.1:80/api/qa/chat/stream \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"question":"水稻SPL基因家族的功能研究有哪些关键进展?","use_llm":true,"session_id":"selftest"}' \
|
||||
| grep -E '^event:' | sort | uniq -c
|
||||
# 期望:多个 progress + 至少 1 个 complete;complete 的 data.answer 为完整 markdown 答案(数百字以上)
|
||||
```
|
||||
|
||||
**6.7.2 新文档入库闭环**(上传→嵌入→检索→清理,无 GPU 机器嵌入单次约 50s)
|
||||
|
||||
```bash
|
||||
printf 'PlantAI 部署自测文档 独特标志串 QA_SELFTEST_SENTINEL 水稻氮素利用效率' > /tmp/selftest-doc.txt
|
||||
LIB_ID=$(curl -s --max-time 120 -X POST http://127.0.0.1:80/api/docgen/library \
|
||||
-F 'file=@/tmp/selftest-doc.txt' -F 'name=部署自测文档' -F 'as_template=false' \
|
||||
| python3 -c 'import json,sys; print(json.load(sys.stdin)["items"][0]["library_id"])')
|
||||
echo "library_id=$LIB_ID"
|
||||
curl -s --max-time 30 'http://127.0.0.1:8094/api/vstore/search?q=水稻氮素利用效率&as_template=false' \
|
||||
| python3 -m json.tool | head -20 # 期望命中「部署自测文档」
|
||||
curl -s -X DELETE "http://127.0.0.1:8090/api/docgen/library/$LIB_ID" | head -c 100 # 清理
|
||||
```
|
||||
|
||||
**6.7.3 legacy-rag 真实图谱查询**(注意冷缓存 COUNT 聚合 >60s,curl 超时必须 ≥120s)
|
||||
|
||||
```bash
|
||||
curl -s --max-time 120 http://127.0.0.1:8093/api/v1/kg/stats | python3 -m json.tool
|
||||
# 期望 status=success 且 relations 计数与源机一致(176 实测:SUPPORTED_BY 13092194 / ASSERTS 13040841)
|
||||
curl -s --max-time 120 'http://127.0.0.1:8093/api/v1/kg/search?q=SPL&limit=3' | head -c 200
|
||||
```
|
||||
|
||||
**6.7.4 methodology 真实任务流**
|
||||
|
||||
```bash
|
||||
curl -s --max-time 60 http://127.0.0.1:8092/api/v1/methodology/status | python3 -m json.tool
|
||||
# 期望 200 且 papers_table/batch_dir 指向目标机实际布局(相对路径已由 env 解析为绝对路径)
|
||||
```
|
||||
|
||||
**6.7.5 生信(部署了生信时必做)**——镜像冒烟 + 金标 E2E 实跑
|
||||
|
||||
```bash
|
||||
# a) 镜像冒烟 + 金标等价性(真实 docker 计算,约 5-15 分钟;无 GPU 更久):
|
||||
cd <生信部署根>/bioflow_kernel
|
||||
BIOFLOW_DATA=<生信部署根>/bioflow_data CPU=16 MEM=64g \
|
||||
bash tests/smoke_golden.sh bioflow-gf:dev
|
||||
# 期望 4 步全绿:[1/4] python 版本与镜像约定一致;[2/4] ldd 0 缺库;[3/4] CLEAN;
|
||||
# [4/4] GOLDEN_DIFF_OK 24 IDs(与金标 expected ids diff 为空)
|
||||
# b) 意图分流经 80 全链:
|
||||
curl -s --max-time 90 -N -X POST http://127.0.0.1:80/api/bioflow/chat/stream \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"message":"帮我跑水稻 SPL 家族鉴定","session_id":"selftest-bioflow"}' | head -c 800
|
||||
# 期望:event: plan_ready 携带 ≥2 条候选路径(stages 链非空);问答句应被分流到 QA 而非生信
|
||||
```
|
||||
|
||||
**自测结论记录**:以上五项全部通过后,在部署记录中留一行「§6.7 功能自测 5/5 通过」,并注明金标 24 ID 结果与
|
||||
两机一致性对比(QA 答案/图谱计数/金标 diff 与源机对照)。
|
||||
|
||||
## 7. 已知限制与遗留缺口(agent 不得自行补,报 TL 裁决)
|
||||
|
||||
1. **SKIP_KB=1**:数据库未定版,KB 加密打包当前跳过;真实交付前需 TL 拍板「定版」并执行 §2 全量加密(1-2 小时)。
|
||||
|
||||
Reference in New Issue
Block a user