Repository navigation
fix: route the #1753 squatter wait diagnostic through the host-safe channel - #3585
Conversation
…hannel (#3575) The self-recovering 'foreign proxy squats the preferred port' notice was the one #1753 path still on raw console.error: in native lanes (pi native TUI) stderr IS the screen, so the message painted into the input area even though the launch always recovered. Route it through attachDiag like every other launcher diagnostic — durable log file by default, one controlled stderr copy only under explicit debug. Message text, once-per-bring-up latch, PID verification, launchToken handshake, timeout and cleanup are all unchanged.
Three regression cases around the foreign-pid-squats-preferred-port scenario (record gated to the second spawn-wait read so the branch provably fires): non-debug leaves the terminal byte-silent with the diagnostic exactly once in bili.log including both pids; an injected attachDiag receives it verbatim with the default sink untouched; explicit debug keeps exactly one controlled '[info]' stderr copy.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4233-pr.3585.6439670This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3585.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 本 PR 关闭 #3575(#1753 squatter 等待诊断分支)。与 #3404 / PR #3415(attach banner 分支)同属「launcher 诊断走 host-safe 通道」家族,但机制分支不同、互不重叠:#3415 覆盖正常 attach / 等待并发启动 / 后期发现三类 banner,本 PR 只动 squatter 通告这一个调用点;两 PR 触碰的是 launcher.ts 内不同行,合并顺序无依赖。已核对全部 50 个在途 PR,无其他 PR 触碰该调用点。 进入审核:方向关(独立复核 #3575 的代码路径与证据)、diff 审查、既有行为回归清点、测试有效性(本地定向跑 + 反向验证新测试在未修复代码上确实失败)、CI 状态。结构化八问结论随后补上。 |
(ai: vllm-qwen/qwen3.8-27b) 审核结论(独立复核,非转述 issue) ① 方向关:独立复核成立。在 PR merge-base ② 回归清点(触碰路径的既有行为逐项判定):
③ 代码审查:单调用点替换, ④ 测试有效性:三条新测试有牙——本地做了反向验证:只把 ⑤ diff 整洁度:2 文件 +142/-1,每一行都服务本 PR 目的,无跑题文件、无空白重排、无生成物/锁文件波动。干净。 陈旧度与 CI:head 落后 master 31 个提交,已核对这 31 个提交无一触碰 结构化八问
合并判定:可合 —— 等最后一个 node-24 CI 分片转绿即可(当前 5/6 分片绿 + 静态门禁全绿;本地定向验证与反向验证均绿)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.562-master.08e4829 # this exact build
npm install -g billion-context@master # always the newest merged build
|
What
Closes #3575.
When a foreign proxy squats the preferred port and our laddered child has not published its instance record yet, the launcher waits — and announces that wait once. That announcement was still a raw
console.error, the one remaining stderr path of the #1753 fix family: in native lanes (Pi native TUI, bili 0.1.198) stderr IS the screen, so the message painted into the input area even though every step of the sequence was self-recovering and the launch always succeeded.The fix is one call site: route the message through
attachDiag(bound at the top ofensureProxyRunning), exactly like every other launcher diagnostic since #3200. Default sink = durable log file (bili.log) only; explicitdebug: trueadds one controlled[info]stderr copy for CLI contexts. Host lanes hard-codedebug: falseand stay silent.Behavior change (flagged)
debug: true.Regression checks (per the issue)
All three new tests fail on the unfixed code (verified by stash-revert) and pass with the fix; full
tests/launcher.test.tsgreen locally (316 pass / 1 pre-existing skip); typecheck clean. Full-suite verdict comes from CI on this head.Scope guardrails honored
Only the one branch changed. No global console muting, no
console.error→console.logswap, no otherconsole.errorinensureProxyRunningtouched. PID identity verification, launchToken handshake, port selection, timeout budget, cleanup, and error propagation are all untouched. Message text byte-identical (grep continuity preserved).Config surface
None. No new env var / config field / CLI flag.