chore(ai-review 狀態): 補測試與排除已涵蓋/誤報 findings,清空 findings.json
This commit is contained in:
@@ -488,5 +488,35 @@
|
||||
"role": "Assassin",
|
||||
"original_finding": "extractUsage 對不預期 payload 僅返回 null,過度信任 API 回應結構,可能導致計費或配額相關監控被繞過;建議增加 Schema Validation、異常明確記錄。",
|
||||
"reason": "誤判/過度設計。extractUsage 僅用於「使用量顯示統計」,非計費或配額強制;回傳 null 是「此回應無可辨識 usage 資訊」的正確訊號,呼叫端以 0 計入並降級顯示,不影響任何金流或門檻判斷。對 best-effort 顯示統計加 schema validation 與錯誤記錄屬過度設計。"
|
||||
},
|
||||
{
|
||||
"location": "app/comments.test.js:250",
|
||||
"role": "Maya",
|
||||
"original_finding": "新增的 postFindingsReview 使用統計功能,但在測試中完全未驗證輸出內容;應斷言 body 含 usageSection 與統計數據。",
|
||||
"reason": "誤判,測試已存在。`app/comments.test.js` 的 'appends usageSection verbatim after the stats block' 斷言 body.endsWith(usageSection) 與結構,'counts both new and old findings in the summary' 斷言四欄新舊統計列;body 內容已被多個案例驗證。"
|
||||
},
|
||||
{
|
||||
"location": "app/findings.test.js:154",
|
||||
"role": "Maya",
|
||||
"original_finding": "filterFalsePositivesWithAI 測試不足,缺乏對內部函數 judgeFindingIsFalsePositive 的獨立單元測試。",
|
||||
"reason": "誤判/不適用。judgeFindingIsFalsePositive 是 findings.js 的私有函式(未匯出),其 verdict 處理(false_positive/confirmed/異常值/拋錯)已透過公開呼叫端 filterFalsePositivesWithAI 的多個案例完整覆蓋;為測試實作細節而匯出私有函式不符測試原則。"
|
||||
},
|
||||
{
|
||||
"location": "app/findings.test.js:145",
|
||||
"role": "Maya",
|
||||
"original_finding": "filterFalsePositivesWithAI 未測試平行裁決部分成功、部分失敗時的結果一致性(失敗者保守保留)。",
|
||||
"reason": "誤判,測試已存在。'keeps failed and confirmed, drops only confirmed false positives (mixed parallel)' 正是模擬一個拋錯、一個誤報、一個成立,驗證只剔除確認誤報、保留失敗與成立者。"
|
||||
},
|
||||
{
|
||||
"location": "app/findings.test.js:189",
|
||||
"role": "Maya",
|
||||
"original_finding": "未測試 resolveMissingLineNumbers 當 chatFn 回傳無效行號時的處理(fallback)。",
|
||||
"reason": "誤判,測試已存在。'resolveMissingLineNumbers keeps the filename after exhausting retries' 以 chatFn 持續回 {line:0}(無效行號)驗證進入 fallback、保留檔名;另有 'swallows chatFn exceptions' 覆蓋拋錯情境。"
|
||||
},
|
||||
{
|
||||
"location": "app/resolve.test.js:21",
|
||||
"role": "Maya",
|
||||
"original_finding": "parseBotReviewComment 的測試沒有驗證解析失敗時回傳 null 的行為。",
|
||||
"reason": "誤判,測試已存在。'returns null for free-form human comments' 已斷言自由格式留言、空字串、null 皆回傳 null。"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user