From 87221be5863029c958b89ac3708c1c7ec7ffa049 Mon Sep 17 00:00:00 2001 From: Autumn-27 <53844290+Autumn-27@users.noreply.github.com> Date: Tue, 18 Aug 2026 12:27:26 -0400 Subject: [PATCH] =?UTF-8?q?tweak:=20reporter=20=E8=A7=A6=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E7=AD=96=E7=95=A5=E9=BB=98=E8=AE=A4=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=20parallel=20+=20merge=3Dnone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 一漏洞一报告:多个 finding 并发各写各的,避免串行排队积压。 merge 设 none(而非默认 all)——否则一波 finding 会被合并成一次运行,并行失效; maxParallel=5 限制同时的报告会话数。 --- server/orchestration.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/orchestration.go b/server/orchestration.go index bbd5dad..7d3b280 100644 --- a/server/orchestration.go +++ b/server/orchestration.go @@ -523,6 +523,12 @@ func (s *Server) seedReporterAgent() { if err := s.m.pg.SeedPromptIfEmpty(a.ID, agent.ReporterDefaultPrompt); err != nil { log.Printf("[reporter] seed prompt 失败: %v", err) } + // 触发运行策略:parallel + none —— 一漏洞一报告、多个 finding 并发各写各的。 + // merge 必须为 none:否则(默认 all)一波 finding 会被合并成一次运行,并行就没意义。 + // maxParallel=5:同时最多 5 个报告会话,避免瞬时太多 LLM 调用。 + if err := s.m.pg.SetAgentTriggerBehavior("reporter", "parallel", "none", 5); err != nil { + log.Printf("[reporter] 设置触发运行策略失败: %v", err) + } // 绑定它需要的工具:写报告 + 读证据/执行过程/态势。 if err := s.m.pg.AddAgentToToolBinding("reporter", []string{ "update_finding_report", "get_task_node_detail", "list_task_findings",