Compare commits

..

2 Commits

Author SHA1 Message Date
AI Review Bot e03b1c7045 chore: update ai-review findings [ai-review-bot][success]
AI / 計算版本號 (pull_request) Successful in 3s
AI / Code Review (pull_request) Successful in 4s
2026-06-16 08:19:47 +00:00
Jeffery f047b4473e chore(ai-review): 三條 preflight 測試誤判寫入 exclusions 並清空 findings
AI / 計算版本號 (pull_request) Successful in 4s
AI / Code Review (pull_request) Successful in 1m17s
2026-06-16 16:00:17 +08:00
2 changed files with 27 additions and 14 deletions
+18
View File
@@ -381,5 +381,23 @@
"role": "Maya",
"location": "app/preflight.js:107",
"suggestion": "在 `verifyLLM` 函數中,呼叫 `axios.post` 時缺少 `httpsAgent` 選項。這會導致即使設定了 `GITEA_SKIP_TLS_VERIFY`LLM 的 API 請求仍可能因 TLS 憑證問題而失敗。請將 `httpsAgent` 傳遞給 `axios.post` 的選項物件,例如:`await axios.post(`${base}/chat/completions`, payload, { headers, timeout: 30000, httpsAgent });`"
},
{
"level": "warning",
"role": "Aria",
"location": "app/preflight.test.js:25",
"suggestion": "測試描述使用英文。請確保專案在測試描述的語言上保持一致性。如果專案主要使用繁體中文(如 app/preflight.js 中的 JSDoc 和日誌),則應將此測試描述翻譯為繁體中文。"
},
{
"level": "info",
"role": "Aria",
"location": "app/preflight.test.js:1-4",
"suggestion": "匯入語句的排序不一致。建議遵循一致的排序規則,例如:內建模組、第三方模組、本地模組,並在各組內按字母順序排序。"
},
{
"level": "info",
"role": "Aria",
"location": "app/preflight.test.js:14",
"suggestion": "函數名稱 clearLLMEnv 雖然可理解,但可以更具描述性,例如 clearLlmEnvironmentVariables 或 resetLlmEnv。"
}
]
+9 -14
View File
@@ -1,21 +1,16 @@
[
{
"level": "warning",
"role": "Aria",
"location": "app/preflight.test.js:25",
"suggestion": "測試描述使用英文。請確保專案在測試描述的語言上保持一致性。如果專案主要使用繁體中文(如 app/preflight.js 中的 JSDoc 和日誌),則應將此測試描述翻譯為繁體中文。"
"role": "Maya",
"location": "app/comments.test.js:84",
"suggestion": "請為 `postNewCriticalComments` 函數新增一個測試案例,驗證當傳入空的 `findings` 陣列時,函數能正確執行且不發布任何 comment。這能確保邊界條件的處理是符合預期的。",
"is_new": true
},
{
"level": "info",
"role": "Aria",
"location": "app/preflight.test.js:1-4",
"suggestion": "匯入語句的排序不一致。建議遵循一致的排序規則,例如:內建模組、第三方模組、本地模組,並在各組內按字母順序排序。",
"is_new": false
},
{
"level": "info",
"role": "Aria",
"location": "app/preflight.test.js:14",
"suggestion": "函數名稱 clearLLMEnv 雖然可理解,但可以更具描述性,例如 clearLlmEnvironmentVariables 或 resetLlmEnv。"
"level": "warning",
"role": "Maya",
"location": "app/comments.test.js:84",
"suggestion": "目前 `postNewCriticalComments` 的測試案例主要針對單一 critical finding。建議新增一個測試案例,包含多個 `is_new` 且 `level === 'critical'` 的 findings,其中一些可以成功發布行內 comment,另一些則因 `parseLocation` 失敗或 `postInline` 拋出錯誤而降級為一般 comment。這能更全面地驗證迴圈邏輯和多個問題的處理。",
"is_new": true
}
]