Repository navigation
[PR] feat: default autoRestartOnUpdate on for host-spawned lane proxies - #2597
ranxianglei wants to merge 6 commits into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2806-pr.2597.02b656bThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2597.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 PR #2597 审查完成(结构化八问): ① 是什么问题:常驻宿主(dsh/opencode/pi/omp/kimi/zcode/claude 及各 ② 什么原因导致的:根因是默认值,不是缺机制。 ③ 影响范围与严重程度:变更前所有宿主拉起的 lane 代理更新后都不激活,需人工重启;属功能失效(自动更新实际止步于「装盘」),无数据丢失/安全风险。手动 ④ 怎么修复的:默认值改为 lane-aware——新增 ⑤ 是否有回归问题:逐项审过既有行为——优先级语义不变(env>file>default);手动启动默认仍 OFF;重启机制本体未动;空白 lane 值→OFF(nonEmpty trim);env ⑥ 是否破坏缓存:不涉及——未触碰 session/prefix-cache/重试/游标逻辑。 ⑦ 是否改了设计方向:无架构转向;仅既有 knob 的条件默认值变化(PR 描述已按规范披露旧值→新值+原因),方案 A 是 #2507 里 owner 预先拍板的。 ⑧ 是否引入了新的配置:无新字段/env/flag;复用既有 本地验证:typecheck clean;定向四套件 47/47(issue2507-lane-autorestart-default + auto-restart + fix-config-session + opencode-acp-command);全量回归交给 CI。当前 CI:已完成的全部 job 绿(含全部 real-client e2e lane、kernel-guard、pi-subagents-guard、lane-guard、build-artifact、docs-sync、docs-coverage),test 矩阵与 registry e2e 仍在跑。 判定:审查发现的两处问题均已修复推送,待剩余 CI job 转绿即可合并。按 §7.4 默认值变更保持 human-gated —— 请 @ranxianglei CI 全绿后手动合并。 |
[bot] 🏷 跟进(分支新增内容审查完毕,CI 全绿): 并行会话向本 PR 分支追加了一个 commit:
发现并已修一处缺口(独立标注 commit 最终状态(head 判定:审查发现的问题全部修复且经 CI 验证,无回归项。可合并——按 §7.4 默认值变更保持 human-gated,请 @ranxianglei 手动合并 #2597 。 |
|
(ai: zhipuai-lb/glm-5.3) 陈旧票清理(第三批动作①):目标 issue #2507 已关。为避免重复劳动关闭本 PR;如判断有误请直接 reopen 并留言。 |
Closes #2507
What
Host-spawned resident proxies — every dsh/opencode/pi/omp/kimi/zcode/claude plugin lane and
bili <client>launcher lane — now self-restart by default once an auto-update lands on disk. Manualbili startkeeps the old opt-in default.Why
Resident hosts never restart, so on-disk updates never activated: the proxy kept running the old code indefinitely (the only trace was a warn-once log line). The safety-gated self-restart machinery already existed (#811, #414 group-kill, #1724 pre-spawn flush, #2095 win32 spawn) but was OFF by default everywhere — a dead end for resident lanes.
Behavior change (disclosure)
autoRestartOnUpdatedefault OFF everywhere when env and file are both unset.BILI_LAUNCHER_LANEis set (every lane-spawned proxy child), OFF for manualbili start."autoRestartOnUpdate": false/ACP_AUTO_RESTART_ON_UPDATE=0disables anywhere;true/=1enables anywhere including manual start.dist/agent/*.jsloaded into the host process memory) still needs a host restart; the kernel is bundled inline into the proxy bundle, so re-exec covers all compression/kernel code.config surface
autoRestartOnUpdateknob when nothing is set explicitly.BILI_LAUNCHER_LANE, which every lane spawn already stamps (src/launcher.ts:4078) — no new signal needed."autoRestartOnUpdate": falsein config orACP_AUTO_RESTART_ON_UPDATE=0.How
resolveAutoRestartOnUpdate(env, fileValue)in src/config.ts: explicit env > explicit file value > lane-aware default. Wired intoloadOptions, the single resolution point used by both the update watcher and the advisory watcher.tests/issue2507-lane-autorestart-default.test.ts: resolution matrix (lane/manual × env/file interactions), end-to-end throughloadOptions, and config-file authority including garbage-value fallthrough to the lane default.sys.stale_manual(zh+en), CLI help line — all pointed at the CLI flag as the only way to enable; now reference the config key.Verification
fetchStaleNotice(master's commit-suffix interpolation from fix(#2490): plan output budgets against the refused dsh raw ledger; fail fast doomed evidence probes #2577 + this PR's wording) resolved as union of intent.npm run typecheckclean; targeted suites green on the rebased head: issue2507-lane-autorestart-default + auto-restart + fix-config-session = 37/37, opencode-acp-command = 10/10; ccr-plugin + issue1815 + issue1733 = 22/22 verified pre-rebase. Full suite left to CI.tests/e2e/e2e-lane-autorestart.test.ts, gate ACP_TEST_REGISTRY=1, shares the test: 自带本地 npm registry 的 hermetic 测试基建——解锁自更新/钉版本/解析全链路 e2e #1153 fixture infra): real dist build against local verdaccio — lane proxy (BILI_LAUNCHER_LANE=dsh) defaults ON, update lands on disk and the process self-restarts onto the same port serving the new version with no stale state; manual start defaults OFF, update lands but the process keeps serving the old code (stale=true). Both scenarios green locally.npm run buildOK (dist-import-annotations OK).Human merge required (§7.4: default-value change stays human-gated).