Repository navigation
test(worker): Pi argv 首轮 re-arm 用例先单独等 worker 启动,行为窗口从 CLI 拉起起算 - #2513
Merged
Merged
Conversation
这条用例发 init 后直接用一个 10 秒窗口等 re-arm 日志,窗口要同时装下 worker 启动(tsx 转译 worker.ts、init、拉起 CLI)、2 秒静默和闸门判断;bun-test 腿冷 启动约 9 秒,窗口恰在静默触发时关上(#2511)。改为与同文件其它用例一致:先等 「Codex bridge fresh-empty」(独立的启动预算),再给被测行为 10 秒;行为真坏时 仍在拉起后 10 秒内失败。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 29, 2026 09:10
This was referenced Oct 29, 2026
This was referenced Oct 29, 2026
deepcoldy
pushed a commit
to uestcwangci/botmux
that referenced
this pull request
Oct 29, 2026
…ity-recovery-2473-final 在作者最新 head 36930a4 上同步 master 至 0345cc5(其 merge base 651a7d3 之后的 4 个提交:deepcoldy#2526/deepcoldy#2513/deepcoldy#2523/deepcoldy#2525)。唯一冲突在 worker-argv-reaction-status 首轮 re-arm 用例的启动等待段:作者已在 deepcoldy#2513 合入前用信号驱动 fixture(paint-phase 文件按观测阶段推进,消除 固定 6s 墙钟,即复审建议的根治方向)重写了该用例,merge 已把 fake 定义取为信号驱动版,故等待段配套取作者版(等 projected-working 采样器 再写 startup 信号);deepcoldy#2513 配 setTimeout fake 的 fresh-empty 等待与 信号 fake 不兼容、不采用,其启动保证被作者版更强的等待覆盖。 codex-app-runner.integration 自动合并,PR 容量用例与 deepcoldy#2523/deepcoldy#2526 改动并存。Pi 用例双引擎 + 2 核 isolate 重载 3 次绿、全文件 16/16; codex 集成/容量/engine/deployment 共 210 项 vitest 绿。 Co-Authored-By: Claude Code <[email protected]>
deepcoldy
pushed a commit
to uestcwangci/botmux
that referenced
this pull request
Oct 30, 2026
merge 作者信号驱动版 Pi 夹具时,把该用例(re-arms a startup-window false idle)原本由 deepcoldy#2513 单独给的 boot 等待预算丢成了 waitForLog 默认 10s。信号 fake 的锚点(projected working,约 3.0–3.7s)比 deepcoldy#2513 的 fresh-empty 锚点(约 1.1s)晚约 2s,净余量反而更薄;2 核重载实测 boot 涨到 4.9–5.1s、800ms 预算探针即超时,是无保护余量的等待。仅这一处 (deepcoldy#2513 当时也只给这一个用例传参)补 WORKER_BOOT_TIMEOUT_MS,另外两处 projected-working 等待在 master 本就走默认预算,不改动。零生产影响。 Co-Authored-By: Claude Code <[email protected]>
|
🚀 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.
Closes #2511。
现象
PR #2473 head
3ad0ef807首跑 run 40822680867 / bun-test:test/worker-argv-reaction-status.integration.test.ts「re-arms a startup-window false idle until the argv-baked Pi first turn visibly starts」10s 超时,timed out waiting for log "Argv-baked first prompt has not visibly started"。worker 日志停在「Argv-baked first prompt in flight — publishing projected working」,正常情况下 re-arm 日志紧随其后(本机约 75ms)。根因:固定预算下的饥饿,不是行为变化
src/worker.ts只加了 5 行,在 Codex App 结算处。node --import tsx src/worker.ts、init、拉起 CLI)、2s 静默和闸门判断。bun-test 腿每个文件独立 TMPDIR,tsx 缓存是冷的;CI 这次启动约 8–9s,「in flight」出现时窗口正好关上。isolate-run,2 核 + 8 个空转进程,4 并发 × 3 轮):re-arm 日志在 init 后 13.3–14.3s 出现,其中 spawn → re-arm 只有 2.0–2.7s,其余都是 worker 启动。修法(纯测试)
WORKER_BOOT_TIMEOUT_MS = 20_000,注释写明 worker 启动是宿主的时间、不是被测行为。30_000改为WORKER_BOOT_TIMEOUT_MS + 30_000。行为真的坏了仍会很快暴露:实测把期望日志改成不存在的字符串,11.2s 失败(启动约 1.2s + 10s 行为窗口),不会等满启动预算。
影响面
只改这一个测试文件的这一条用例和一个常量,
src/零改动。同文件其它用例的第一个等待只覆盖 worker 启动,上面的极端负载下启动最长约 11s,也有被拖过的可能,目前没观测到失败,记在 #2511 备查,本 PR 不动。验证
isolate-run,2 核 + 8 个空转进程,4 并发 × 3 轮):修复前 12/12 失败,报错与 CI 相同;修复后 12/12 通过。test-hygiene42 例全绿;bun test --timeout=180000跑本文件 16 例全绿。🤖 Generated with Claude Code