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
@@ -96,7 +96,7 @@ func TestRAG_ReportSectionInjectsRefs(t *testing.T) {
}}
o := newOrch(ll, kbTool(nil), &fakeSink{}, &fakeExec{})
body := o.writeSection(context.Background(), "杭州旅游", "u1/travel", "西湖", o.tracer("t1"), "section:0")
body, _ := o.writeSection(context.Background(), "杭州旅游", "u1/travel", "西湖", o.tracer("t1"), "section:0")
if !strings.Contains(body, ragSnippet) {
t.Errorf("报告章节撰写 prompt 应含检索资料,got %q", body)
}