Compare commits

...

10 Commits

Author SHA1 Message Date
jiantw83 c3533bdfb6 Merge pull request 'feat/refactor/kiro/fix' (#83) from feat/refactor/kiro/fix into feat/refactor/main
Reviewed-on: jiantw83/code-review#83
2026-05-12 06:48:18 +00:00
AI Review Bot 7578bee5d3 chore: update ai-review findings [skip ci] 2026-05-12 06:47:39 +00:00
jiantw83 8a8612b46d fix: update findings.json to remove redundant warnings and ensure consistency with exclusions.json 2026-05-12 06:46:51 +00:00
AI Review Bot e3b4c7f8d4 chore: update ai-review findings [skip ci] 2026-05-12 06:32:21 +00:00
jiantw83 fdcb9f04de fix: update suggestions in exclusions.json to clarify handling of findings and LLM service provider maintenance 2026-05-12 06:29:43 +00:00
jiantw83 e3596eb710 fix: add duplicate suggestion for LLM integration tests in exclusions.json 2026-05-12 06:28:34 +00:00
AI Review Bot 83943b8dda chore: update ai-review findings [skip ci] 2026-05-12 06:24:11 +00:00
jiantw83 8ad7ae51a4 Merge pull request 'feat/refactor/kiro/fix' (#80) from feat/refactor/kiro/fix into feat/refactor/main
Reviewed-on: jiantw83/code-review#80
2026-05-12 05:00:48 +00:00
jiantw83 3861d288fb Merge pull request 'fix: update role introduction formatting to use table layout' (#78) from feat/refactor/kiro/fix into feat/refactor/main
Reviewed-on: jiantw83/code-review#78
2026-05-12 02:48:24 +00:00
jiantw83 990ef7c847 Merge pull request 'docs: update README and TODO for clarity on file paths' (#77) from feat/refactor/kiro/fix into feat/refactor/main
Reviewed-on: jiantw83/code-review#77
2026-05-12 02:44:12 +00:00
2 changed files with 28 additions and 32 deletions
+26 -2
View File
@@ -59,15 +59,39 @@
"role": "Aria", "role": "Aria",
"location": "action.yaml", "location": "action.yaml",
"suggestion": "action.yaml 已整理,多餘空行已移除,結構整潔" "suggestion": "action.yaml 已整理,多餘空行已移除,結構整潔"
} },
{ {
"role": "Maya", "role": "Maya",
"location": "app/", "location": "app/",
"suggestion": "LLM 整合測試需要真實 API key 與網路,不適合加入單元測試。llm.js 使用統一 OpenAI 相容介面,Gemini 透過相同介面呼叫,無特殊格式差異,現有測試已涵蓋 config/findings/git 邏輯" "suggestion": "LLM 整合測試需要真實 API key 與網路,不適合加入單元測試。llm.js 使用統一 OpenAI 相容介面,Gemini 透過相同介面呼叫,無特殊格式差異,現有測試已涵蓋 config/findings/git 邏輯"
}, },
{ {
"role": "Leo", "role": "Rex",
"location": "app/",
"suggestion": "LLM 整合測試需要真實 API key 與網路,不適合加入單元測試。llm.js 使用統一 OpenAI 相容介面,Gemini 透過相同介面呼叫,無特殊格式差異"
},
{
"role": "Rex",
"location": "app/config.test.js", "location": "app/config.test.js",
"suggestion": "import 語句長度合理,無需拆分為多行" "suggestion": "import 語句長度合理,無需拆分為多行"
},
{
"role": "Rex",
"location": ".gitea/ai-review/findings.json",
"suggestion": "findings.json 重複問題由 AI 去重與排除機制處理,不是程式碼問題"
},
{
"role": "Rex",
"location": "app/comments.js",
"suggestion": "JSON 結尾換行符號為標準做法,不影響任何 JSON 解析器,無相容性問題"
},
{
"location": ".gitea/ai-review/findings.json",
"suggestion": "findings.json 是自動產生的問題記錄檔,不應對其內容提出審查問題"
},
{
"role": "Rex",
"location": ".gitea/workflows/review.yaml",
"suggestion": "切換 LLM 服務提供商的維護建議屬過度謹慎,不是實際程式碼問題"
} }
] ]
+2 -30
View File
@@ -1,37 +1,9 @@
[ [
{
"level": "critical",
"role": "Maya",
"location": "app/",
"suggestion": "此次變更將 AI 審查服務從 OpenRouter 切換至 Gemini,涉及不同的 API 端點、請求/回應格式及錯誤處理機制。儘管 `action.yaml` 已配置 Gemini 相關參數,但 Git Diff 中未見針對 Gemini API 整合的單元測試或整合測試。雖然 LLM 整合測試可能不適合傳統的單元測試(因需真實 API key),但這不應排除建立專屬的整合測試。現有測試可能僅涵蓋 `config/findings/git` 的通用邏輯,不足以全面驗證與 Gemini 服務的特定互動,例如請求建構、回應解析、特定錯誤碼處理及邊界條件。強烈建議為 Gemini 整合新增專屬的整合測試,以確保其在實際運作中的穩定性與正確性。",
"is_new": true
},
{ {
"level": "warning", "level": "warning",
"role": "Aria", "role": "Zara",
"location": ".gitea/ai-review/findings.json",
"suggestion": "檔案最後缺少換行符號,請在檔案結尾加入一個空白換行。",
"is_new": false
},
{
"level": "warning",
"role": "Leo",
"location": ".gitea/ai-review/findings.json",
"suggestion": "`findings.json` 中重新出現關於 `app/config.test.js` 檔案結尾換行符號及匯入語句長度的警告/資訊,但 `exclusions.json` 卻明確指出這些問題已解決或無需修改。這種矛盾會導致審查流程混亂,降低 AI 審查系統的可靠性。建議釐清並統一 AI 審查的設定或排除規則,確保其一致性,避免重複提出已處理或被排除的問題。",
"is_new": true
},
{
"level": "warning",
"role": "Maya",
"location": "app/comments.js:24", "location": "app/comments.js:24",
"suggestion": "`saveFindings` 函數在寫入 `findings.json` 時新增了換行符號。請確認現有的測試是否已涵蓋此輸出格式的變更,確保測試能夠精確驗證檔案內容,包括結尾的換行符號。若無,建議更新或新增測試案例以確保此行為被正確驗證。", "suggestion": "`saveFindings` 函數中,`fs.writeFileSync` 是一個同步操作。如果 `findings` 陣列可能非常大,或者此函數會被頻繁呼叫,同步寫入檔案可能會阻塞 Node.js 事件迴圈,導致應用程式響應變慢。建議改用 `fs.writeFile` (非同步) 以避免阻塞主執行緒,提升應用程式的響應能力。",
"is_new": true
},
{
"level": "info",
"role": "Leo",
"location": ".gitea/workflows/review.yaml",
"suggestion": "工作流程已從 OpenRouter/OpenAI 服務切換至 Google Gemini 服務。不同 AI 服務提供商的 API 響應時間、吞吐量和穩定性可能存在差異。建議在切換後監控 AI Code Review 步驟的執行時間,確保新配置能維持或提升效能,並留意潛在的成本變化,以利長期維護與優化。",
"is_new": true "is_new": true
} }
] ]