develop
master
npm test
解決議題 #7 🔴 嚴重(Assassin/security):agentFailureDetail 原本無遮罩擷取 stderr/stdout 各 500 字寫入 CI log,可能長期外洩 token、PII 或原始碼祕密。 - 預設只輸出 exit code/signal/killed 等不含機密的分類資訊。 - 僅在明確開啟 ACTIONS_STEP_DEBUG=true 時,才附上經新增 redactSecrets 遮罩(Authorization/token/URL 帳密/長金鑰)並去除控制字元的片段。 - 另新增 postOthersToIssue:建問題模式下警告+建議改逐條發到 issue,讓每條問題可個別回覆(feat,配合 index.js)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
解決議題 #7 🟠 警告(Leo/maintainability、Rogue/efficiency):resolveMergeBase 原先無條件連做 --unshallow 與兩次 --deepen,且忽略各次 fetch 成敗、只把首次 merge-base 錯誤設為 cause。 - 改為資料驅動策略清單,每個補抓策略成功後立即重試 merge-base,一成功即回傳,避免多餘遠端往返(--unshallow 成功就不再 deepen)。 - 全部用盡才拋錯,訊息彙整各策略成功/失敗診斷(僅策略名與成敗,不含 git 原始輸出以免洩漏遠端資訊),並以 error.cause 保留首次錯誤。 - 本檔另含既有的 push-token(PAT)推送參數 pushToken(feat),維持原推送降級行為。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
整併議題 #7 的建問題模式流程調整與多項 findings 修復(index.js、gitea.js 交錯同檔,整檔歸此)。 - addIssueDependency:建立追蹤 issue 後讓 PR 相依於該 issue,issue 關閉前無法合併(需 repo 啟用問題相依)。 - 🔵 #10(Rogue/efficiency):標籤改於建立 issue 前先 selectLabels、createIssue 時一次帶入,移除事後 addLabelsToIssue 補掛的多餘 API 往返(addLabelsToIssue 保留為通用工具)。 - 使用者補充:建問題模式警告+建議改逐條發到 issue(postOthersToIssue),每條問題可個別回覆。 - 🔴 #1(Mage/logic)+使用者補充:resolveOldComments 延後到審查成功產生結果、發布問題留言前才執行,並以 currentRunCommentIds 排除本回合新留言,避免前置步驟失敗時舊結果被清卻無新結果。 - 🔵 #9(Bard/style):修正「無保留問題」段落註解與實作(靜默通過、不留言)一致。 - 同步更新相關 JSDoc(含 gitea.js listLabels/createIssue/addLabelsToIssue 使用情境)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
以自動 token(gitea.token/GITHUB_TOKEN)推送的 commit 不會再觸發 CI,導致新 head 缺檢查而卡合併;新增 push-token(PAT)由呼叫端以 secrets 傳入,改以 PAT 身分推送使 PR synchronize 事件再觸發 CI,由步驟 1 快速回報把結果蓋到新 head。留空=退回 token 走 origin 推送。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
解決議題 #7 🔵 建議(Bard/style):focusLabel 與 rolesComment 文件仍標「步驟 5/6」,但角色登場已調整為攻擊方步驟 5、防守方步驟 7;統一改為 5/7 與鄰近模板文件一致。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
各 job 的 token 改用 gitea.token、並新增 push-token: secrets.TOKEN,讓結果 commit 以 PAT 推送再觸發 CI,避免自動 token 推送不觸發而卡合併。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Antigravity→gemini-3.5-flash、Codex→gpt-5.5、Claude→claude-haiku-4-5 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- 移除 push-token input,token 兼作 Gitea API 認證與 findings 推送 - commitAndPushFindings 一律以 token 明確認證推送(不走 origin 自動 token); 只要 token 為能觸發 CI 的 PAT,結果 commit 即再觸發 PR 的 CI,避免新 head 缺檢查卡合併 - ci.yaml 三個 job 移除 push-token,保留 token: ${{ secrets.TOKEN }} Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
checkout 於 http.<serverUrl>/.extraheader 持久化自動 Actions token;沿用它推送會被 Gitea 視為自動 token 觸發而不再觸發 workflow。改為推送前於同 scope 先空值重置、再注入 PAT 的 Authorization,使 findings 結果 commit 以 PAT 身分推送、觸發 PR synchronize。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
原策略 fetch 遠端符號 HEAD,會被伺服器解析為遠端預設分支, 只加深預設分支歷史、補不到目前 checkout 的 PR head,淺層時仍可能算不出 merge-base。 改先 rev-parse 取得 HEAD 的 commit SHA,以該 SHA 加深 PR head 側歷史。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- postComment → queueOrPostComment:涵蓋建問題模式下可能只暫存不立即發布的語義。 - ensureIssueCreated → createIssueAndFlushBufferedComments:明示建立 issue 並清空暫存留言的完整行為。 - review.js agentFailureDetail 的 500 字上限抽為具名常數 AGENT_DIAGNOSTIC_OUTPUT_LIMIT。 純內部命名與可讀性調整,無外部行為變更。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
配合 postComment/ensureIssueCreated 改名,更新 gitea.js 與 templates.js JSDoc 內對兩個閉包的引用名稱。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- exclusions.json 新增一條誤報(gitrepo.js:276 使用者名稱固定 ai-review-bot,依管理員指示)。 - 新增 findings 檔追蹤 4 條待人工處理問題(步驟編號硬編碼、兩處缺測試、debug 輸出取捨)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
以 --issue all 處理 13 個建問題模式追蹤議題,逐條對照目前程式碼與 exclusions.json 後: ✅ 已解決 18 條(現行程式碼已修)、🚫 誤報 28 條(已列入 exclusions,不重複新增)、 ⏭️ 待人工 44 條(設計/效能/慣例取捨,依主題去重寫回 42 條追蹤)。各議題已留言處理進度並關閉。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
依議題 #24 Bard 建議,將 agentFailureDetail 內的 INPUT_LIMIT/ AGENT_DIAGNOSTIC_OUTPUT_LIMIT 移至模組頂層,與既有 PER_FILE_DIFF_LIMIT/ TOTAL_DIFF_LIMIT 並列集中管理;值與行為不變。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reviewed-on: #6
No dependencies set.
The note is not visible to the blocked user.
Summary
Tests
npm test- 移除 push-token input,token 兼作 Gitea API 認證與 findings 推送 - commitAndPushFindings 一律以 token 明確認證推送(不走 origin 自動 token); 只要 token 為能觸發 CI 的 PAT,結果 commit 即再觸發 PR 的 CI,避免新 head 缺檢查卡合併 - ci.yaml 三個 job 移除 push-token,保留 token: ${{ secrets.TOKEN }} Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.