feat(ai-review 對話收斂): 讀 PR review 留言判斷解決狀態並收斂 findings #42

Merged
jiantw83 merged 68 commits from ai-review-resolve/20260623-110950 into develop 2026-06-23 08:29:38 +00:00
Showing only changes of commit 5685ac1729 - Show all commits
+16
View File
@@ -1,10 +1,26 @@
[ [
{
"level": "critical",
"role": "Maya",
"location": "app/comments.test.js:275",
"problem": "新增了 `usageSection` 功能,但測試案例中未針對該區段若包含惡意程式碼(例如注入 `## 🤖 AI 助理使用量`)進行安全測試,若 `usageSection` 來源不可控,可能導致統計版面被偽造訊息覆蓋。",
"suggestion": "補充一個測試案例,傳入帶有惡意 Markdown 格式或假統計資料的 `usageSection`,確認最終產出的 `body` 結構是否如預期被正確組裝,而非被惡意內容竄改結構。",
"is_new": true
},
{ {
"level": "warning", "level": "warning",
"role": "Maya", "role": "Maya",
"location": "app/findings.test.js:283", "location": "app/findings.test.js:283",
"problem": "在測試 `resolveMissingLineNumbers` 時,僅測試了 `chatFn` 成功回傳有效或無效行號的情況,但未測試 `chatFn` 拋出例外(Exception)的失敗情境。", "problem": "在測試 `resolveMissingLineNumbers` 時,僅測試了 `chatFn` 成功回傳有效或無效行號的情況,但未測試 `chatFn` 拋出例外(Exception)的失敗情境。",
"suggestion": "補上 `chatFn` throw error 的測試案例,驗證該函數是否能妥善處理例外並正確記錄警告資訊,而非讓整個執行流程中斷。", "suggestion": "補上 `chatFn` throw error 的測試案例,驗證該函數是否能妥善處理例外並正確記錄警告資訊,而非讓整個執行流程中斷。",
"is_new": false
},
{
"level": "warning",
"role": "Maya",
"location": "app/findings.test.js:145",
"problem": "在 `filterFalsePositivesWithAI` 的測試中,雖然模擬了平行處理,但並未測試當多個並行裁決(Promise.all)中,部分成功、部分失敗時的結果一致性(即確保失敗者保守保留)。",
"suggestion": "增加測試案例:模擬其中一個 sub-agent 拋出錯誤、另一個判為誤報、第三個判為成立,驗證最終結果是否正確地保留了「失敗者」與「成立者」,且只剔除「確認誤報者」。",
"is_new": true "is_new": true
} }
] ]