feat: enhance JSON format validation with backup and reset mechanism on error

This commit is contained in:
2026-05-13 01:06:11 +00:00
parent 49a02ebb6b
commit 6c6680fd3e
3 changed files with 20 additions and 12 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
5. 將提示詞放到 ./app/prompts 內供程式讀取
6. API Key 支援逗號分隔傳入多個,隨機順序各嘗試一次,全部失敗則 exit 1
7. 讀取 Git Diff 時排除 `.gitea/` 資料夾內的所有檔案,避免 AI 分析 workflow 設定等非業務程式碼
8. 階段五完成後驗證 `findings.json``exclusions.json` 是否為合法 JSON 格式,驗證失敗 exit 1
8. 階段五完成後驗證 `findings.json``exclusions.json` 是否為合法 JSON 格式,格式錯誤時先嘗試重置為空陣列並備份原檔,修正失敗 exit 1
# 使用說明