Files
code-review/.gitea/ai-review/findings.json
T
AI Review Bot 0602f47100
AI / 計算版本號 (pull_request) Successful in 2s
AI / Code Review (pull_request) Failing after 3s
chore: update ai-review findings [ai-review-bot][failure]
2026-06-23 06:59:26 +00:00

43 lines
2.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[
{
"level": "critical",
"role": "Maya",
"location": "app/findings.test.js",
"problem": "新增的 `filterFalsePositivesWithAI` 測試中,雖然驗證了平行裁決與失敗降級,但完全沒有驗證『當 AI 回傳結構不符合預期(如 JSON 格式錯誤、欄位缺失)』時的錯誤處理測試,且缺乏針對『裁決結果與輸入數量不對等』的邊界測試。",
"suggestion": "補上針對 `chatFn` 回傳無效 JSON、回傳非預期結構、回傳數量少於輸入數量時的測試案例,確保 Paladin 裁決器在惡劣輸入下仍能穩健運行(保守保留)。",
"is_new": true
},
{
"level": "critical",
"role": "Maya",
"location": "app/usage.test.js",
"problem": "`extractUsage` 函數負責解析各類複雜的 LLM 回應,但現有的測試案例僅覆蓋了快樂路徑,缺乏對於『API 回應格式異常(欄位型別錯誤、欄位缺失)』的健壯性測試。",
"suggestion": "請補上 `extractUsage` 針對非數字型別的 token 欄位、缺失部分必要欄位、傳入非物件參數的單元測試,確保計費統計不會因為一個格式錯誤的回應而崩潰。",
"is_new": true
},
{
"level": "warning",
"role": "Maya",
"problem": "新增了 `usageSection` 功能,但測試案例中沒有驗證當 `usageSection` 為空字串或未傳入時,輸出的 body 是否正確排版(例如不會多出不必要的換行符號)。",
"suggestion": "補充測試案例,驗證當 `usageSection` 為空時,輸出的 Markdown 結構是否如預期(沒有多餘的 `",
"location": "app/comments.test.js:275",
"is_new": false
},
{
"level": "warning",
"role": "Maya",
"problem": "`reconcileConversations` 中的 `reconcile` 流程包含多個步驟(取得 comments、group、判斷、resolve),一旦中間有外部呼叫失敗就降級。目前的測試案例主要覆蓋了「全部成功」或「特定某個失敗」,但缺乏對「部分 resolve 成功,部分 resolve 失敗」這種狀態的驗證。",
"suggestion": "補充測試案例,模擬部分 `resolveComment` 成功、部分失敗的情境,驗證最終回傳的 `closedCount` 與 `resolvedFindings` 等統計數據是否正確計算。",
"location": "app/resolve.js:246",
"is_new": false
},
{
"level": "warning",
"role": "Maya",
"location": "app/resolve.test.js",
"problem": "`parseBotReviewComment` 雖然有解析測試,但缺乏對於『內容含有危險字元(如 HTML 標籤、破壞性換行)』的測試,這會影響 `reconcileConversations` 呼叫 AI 時的安全性與準確性。",
"suggestion": "補上針對惡意內容(如包含假冒的標籤 `**審查員**...`)的 `parseBotReviewComment` 測試,確保解析器能正確處理或剔除。",
"is_new": true
}
]