fix(CI): notify竞态修复 + 双倍触发去重 (PR #12 rebase, reviewed & approved) #14

Merged
jiangwei-infra merged 3 commits from fix/ci-dedup-v2 into main 2026-06-09 15:36:22 +00:00
Owner
No description provided.
jiangwei-infra added 3 commits 2026-06-09 15:35:59 +00:00
1. 触发器:去掉 push,只保留 pull_request(opened, synchronize)
   - 每次 push 到 PR 分支不再跑 2 次 CI
2. notify-on-failure:只有明确的 failure 状态才发通知
   - 之前:空状态/unknown/pending 都触发通知(误报根因)
   - 现在:只有 STATUS=failure 才发通知
3. venv 路径:统一用 /tmp/ci-venv-lint 和 /tmp/ci-venv-test
   - 避免 host 模式下与开发目录 .venv 冲突
根因:notify-on-failure job 通过 commit status API 查询结果时,
自身的 pending status 会污染查询结果(竞态条件):
1. lint/test 都 success
2. notify 开始运行,自身状态 pending 写入 commit status
3. notify 查询 commit status → 看到 pending(自己的)≠ success
4. 误发 [CI] 失败 评论 + webhook 触发 Mail 通知

修复方案:
- 不再查询 commit status API
- 直接用 needs.lint.result 和 needs.test.result 判断
- 只有明确的 failure 才发通知
- 同时去掉 push 触发避免双倍运行
fix(spawner): crash cooldown分级 + inform mail crash误标done修复
CI / lint (pull_request) Failing after 7s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 4s
ee1ef23ace
- crashed outcome cooldown 60s(vs 其他 300s)
- import init_db
- whitespace/lint fixes
jiangwei-infra merged commit 717dbc446a into main 2026-06-09 15:36:22 +00:00

[CI] 失败

分支: 14
触发 commit: ee1ef23acea444d0a04378cd8eba4fa62bf0dca0
失败 Job: lint
请检查 CI 日志并修复。

[CI] 失败 分支: 14 触发 commit: `ee1ef23acea444d0a04378cd8eba4fa62bf0dca0` 失败 Job: lint 请检查 CI 日志并修复。
Sign in to join this conversation.