Repository navigation
test(cli): shell 回收用例补 30s 单测墙钟,避免裸 bun test 5s 默认超时 - #2615
Merged
Merged
Conversation
timeout 变体一轮要跑 -lc、-ic 两次探测、每次 2s 预算,实际墙钟约 4s(master 上 2×100ms 约 240ms)。CI 两条腿都显式传了超时(bun leg 180s、vitest 60s),但本地定向跑用的裸 bun test <file> 走 Bun 默认 5000ms:1 核 + 20 满转负载下 8 轮有 4 轮在 4.5-5.1s 被整体判超时 (复审 P3,pi 与我各自独立复现,形状逐字相同)。 给该 it.each 加第三参数 30_000,只抬 runner 天花板,不动任何断言: - 同负载 8 轮 8/8 绿(文件墙钟 21-24s); - 删掉 registry.ts finish() 的进程组 SIGKILL 后两变体仍在 toEqual([]) 咬红,超时语义与进程组回收守卫没有被这个参数放松。 }, 30_000) 是本仓既有写法(ask-cli / api-only-transport-boundary 等)。 Co-Authored-By: Claude Code <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 30, 2026 13:28
This was referenced Oct 30, 2026
This was referenced Oct 30, 2026
|
@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。 这次运行覆盖 3400614…0946357b3(9 个提交),同批合入的还有 #2542 #2611 #2600 #2578 #2590 #2612 #2594 #2548,失败不一定由本 PR 引起。
|
|
🚀 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.
背景
#2596 已合入(squash
c7d1151ea)。双审中 pi 提出一个不阻塞的 P3:该 PR 把resolveCommandAsync的探测预算从 100ms 放大到 2s 后,timeout 变体一轮要跑-lc、-ic两次探测,合法墙钟约 2 × 2s ≈ 4s(master 旧版约 2 × 100ms ≈ 240ms)。CI 两条测试腿都显式传了单测超时(scripts/run-bun-tests.mjs给--timeout=180000,vitest 默认/配置 60s),所以门禁不受影响;但本地定向跑用的裸bun test test/resolve-command-shell-parse.test.ts走 Bun 默认 5000ms 单测超时,在高负载机器上会把一条 ~4.5–5.1s 的正常路径误判为超时。改动(纯测试,单文件)
给这条
it.each的第三参数 per-test timeout 从 Bun 默认 5000ms 抬到30_000,只抬 runner 的执行墙钟天花板,不动任何断言与产品代码:}, 30_000)是本仓既有写法(test/ask-cli.test.ts、test/api-only-transport-boundary.test.ts等多处)。验证
isolate-run --cpus 1+ 20 个满转 burner,裸bun test8 轮,4 轮报this test timed out after 5000ms、4 轮通过。22d1c8d0b)。src/adapters/cli/registry.ts里finish()的进程组 SIGKILL,两个变体仍在expect(running).toEqual([])(261 行)咬红——说明 30s 参数没有放松进程组回收与超时语义的守卫,只是避免 runner 切掉正常路径。影响面
仅
test/resolve-command-shell-parse.test.ts(+7/-1),src 零改动,无 breakchange。🤖 Generated with Claude Code