Repository navigation
test(worker): adopt Pi 忙碌用例改由测试推进阶段,不再依赖 worker 启动快慢 - #2287
Merged
Merged
Conversation
假 pi 的 4.5s 忙碌窗口原本从 tmux 窗格创建时开始计时;CI 负载下 worker 启动超过 4.5s 时,接上前画面已切到空闲屏、此后再无输出,空闲检测没有边沿, prompt_ready 永远不来,用例 15s 超时。 改为文件信号推进:worker 打出 observing 后才在底行画 Working...(作为窗格 输出到达,空闲检测真正在忙碌画面上触发),等到 adopt-idle 推迟日志、再保持 一个以上轮询间隔断言无 prompt_ready,然后切屏等 prompt_ready。原用例在正常 时序下也没走到守卫(Working... 在启动时打印且在第 1 行),删掉守卫等三处 变异仍全绿;新用例三处全红。 Closes #2285 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 24, 2026 16:58
Owner
Author
合入回执
未尽 follow-up(复审的非阻塞观察,本 PR 不改)
下一步把 master 普通 merge 进 #2177,新 head 请复审、CI 首跑全绿,Feishu live 连续全绿从 0 计。 |
deepcoldy
pushed a commit
that referenced
this pull request
Oct 24, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🚀 Released in v3.51.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/worker-argv-reaction-status.integration.test.ts里的一条用例:keeps an adopted Pi pane working until its viewport loses Working...。生产代码零改动。Adopt mode (tmux): observing之后,才在底行画Working...;adopt-idle: authoritative viewport still shows busy marker; deferring prompt ready,再保持 4.5s(超过一个 3.5s 轮询间隔),断言期间没有prompt_ready;prompt_ready。Closes #2285
为什么
CI run 40105658989 中,worker 用了约 5s 才启动,而假 pi 的 4.5s 忙碌窗口从窗格创建时就开始倒计时。worker 接上时画面已经是空闲屏,此后再没有输出,adopt 空闲检测没有边沿,
prompt_ready永远不来,于是 15s 超时。完整时间线见 #2285。原用例在正常时序下也没守住它名字里的行为:
Working...是窗格启动时打印的,worker 接上后窗格静默,空闲检测不会在忙碌阶段触发;而且它画在第 1 行,busyProbeRegion只看视口尾部。真实 Pi 把忙碌行画在编辑框上边框,也就是屏幕底部。影响面
src/,不影响任何 CLI、后端或会话类型的运行时行为。waitForLog这样等 worker 日志,这里沿用同一写法。验证
本机运行均设
TMUX_TMPDIR=<私有目录>并unset TMUX:测试和 worker 用的都是私有 tmux server,不碰机器上已有的 tmux server;测试只kill-session自己建的会话。bun test× 3(bun 1.4.4)bun run build(含 tsc)、test/test-hygiene.test.ts变异(新用例 / master 上的原用例):
deferPromptReadyWhileBusyprobeBusyPatternIdle不再因忙碌标记返回 falsebusyProbeRegion返回空串新用例的 worker 日志顺序(本机一次):observing → +2.0s 空闲触发 → 推迟(视口仍有忙碌标记)→ 切屏后 +2s 才出现
prompt_ready。🤖 Generated with Claude Code