Repository navigation
[PR] feat: bili start --lane <name> — declare which client lane a manual instance serves - #4422
ranxianglei wants to merge 3 commits into
Conversation
6a8efe7 to
a0cb0d8
Compare
Review fix on #4422: the PR hand-edited the generated param-ref table rows in CONFIGURATION.md/.zh-CN.md without updating the website/config-reference seed, so the CI docs-sync drift guard (regenerate + git diff --exit-code) would fail on this head. The row text also used backticks, which the seed validator forbids. Updated the seed desc and re-ran node tools/gen-config-docs.mjs generate; the regenerated rows differ from the hand edits only by the dropped backticks.
a0cb0d8 to
5433967
Compare
…x matches (#4368) Review fix on #4422: the PR hand-edited the generated param-ref table rows in CONFIGURATION.md/.zh-CN.md without updating the website/config-reference seed, so the CI docs-sync drift guard (regenerate + git diff --exit-code) would fail on this head. The row text also used backticks, which the seed validator forbids. This commit updates the seed desc and ships the generator's output verbatim.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9710-pr.4422.2461218This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4422.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] (ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 按关键词/失败签名检索 open+closed issue 与近期 PR( 标签判定:zcode / scope/wiring / p2(功能实现而非缺陷修复,不打 bug;证据车道为 ZCode(#4006 实测);attach 管道属协议接线域;有功能缺口但常规启动流不受影响、会话始终可用 → p2)。注:router 故障窗口内镜像 labels API 不可用(shim 未实现该端点),标签未落库,判定在此留档。 Review 结论(独立复审,未沿用 issue 侧分析)八问:
Review 中发现并已修(分支上追加 2 个 commit,head 现为 5433967)
验证(本地定向,全量裁决以远程 CI 为准)
判定:代码与方向正确,测试覆盖到位,上述两处问题已修入分支。CI 正在 head 5433967 上跑(PR mergeable=true,blocked=等 checks);全绿即可合,合并留给 owner。CI 出结果我再跟一条。 |
(ai: vllm-qwen/qwen3.8-27b) 冲突已解除,PR 恢复可合并状态( 经过:本 lane 开始解冲突时,并行 lane 已把分支 rebase 到 master( 冲突本身:master 在这 250 个提交里重构了 验证(rebased head
八问:
判定:冲突闭环,等 CI 全绿后由 owner 合并即可。 |
[bot] (ai: vllm-qwen/qwen3.8-27b) CI 结果(head 5433967,55/55 checks 完成):
最终判定:本 PR 自身零回归、门禁全过,唯一红项为继承的 master 存储红(非本 PR 引入、非本 PR 可修)。待 #4490 家族修复落地(或该两个测试转绿)后即可合并;若 owner 认可「继承红不阻塞」的处置方式,现在也可直接合——合并留给 owner。 |
(ai: vllm-qwen/qwen3.8-27b) 查重: 失败签名与既有条目 #4490 / #4498 / #4492(master 自 f013414/#4390 起的红)一致,WAL 侧修复 PR #4502 已在途 —— 不新开 issue。 标签: scope/wiring、p3(本条目是 launcher/CLI 特性 PR;CI 红为继承的 master 红,严重度按 #4490 家族既有定级,本 PR 自身无用户面缺陷) 判定:CI 红全部是 master 的既有红,本分支无可修内容 —— 按自动修复通道规则(1/2)停手,留判定。独立复核(未沿用此前结论,逐失败 job 拉日志提取):
八问
判定收工:停手 —— 失败需要的是 #4490 家族的机制层修复(设计层、已有在途 PR),不是本分支的小修。建议:#4502 及 media CAS 侧落 master 后 rerun 本 PR checks;ubuntu 24 s1 的中途死亡为偶发,rerun 时观察即可。 |
…x matches (#4368) Review fix on #4422: the PR hand-edited the generated param-ref table rows in CONFIGURATION.md/.zh-CN.md without updating the website/config-reference seed, so the CI docs-sync drift guard (regenerate + git diff --exit-code) would fail on this head. The row text also used backticks, which the seed validator forbids. This commit updates the seed desc and ships the generator's output verbatim.
The feature commit's docs edits landed on root-level stub files after master moved them to docs/ (#5920). Re-target the BILI_LAUNCHER_LANE and attach-gate content to the new docs/ location.
3407d40 to
06f97b2
Compare
(ai: qwen/qwen3.8-27b) Conflict rebase complete — PR #4422Rebased the PR branch onto current master (e1f31ad) and force-pushed. The PR was 2016 commits behind master; the 3 ci-fixes merge commits on the branch were dropped as noise (master already carries that content). The 2 feature commits were cherry-picked onto master. Commits on the branch now (3):
Conflicts resolved
Docs re-targeting (post #5920)The feature commit's docs edits landed on root-level stub files after master moved them to
Verification
八问
判定:冲突已全部解决,分支已 force-push 到 |
Closes #4368
What
bili starthad no way to declare which client lane a manually started instance serves — the only channel wasBILI_LAUNCHER_LANE, documented as an internal launcher variable ("Only the launcher sets it — no user configuration"). Without it, manual instances silently land in the worst attach class (foreignLanes.length + 1) → duplicate proxies / attach misrouting (measured in #4006: same codeFingerprint, withBILI_LAUNCHER_LANE=zcodethe hook attaches at class 0, without it ZCode spawns its own).Changes
bili start --lane <name>(src/cli.ts) — setsBILI_LAUNCHER_LANEfor the server process. Valid names = everybili <client>name +zcode(KNOWN_LANES,src/launcher.ts); unknown names are rejected at startup (exit 2) — a typo'd lane would be recorded in the instance file and silently match no hook, re-creating exactly the silent misroute this flag removes. Only valid withstart; client launches take their lane from the client itself.isUserZoneInstance,src/launcher.ts) — user-zone is now defined bylaunchToken === undefined(manual := the user typed the command), not by the absence of a lane. A manual daemon declaring ITS OWN lane is attached by that lane's hook even with an unarmed watchdog (it is that lane's designated target); spawned orphans (token present) keep the full claude-native hooks must not attach to a lifecycle-less proxy — attach gate + self-managed fallback #1335 gate. This follows directly from the [Design] 定死端口 lane(claude 48787 / zcode 48789)端口被占时的 0 配置解法 #1660 exemption rationale ("the user maintains it — they typed the command; no session lifecycle BY DESIGN, not by drift") — [Bug] attach gate: 手动 bili start 的 user-zone daemon 无视 BILI_NATIVE_ATTACH_EXTERNAL=0(文档称连 user-zone 一起关);并请求按 lane 控制 attach #2877 only removed the lane-less fallback; an explicit own-lane declaration is a primary target, not a fallback. On attach, watcher registration is refused and the host surfaces the existing [bug] claude native proxy outlives all sessions despite README lifecycle contract — watcher-based shutdown did not fire #1322 warning (this proxy has no session lifecycle).src/server.ts) — announces the declared lane on token-less daemons so an operator debugging "why doesn't my client attach" sees the declared identity.config surface
bili start --lane <NAME>. It maps to the EXISTING env varBILI_LAUNCHER_LANE— no new env var, no new config-file key.bili <client>names +zcode; anything else → startup error listing known lanes.--lanewins over a stale exportedBILI_LAUNCHER_LANE). This deliberately deviates from the issue's proposedenv > flag: bili convention is CLI flags override env (README), and an explicit invocation should not be overridable by a stale exported variable. The env var remains as the escape hatch for scripts that cannot pass flags.BILI_LAUNCHER_LANEwas documented internal-only, and the launcher strips it from inherited child env ([launcher] Inherited launcher channels can poison the next spawn with model-windows-mismatch #3521 stale-inheritance guard) — there was no user-facing way to declare lane identity for a manual instance.Behavior changes (old → new)
isUserZoneInstancerequired BOTH no lane AND no launch token)bili startCLI surface--lane <name>(validated against KNOWN_LANES)Unchanged: spawned (token'd) instances keep the full gate; lane-less manual daemons keep wildcard behavior; code-fingerprint / config-shape compatibility still runs first (a rebuilt install never rides a stale daemon even through the exemption); no wire, cache, or persistence-format change (the instance-file
lanefield already existed — it just becomes settable on manual starts too).Tests
tests/cli-parseargs.test.ts: 7 new cases — parse,--lane=equals form, missing value → exit 2, empty value → exit 2, unknown name → exit 2, non-start commands with--lane→ exit 2.tests/launcher.test.ts: 3 new gate tests — POSITIVE: lane-tagged manual (token-less) unarmed candidate attaches by same-lane hook withrefusedWatcher=true(the [bug] claude native proxy outlives all sessions despite README lifecycle contract — watcher-based shutdown did not fire #1322 warning path exercised); NEGATIVE: token'd orphan with missing watchdog field still refused (spawned orphans keep the gate); NEGATIVE cross-lane: a different-lane hook does not ride a lane-tagged manual daemon.launchTokenso it keeps modeling the real threat (an orphaned spawned child). No assertion weakened.