Repository navigation
fix(planner): retry once on a fresh run port after a cold boot timeout - #669
Merged
Merged
Conversation
UAT 实测(2026-10-14/15,#33424 根因延续):闲置后首个回合的 dsh 子进程 冷启动 6.5–8s,稳定击穿 5s 本地 boot 预算,PLANNER_BOOT_TIMEOUT 直接怼给 用户。失败的启动恰好预热了下一个端口要读的 OS 页缓存——镜像既有 soft-stall 重试的形态,预算允许时换新端口重试一次;boot 未触达 provider 请求,不占用 attempt。外层 catch 同步把端口 initialize 阶段的原始 HARNESS_BOOT_TIMEOUT 拒绝归类为 typed boot 超时,不再裸抛。 Refs #660 Tested: tsx scripts/booking-copilot-dsh-planner-proof-tests.ts 全绿(新增冷启动重试证明:首端口 boot 拒绝→新端口产出 search.run operation 决策,失败端口关闭);tsc --noEmit 对改动文件零错(仓内既有基线噪音未变)
Danceiny
added a commit
that referenced
this pull request
Oct 15, 2026
#669) UAT 实测(2026-10-14/15,#33424 根因延续):闲置后首个回合的 dsh 子进程 冷启动 6.5–8s,稳定击穿 5s 本地 boot 预算,PLANNER_BOOT_TIMEOUT 直接怼给 用户。失败的启动恰好预热了下一个端口要读的 OS 页缓存——镜像既有 soft-stall 重试的形态,预算允许时换新端口重试一次;boot 未触达 provider 请求,不占用 attempt。外层 catch 同步把端口 initialize 阶段的原始 HARNESS_BOOT_TIMEOUT 拒绝归类为 typed boot 超时,不再裸抛。 Refs #660 Tested: tsx scripts/booking-copilot-dsh-planner-proof-tests.ts 全绿(新增冷启动重试证明:首端口 boot 拒绝→新端口产出 search.run operation 决策,失败端口关闭);tsc --noEmit 对改动文件零错(仓内既有基线噪音未变) Co-authored-by: huangzhen.0505 <huangzhen.0505@bytedance.com>
Danceiny
added a commit
that referenced
this pull request
Oct 27, 2026
…676) #669's fresh-port retries ask the task factory for a new port after retiring the current one. A factory that returns one shared instance handed back the closed port, so next() rejected untyped with booking_planner_run_port_closed. main's full regression had failed on this since 6599423 (Node 22 and 24). - Both retry branches refuse a port the planner already retired and settle typed, exactly as when the deadline cannot fund a retry. Factories that return a new port behave as before. - The readiness proof asserts the refused retry and adds a real-subprocess case for the retry itself; the planner proof adds one case per retry branch. - Carries the #672 strict-typecheck fix for the gateway-chat adapter proof (the same change as #675's 3acb2a0) so CI reaches the full regression. Fixes #672 Refs #660
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.
问题(UAT 实测,#660)
闲置后首个回合的 dsh 子进程冷启动 6.5–8s(冷 OS 页缓存),稳定超过 5s 本地 boot 预算 →
PLANNER_BOOT_TIMEOUT直接作为回合错误怼给用户(#33424 三连击;2026-10-15 用户仍可复现 7333ms 一例)。修复
HARNESS_BOOT_TIMEOUT:剩余回合预算 ≥ PLANNER_MIN_VIABLE_RUN_MS 时,retire 失败端口 → 换新端口重试一次(失败的启动预热了下一端口要读的页缓存);boot 未触达 provider 请求,不占 attempt。镜像既有 soft-stall 重试的同一形态。HARNESS_BOOT_TIMEOUT拒绝归类为 typed boot 超时(此前会裸抛)。Tested
tsx scripts/booking-copilot-dsh-planner-proof-tests.ts全绿,含新增证明:首端口 boot 拒绝 → 新端口产出 search.run operation 决策、失败端口被关闭、不超时。tsc --noEmit改动文件零错。Refs #660