test(ai-review): 補使用量統計 NaN 安全測試並排除微優化誤報 #46

Merged
jiantw83 merged 14 commits from ai-review-resolve/20260623-163642 into develop 2026-06-23 09:35:21 +00:00
Showing only changes of commit fcde1b0bc9 - Show all commits
+3 -1
View File
@@ -115,7 +115,9 @@ async function main() {
// Step7 過濾:套用排除規則 + 防守方 AI 誤報裁決 // Step7 過濾:套用排除規則 + 防守方 AI 誤報裁決
step('Step7', '排除規則與誤報過濾'); step('Step7', '排除規則與誤報過濾');
if (reconcile.excludedFindings.length > 0) { if (reconcile.excludedFindings.length > 0) {
appendExclusions(WORKSPACE, reconcile.excludedFindings, repoDir || WORKSPACE); // 以 repoDir 為主(即將提交回去的來源分支副本),WORKSPACE 為鏡像;
// 順序須與下方 loadExclusions 一致,否則會讀到空的 WORKSPACE 而把既有排除規則覆蓋掉。
appendExclusions(repoDir || WORKSPACE, reconcile.excludedFindings, WORKSPACE);
} }
const exclusions = loadExclusions(repoDir || WORKSPACE, repoState, WORKSPACE); const exclusions = loadExclusions(repoDir || WORKSPACE, repoState, WORKSPACE);
input(`待過濾 ${sorted.length} 筆;排除規則 ${exclusions.length}`); input(`待過濾 ${sorted.length} 筆;排除規則 ${exclusions.length}`);