Enable SEMANTIC_SUMMARY_SHADOW to call the product PI runner on authorized messages only, keep REPLACE unwired, and record MiniMax evidence for the D3 matrix close. Co-authored-by: Cursor <cursoragent@cursor.com>
3.7 KiB
3.7 KiB
W2 语义摘要 shadow 真实 PI 测试报告
一、 测试背景 (Background)
PU6 脚手架已合 dev:SEMANTIC_SUMMARY_SHADOW 默认 off,summarizer 为 heuristic/stub,REPLACE 未接线。W2 关闭条件要求产品 PI Agent Runner + MiniMax、R13 最小出站、负例,且不启用 REPLACE。
二、 测试目标 (Test Objectives)
- 组合根在 flag on +
pi-agent时注入PiSemanticSummarizer(no-tool) - 真实 MiniMax 产出 shadow narrative;served deterministic 不被替换
- injection/撤权材料不把秘密写入 shadow
- 仓库默认
SEMANTIC_SUMMARY_SHADOW=false、SEMANTIC_SUMMARY_REPLACE=false
三、 测试方案与环境 (Test Plan & Environment)
- OS:Linux;Go:go1.27.1
- 分支:
feature/w2-semantic-summary-shadow-live - Runner:
http://127.0.0.1:18865,modelMiniMax-M2.7-highspeed,typed-result-v1 - DATA_DIR:
data/dev(与容器workspaces绑定) - 层级:单测 + 真实 PI(非
-short);Playwright digest UI NOT RUN(本波无独立 digest 页面门) - 证据:
.doc/test-reports/assets/2026-09-17-w2-semantic-summary-shadow/
四、 预期结果 (Expected Results)
- flag off:无 shadow(既有 ctxmgr 单测)
- stub/recording:instructions 含 zero tool;input.json 仅 id/role/content
- live:
shadow叙事非空;不含 injection 秘密「预算200万」;REPLACE 未接线
五、 实际测试结果与判定 (Actual Results & Evaluation)
5.1 单测(flag / no-tool / fallback)
- 测试输入 (Input):
go test -short ./internal/app ./internal/ctxmgr ./internal/app/chatflow - 实际输出 (Actual Output):
ok全绿 - 评价判定 (Evaluation / Verdict):PASS
- 性能与耗时 (Duration & Latency):<1s
5.2 真实 PI MiniMax
- 测试输入 (Input):
RUN_PI_E2E=1 go test ./internal/app -run TestPiSemanticSummarizer_LiveMiniMax -v - 实际输出 (Actual Output):
=== RUN TestPiSemanticSummarizer_LiveMiniMax
semantic_summarizer_test.go:152: model=MiniMax-M2.7-highspeed protocol=semantic-summary-v1 elapsed=7.779s narrative="# 授权对话摘要\n\n用户就高频超声手术刀系统的研发立项事宜寻求建议。助手回复指出,该项目需重点关注电气安全要求及产品型检周期等关键事项。"
--- PASS: TestPiSemanticSummarizer_LiveMiniMax (7.78s)
- 评价判定 (Evaluation / Verdict):PASS(未出现「200万」;
tool_permissions=none由 input.json + instructions 约束) - 性能与耗时 (Duration & Latency):7.78s
5.3 Playwright digest UI
- 测试输入 (Input):无独立 digest 页面门
- 实际输出 (Actual Output):NOT RUN
- 评价判定 (Evaluation / Verdict):不挡 W2 done(关闭条件为真实 PI + R13 + 负例,不依赖 REPLACE/UI 替换)
- 性能与耗时 (Duration & Latency):—
5.4 arch-check / health
- 测试输入 (Input):
./scripts/arch-check.sh --mode block;curl -sf :8080/health - 实际输出 (Actual Output):
production gate passed;healthschema_version=48agent_backend=pi-agent - 评价判定 (Evaluation / Verdict):PASS
- 性能与耗时 (Duration & Latency):<1s
六、 自动化测试套件汇总 (Test Suite Execution)
go test -short ./internal/app ./internal/ctxmgr ./internal/app/chatflow:PASSgo test ./internal/app -run TestPiSemanticSummarizer_LiveMiniMax:PASS(真实 MiniMax)./scripts/arch-check.sh --mode block:PASS
七、 测试结论与后续优化建议 (Conclusion & Next Steps)
W2 达到矩阵「语义摘要(D3)」done。SEMANTIC_SUMMARY_REPLACE 保持未接线、默认 false。后续可选 REPLACE 灰度须另开授权。