Repository navigation
test(pi): 假 Pi 在本轮结束后清掉忙碌标记,失败终态用例不再依赖屏幕检查先于输出 - #2132
Merged
Merged
Conversation
worker-pi-turn-failure.integration 的假 Pi 一启动就打印 Working...,且永不清除。 Pi 是纯静默判定的适配器:屏幕上有忙碌标记就推迟「prompt 就绪」,本轮结算随之 等待。用例只在 worker 恰好先于这行输出检查屏幕时才通过;CI 负载下时序反过来, transcript 里已经写好的失败终态一直等不到结算,15 秒后超时(扫描到 4 次, vitest 与 bun-test 都有)。真实 Pi 在一轮结束后会重绘、清掉忙碌行。 改为:假 Pi 看到 transcript 里出现本轮结束的 turn-boundary 记录后清屏,与真实 Pi 一致。只改测试。 Refs #2079 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 22, 2026 00:38
Owner
Author
|
已合并 PR #2132 → 7f1fa34(squash),#2133 随之关闭 门禁:首审与 Pure(pi) 复审都在 head 0100746 上给出可合(0 P1 / 0 P2 / 0 P3;按复审要求合前同步了 master)/ 必需 CI(build、test)与 bun-test、bun-binary* 共 13 项首跑全绿 / 老用户无 breakchange:只改测试夹具 / 落地树与审过的 head 树一致 follow-up:复审指出,单核 7–10 路这类极端超订下,worker 进程可能在启动中途停顿超过 15s,连第一个 waitUntil 都会超时;这是「真子进程 + 固定墙钟等待」类用例的共性,CI 实际负载下未出现,留在 #2079 统一跟踪。 未做:发版、部署(需另行指令) |
This was referenced Oct 22, 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/worker-pi-turn-failure.integration.test.ts的假 Pi:它仍然一启动就打印忙碌行Working...,但会轮询 transcript,看到本轮结束的 turn-boundary 记录(lastStopReason不为 null)后清屏、显示输入提示,和真实 Pi 一轮结束后重绘的行为一致。生产代码不动。为什么(根因:测试夹具)
这条偶发在 #2126 的 bun-test 首跑上挡了合码(run 39696703486,job 119555717938,
waitUntil在第 92 行超时)。它不在 #2079 列出的四条里,但同属「CI 负载下的时序依赖」一类。扫描近两天 CI:4 次,vitest 分片和 bun-test 都有,首见于 #2075 引入这条用例之后。src/adapters/cli/pi.ts的 Idle detection 注释):屏幕上有忙碌行时,worker 推迟「prompt 就绪」(日志Pi external-idle: authoritative viewport still shows busy marker; deferring prompt ready),本轮的结算随之等待。Working...后永不清除。用例只在 worker 恰好先于这行输出检查屏幕时通过(通过时的日志顺序是Prompt detected (idle)→Released active turn authority … (turn_terminal)→ 之后才Explicit busy marker detected)。CI 负载下顺序反过来,transcript 里写好的失败终态一直等不到结算,15 秒后超时。影响面
只涉及这一个测试文件。用例断言不变(失败提示带
pi_credential_unavailable专用文案、failed终态在提示之后)。验证
Fixes #2133
Refs #2079
🤖 Generated with Claude Code