Repository navigation
fix(ci): 席位队列被取消时失败通知也省略未运行的飞书用例 - #2606
Merged
Merged
Conversation
#2595 只用 QUEUE_RESULT !== 'failure' 判断飞书 job 是否启动。队列 job 为 cancelled(运行在排队等待期间被整体取消)同样意味着飞书 job 没起来, 极端形状下通知仍会逐条列出 not-run 用例。把判断抽成纯函数 feishuJobRan: failure 和 cancelled 都算没启动而省略 not-run;success 正常列出;未知值 (undefined/skipped 等)保留列出,不因没见过的结果把可能有用的行藏掉。 顺带补上 problemCases 新增 options 参数的 JSDoc(#2595 评审 P3-1/P3-3)。 Co-Authored-By: Claude Code <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 30, 2026 11:54
This was referenced Oct 30, 2026
|
@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。 这次运行覆盖 89a9cea…22d1c8d0b(20 个提交),同批合入的还有 #2546 #2556 #2589 #2591 #2545 #2538 #2595 #2596 #2597 #2581 #2539 #2598 #2515 #2536 #2575 #2366 #2544 #2593 #2603,失败不一定由本 PR 引起。
|
This was referenced Oct 30, 2026
|
🚀 Released in v3.56.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什么
#2595 用
env.QUEUE_RESULT !== 'failure'判断飞书 job 是否真正启动,从而决定失败通知是否逐条列出not-run用例。这个判据只覆盖了「等满席位超时」一种「飞书没跑」。本 PR:
feishuJobRan(queueResult),把 main() 里不可单测的环境变量映射抽出来:failure(等满 290 分钟席位超时)和cancelled(运行在排队等待期间被整体取消,飞书 job 因needs: feishu-queue一并 skipped)都算「没启动」→ 通知不列not-run用例;success正常列出;undefined/skipped等没见过的值保留列出,避免因异常结果把可能有用的行静默藏掉(fail-safe 方向)。problemCases在 fix(ci): 席位超时的失败通知不再刷屏列出未运行用例 #2595 新增的options参数补 JSDoc(与文件内其他导出注解一致)。problemCases串起来的端到端结果。为什么
cancelled这条路径当前不可达:队列 job 被cancelled只可能来自整个 workflow run 被取消,那时midscene-report是 skipped,通知 job 拿不到 manifest,cases本来就空。但用failure/cancelled两个「确定没启动」的取值做判据,比「除了 failure 都算跑了」更贴变量语义,也防住未来 notify job 触发条件变化后的同类刷屏。影响面
只动 CI 失败通知脚本
scripts/midscene-notify-failure.mjs和它的单测,不动src/、不动 workflow、不影响 daemon / CLI / 用户安装,零 breakchange。验证
bun run test -- test/midscene-notify-failure.test.ts test/midscene-e2e-workflow.test.ts:18/18bun test test/midscene-notify-failure.test.ts:9/9(bun 引擎)bunx tsc --noEmit、tsc -p tsconfig.scripts.json、tsc -p tsconfig.test-mocks.json均 0 错;bun run buildexit 0;node --check通过!== 'failure':cancelled 断言红(vitest、bun 都红);=== 'success':undefined/skipped 的 fail-safe 断言红。🤖 Generated with Claude Code