Coding agent 開出的 pull request 在 CI 失敗時,應由誰修復:你還是 Agent?
When CI fails on a pull request your coding agent opened, who fixes it, you or the agent?
Coding agent 開出的 pull request 若 CI 失敗,團隊要選擇由 Agent 查看日誌並提交修正,還是先由人員介入。讓 Agent 自行修復可免人手介入,但可能透過略過測試、放寬型別或加入重試令檢查失去嚴謹;文章邀請讀者分享如何限制 Agent 修改檢查及處理失敗。
More pull requests are opened by coding agents now, and some of them come back red. A lint rule the agent never ran, a test that only fails on the CI image, a flaky integration step, a type error in a file it did not touch. Someone has to read the log and decide what happens next.
Letting the agent fix its own failure closes the loop without a person in it, but it can also lead the agent to weaken the check until it passes: skipping a test, loosening a type, adding a retry. Fixing it yourself keeps the check honest, yet you end up doing the same cleanup every time an agent trips over the same rule.
We would like to hear how your team handles it:
- Does the agent see the CI log and push a fix, or does a person step in first?
- Are there checks the agent is not allowed to change, and how do you make that stick?
- What is the worst "fix" for a red build you have seen an agent propose?
Describe your setup in the comments below, whether it is fully automatic or entirely manual.
來源:DEV Community · dev.to