fix(worker): 写回计数按事实/资产/漏洞分开统计
原先 record_fact/insert_assets/report_finding 共用一个 wrote 计数器,
日志却统一打印成"写回 N 条事实",把资产、漏洞也算进"事实"里,容易误导
(如枚举意图插入 25 个资产 + 1 条 fact 会显示"写回 26 条事实")。
改为 WriteCounts{Facts,Assets,Findings} 分类计数,日志打印
"写回 事实1 资产25 漏洞0",Total() 保留"是否落库任何东西"的判定。
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
1 parent
2c3ca4b194
commit
abc551cc76
4 files changed
+36
-15
No files matched your search
@@ -272,7 +272,7 @@ func (t *ToolSet) insertAssets() actool.CoreTool {
|
||||
continue
|
||||
}
|
||||
results = append(results, result{Index: i, ID: id, Type: typ})
|
||||
t.wrote++
|
||||
t.writes.Assets++
|
||||
t.anchorOwner(id)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user