Repository navigation
test(dashboard-ipc): 真实 hook 用例的截止时间与用例预算对齐 - #2102
Merged
Merged
Conversation
两条 native-subagent-runtime 真实 hook 用例从 TypeScript 源码冷启动整个 src/cli.ts,却只给了 6 秒内层截止时间。CI 上一次通过的运行里,第一条冷启动就用了 5.8 秒,几乎没有余量,runner 稍有负载就超时(#2059、#2065、#2072、#2075 上都在 6.03–6.07 秒失败)。 - 两条用例改用同一个等待函数:内层截止时间取用例预算减 5 秒(25 秒 / 30 秒),不再是拍脑袋的短值。 - 超时报错带上子进程 stderr,便于区分「冷启动慢」与「hook 卡住」。 - 断言不变。 Closes #2080 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 21, 2026 07:33
评审建议:用例预算从「截止时间 + 5 秒」改为「截止时间 + 15 秒」。其中一条用例在启动子进程前要先打 64 次 IPC 请求填满 proof 配额,负载下 setup 变慢时,应让带 stderr 的 hook 截止报错先触发,而不是被 vitest 的泛化用例超时抢先。截止时间仍为 25 秒。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
added a commit
to yangkaiyu-web/botmux
that referenced
this pull request
Oct 21, 2026
This was referenced Oct 21, 2026
|
🚀 Released in v3.49.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.
改了什么
test/dashboard-ipc.test.ts里有两条 native-subagent-runtime 真实 hook 用例,会从 TypeScript 源码冷启动整个src/cli.ts,但只给了 6 秒的内层截止时间(超时就 SIGKILL 子进程并报hook timed out),而用例本身的预算是 15 秒。CI 上一次通过的 master 运行里,第一条用例冷启动就用了 5765ms(同文件的第二条用上了转译缓存,只要 1866ms),离 6 秒只剩 0.2 秒。runner 稍有负载就会超时:#2059、#2065、#2072、#2075 的 CI 都失败在 6.03–6.07 秒。
Closes #2080
影响面
只改一个测试文件,不影响任何运行行为。
测试验证
npx vitest run --project unit test/dashboard-ipc.test.ts:341 条用例,339 通过、2 跳过(跳过的是原本就要手动开启的浏览器用例)。hook did not exit within 1ms; stderr: …,确认超时路径和报错内容符合预期;测完已改回。🤖 Generated with Claude Code