fix(dispatcher): Map 节点错误传播 —— 并行子项失败不再静默(T4.E)

- writeSection 返回 (body, error):仅真·LLM 调用失败返 err;预算触顶/模型未配置
  是主动降级(可见降级正文,err=nil)不计失败
- writeSections 返回 ([]section, failed):失败项 Body 带可见「撰写失败」标记 + 汇总失败数
- mapNode:全部子项失败 → 置 b.fatalErr(任务判 failed 而非静默 done-空);
  部分失败 → trace span + 流式 ⚠️ 告警
- report handleReport:部分章节失败时流式提示,不再当全成功
- 3 单测:全失败/部分精确计数(=1 非 all-or-nothing)/mapNode 置 fatalErr

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-02 09:56:26 +08:00
parent a830ae2a04
commit de36ed4cb3
5 changed files with 115 additions and 16 deletions
+2 -2
View File
@@ -183,8 +183,8 @@ RBAC 未做,暂以单管理员账号代理;概览口径必须是**系统级*
- [ ] mcp-py 算法层去桩:文档解析接 PaddleOCR/magic-pdfmineru.py:11 返回空块)| M
- [ ] 报告原生 PDF(现仅 Wordoffice/unioffice.go| M
### [ ] T4.E 编排引擎边角
- [ ] Map 节点错误传播 + 汇总eino/graph.go:65 单子项失败无感知)| M
### [~] T4.E 编排引擎边角
- [x] Map 节点错误传播 + 汇总 ✅ —— writeSection 返回 (body,err) 仅真·LLM 失败计错(预算/无模型是主动降级不算);writeSections 汇总失败数、失败项 Body 带可见标记;mapNode 全失败→置 b.fatalErr(判 failed 非静默 done-空)、部分失败→trace+流式告警。report handleReport 同步提示部分失败。3 单测(全失败/部分精确计数/mapNode 置 fatalErr)。
- [ ] 熔断器接回 failoverharness/circuitbreaker.go 与 llm/failover.go 未接合,可能长卡备用)| M
- [ ] Branch else 兜底 + coordinator 专家超时(专家卡死拖垮全局,coordinator.go:109| M
- [ ] DSL 拓扑/节点-工具映射校验(dsl/parser.go:23 TODO,现仅 JSON 格式校验)| M