ci: 让 codecov 上传失败不再拖垮测试 gate#459
Conversation
机器人(dependabot/renovate)发起的 PR 拿不到 CODECOV_TOKEN secret, codecov 上传返回 400 'Token required because branch is protected', 配合 fail_ci_if_error: true 导致 Unit/Integration/Backend E2E 三个 coverage job 全部变红, 整条依赖更新 PR 队列被卡住无法合并. 将三处 fail_ci_if_error 改为 false, 与已有的 coverage-e2e-frontend.yml 写法保持一致. 覆盖率上传仍会执行, 失败只是不再阻断测试 gate.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @suyiiyii's task in 59s —— View job Review progress
FindingsNo blocking issues found. The change is minimal, well-scoped, and matches the stated problem: Optional improvement (P3)If you want to keep the safety net for human/internal PRs while still allowing bot PRs to pass, consider making the failure behavior conditional rather than uniformly fail_ci_if_error: ${{ secrets.CODECOV_TOKEN != '' }}This way, when the token is present and upload fails (expired token, codecov outage, misconfiguration), the job still fails and you notice it. When the token is absent (Dependabot/Renovate/forks), upload failure is silently tolerated. Using the token presence check is more robust than actor-name checks because it also covers external forks where secrets are not available. Residual riskWith |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #459 +/- ##
==========================================
- Coverage 85.19% 82.93% -2.27%
==========================================
Files 114 116 +2
Lines 11561 12250 +689
==========================================
+ Hits 9849 10159 +310
- Misses 1712 2091 +379
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
🚀 Lint & Format Check Results: ✅ PASSEDWhat was checked:
✅ All checks passed!Your code follows the project's style guidelines. Checks performed:
This is an automated check. For questions, ask in the PR discussion. |
abort 用例注释假设 'mock LLM 永不 finish 所以任务一直 RUNNING',
但测试 config 没设 default_max_steps, 后端默认上限为 100 步.
mock LLM 是本地 round-robin, 每步几乎瞬时, 100 步会很快跑完,
任务到达终态后 loading 置 false, Abort 按钮(loading && 渲染)消失.
慢的 Windows runner 上, 'Step 1 出现'到'断言按钮'的窗口里时常
正好撞上任务跑完 -> getByTitle('Abort Chat') element not found.
修复: 在 config 里设 default_max_steps=null(不限制), 任务持续
RUNNING 直到被 abort, 符合用例本意; 按钮断言超时 5s -> 15s 给慢
runner 留余量.
|
Claude finished @suyiiyii's task in 2m 13s —— View job Review progress
FindingsNo blocking issues found. The PR contains two independent, well-scoped changes:
Both changes are minimal and correct. The test still has bounded runtime: Residual risk
|
问题
所有 dependabot/renovate 的依赖更新 PR 在 CI 上都显示「失败」,但测试本身是通过的。真正失败的是 codecov 上传步骤:
机器人发起的 PR 拿不到
CODECOV_TOKENsecret,codecov 上传返回 400,配合fail_ci_if_error: true让Unit + Contract/Integration/Backend E2E三个 coverage job 全部变红,整条依赖更新 PR 队列被卡住无法合并。改动
把
codecov.yml里三处fail_ci_if_error: true改为false,与已有的coverage-e2e-frontend.yml(本就是false,所以它在依赖 PR 上一直是绿的)保持一致。覆盖率仍会正常上传到 codecov,只是上传失败不再阻断测试 gate——测试通过与否仍由 pytest 决定。
影响
解锁被卡住的依赖更新 PR 队列:#458 #457 #454 #453 #451 #450 #448 #430 #435 等。