Skip to content

[PR] feat: bili start --lane <name> — declare which client lane a manual instance serves - #4422

Open
ranxianglei wants to merge 3 commits into
masterfrom
2026-10-23_start-lane-flag
Open

ranxianglei wants to merge 3 commits into
masterfrom
2026-10-23_start-lane-flag

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #4368

What

bili start had no way to declare which client lane a manually started instance serves — the only channel was BILI_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, with BILI_LAUNCHER_LANE=zcode the hook attaches at class 0, without it ZCode spawns its own).

Changes

  1. New CLI flag bili start --lane <name> (src/cli.ts) — sets BILI_LAUNCHER_LANE for the server process. Valid names = every bili <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 with start; client launches take their lane from the client itself.
  2. Gate exemption extended to lane-tagged manual daemons (isUserZoneInstance, src/launcher.ts) — user-zone is now defined by launchToken === 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).
  3. Boot log line (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.
  4. Docs — README flags list; CONFIGURATION.md / .zh-CN.md (table row + full entry; the zh full entry was missing entirely before — fixed in passing); TECHNICAL-NOTES(.zh-CN).md attach-gate section (4 mirrors each); LIFECYCLE.md env table.

config surface

  • New CLI flag: bili start --lane <NAME>. It maps to the EXISTING env var BILI_LAUNCHER_LANE — no new env var, no new config-file key.
  • Valid values: all bili <client> names + zcode; anything else → startup error listing known lanes.
  • Precedence: flag > env (an explicit --lane wins over a stale exported BILI_LAUNCHER_LANE). This deliberately deviates from the issue's proposed env > 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.
  • Why the existing surface could not express this: BILI_LAUNCHER_LANE was 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)

Axis Old New Why
Manual daemon with a declared lane, unarmed watchdog always refused by the #1335 lifecycle gate (isUserZoneInstance required BOTH no lane AND no launch token) attached by its own lane's hook (class 0); other lanes' behavior unchanged #1660's exemption rationale covers any user-typed daemon; #2877 only cut the lane-less fallback. The #1322 refused-watcher warning surfaces the lifecycle caveat on attach
bili start CLI surface no way to declare a lane --lane <name> (validated against KNOWN_LANES) fixes the reported gap
Flag + env both set n/a (flag didn't exist) flag wins convention + protection from stale exported env

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 lane field 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 with refusedWatcher=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.
  • 5 pre-existing claude-native hooks must not attach to a lifecycle-less proxy — attach gate + self-managed fallback #1335-era fixtures updated: they modeled "gated daemon" as lane-set + NO launch token, which under the new predicate IS a manual declaration; each now carries a launchToken so it keeps modeling the real threat (an orphaned spawned child). No assertion weakened.
  • Local targeted runs: 9 suites (cli-parseargs, launcher, port-zone, hermes-native, issue3544-stale-proxy-rotation, claude-mcp-entry, pi-native, issue3436-native-proxy-reuse, issue2954-launcher-clobber) = 467/467 green; typecheck clean. Full-suite verdict = CI on this head.

@ranxianglei ranxianglei changed the title feat: bili start --lane <name> — declare which client lane a manual instance serves [PR] feat: bili start --lane <name> — declare which client lane a manual instance serves Oct 23, 2026
@ranxianglei
ranxianglei force-pushed the 2026-10-23_start-lane-flag branch from 6a8efe7 to a0cb0d8 Compare October 24, 2026 07:37
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
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.
@ranxianglei
ranxianglei force-pushed the 2026-10-23_start-lane-flag branch from a0cb0d8 to 5433967 Compare October 24, 2026 07:59
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
…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.
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-23_start-lane-flag (06f97b2)

Latest build — install this exact version

npm install -g billion-context@0.0.9710-pr.4422.2461218

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
06f97b2 billion-context@0.0.9710-pr.4422.2461218 build
3407d40 billion-context@0.0.6184-pr.4422.0639d40 build
2116a89 billion-context@0.0.6097-pr.4422.d8cb294 build
5032059 billion-context@0.0.6001-pr.4422.670f15b build
5433967 billion-context@0.0.5411-pr.4422.4bc029e build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4422.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] (ai: vllm-qwen/qwen3.8-27b)

查重:不重复。 按关键词/失败签名检索 open+closed issue 与近期 PR(start --lane / BILI_LAUNCHER_LANE / attach class / lane 声明):无其他条目提出同一功能或同一修法;唯一相关项是来源 issue #4368 本身(本 PR 正是关闭它),无在途重复 PR。

标签判定:zcode / scope/wiring / p2(功能实现而非缺陷修复,不打 bug;证据车道为 ZCode(#4006 实测);attach 管道属协议接线域;有功能缺口但常规启动流不受影响、会话始终可用 → p2)。注:router 故障窗口内镜像 labels API 不可用(shim 未实现该端点),标签未落库,判定在此留档。

Review 结论(独立复审,未沿用 issue 侧分析)

八问:

  1. 是什么问题:手动拉起的实例无法声明自己服务哪个客户端车道——没有 lane 戳就落在最差 attach class,被误路由或重复拉起(In the ZCode environment, the proxy takes 64 seconds to recover after being terminated by an external signal — recommend | ZCode 环境下 proxy 被外部信号终止后需 64 秒才能恢复——建议将看门狗间隔改为可配置 #4006 实测);且即便手动设了 BILI_LAUNCHER_LANE,也会被 claude-native hooks must not attach to a lifecycle-less proxy — attach gate + self-managed fallback #1335 门禁拒绝(user-zone 定义要求无 lane 且无 token),这个环境变量对手动实例实际是死信。
  2. 什么原因导致:两层——(a) 表面层:lane 戳只能由 launcher spawn 路径写入(proxyStartArgs 无 --lane,launcher 又按 [launcher] Inherited launcher channels can poison the next spawn with model-windows-mismatch #3521 从子进程剥离继承的 BILI_LAUNCHER_LANE),用户面没有任何入口;(b) 语义层:isUserZoneInstance 定义为「无 lane 且无 launch token」,把「手动守护声明了自己的车道」错当成孤儿 spawn 实例拒掉。
  3. 影响范围与严重程度:只影响把手动守护当指定代理跑的用户(ZCode 场景);默认配置下客户端自拉自己的代理照常工作。p2:功能缺口 + 重复进程浪费,无数据丢失、无不可用。
  4. 怎么修复的:① bili start --lane <name>,对 KNOWN_LANES(所有 bili 客户端名 + zcode)校验,拼写错误/非 start 命令直接 exit 2——防止拼错的 lane 被记进实例文件后静默匹配不到任何 hook,重新造出本 flag 要消除的静默误路由;flag > env(显式调用不应被残留导出的旧变量覆盖,符合 bili 惯例)。② user-zone 重定义为「无 launch token」(= 用户自己敲的命令,[Design] 定死端口 lane(claude 48787 / zcode 48789)端口被占时的 0 配置解法 #1660 豁免理由的直接推论):同车道 hook 直接附着(class 0),watcher 注册被拒 → 宿主展示既有 [bug] claude native proxy outlives all sessions despite README lifecycle contract — watcher-based shutdown did not fire #1322 警告(此代管无会话生命周期);spawned 孤儿(带 token)保留完整 claude-native hooks must not attach to a lifecycle-less proxy — attach gate + self-managed fallback #1335 门禁。③ boot log 公告声明的车道,便于排障。
  5. 是否有回归:逐项审过既有行为——spawned 实例行为不变(负向测试钉死:unarmed+token 仍拒绝并自拉);跨车道隔离不变(负向测试钉死:codex hook 不骑 zcode 标签的手动守护,own-lane 策略先跳过);无 lane 手动守护保留通配行为;代码指纹/配置形状检查仍先行(重建后的安装永不搭乘陈旧守护,即使经豁免路径);isUserZoneInstance 第二调用点 rotateStalePredecessor 无行为变化(手动守护无 armed watchdog,本就不是轮换候选);gateRefusalMessage 删去「e.g. manual bili start」示例是新语义的必然(该示例已不成立),非语义变更;无 wire/缓存/持久化格式变化(实例文件 lane 字段本就存在)。高危模式逐项过:无 fail-fast 变吞错、无阈值/时序/输出格式漂移(除已披露行为表)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:无转向——沿既有 user-zone 豁免的声明理由扩展,attachPolicy/attachExternal 两个轴不动。
  8. 是否引入新配置:一个新 CLI flag bili start --lane <NAME>,映射到既有 BILI_LAUNCHER_LANE(flag > env);无新 env var、无新 config-file key。行为变更 old→new 见 PR 正文表(unarmed 手动守护声明车道:总是大声拒绝 → 被本车道 hook 附着 + [bug] claude native proxy outlives all sessions despite README lifecycle contract — watcher-based shutdown did not fire #1322 警告),披露完整准确。

Review 中发现并已修(分支上追加 2 个 commit,head 现为 5433967)

  1. CI docs-sync 必红:PR 手改了 CONFIGURATION.md/.zh-CN.md 里生成的 param-ref 表格行,却没更新种子 website/config-reference/env-only.yaml(且行文本含反引号,seed 校验器明令禁止)——CI docs-sync job(generate + git diff --exit-code)在该 head 上必失败。已修:更新种子的 desc_en/desc_zh,重跑 node tools/gen-config-docs.mjs generate,生成器输出原样入库(chore(docs) commit,独立标注)。
  2. rebase 到当前 master:原 base 落后当前 master 两个发版(v0.1.205/v0.1.206)+ 数十个合并。master 把 server.ts 的实例身份块上移到 startServer 顶部([launcher] Pi model config changes reject a healthy proxy, then collide with its occupied lane port #3801/[Bug?] Under high load, health check timeouts appear to be misinterpreted as "proxy unavailable": large session requests | [Bug?] 高负载下 health 探活超时疑似被当成「代理不可用」:大会话请求被本地拒发(0.1.199 / plugin native) #3654 listen-policy 重构),与 boot log 行原位置冲突,且该位置在 log 绑定可用之前(直接放会 TS2448)。解法:变量定义留在 master 的新位置,bili start has no --lane flag: manually started instances silently land in the worst attach class without the undocumented BILI_LAUNCHER_LANE #4368 公告行移回原上下文(upgradeReplacement 之后,log 作用域内)——与 PR 原意图一致,语义不变。

验证(本地定向,全量裁决以远程 CI 为准)

判定:代码与方向正确,测试覆盖到位,上述两处问题已修入分支。CI 正在 head 5433967 上跑(PR mergeable=true,blocked=等 checks);全绿即可合,合并留给 owner。CI 出结果我再跟一条。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

冲突已解除,PR 恢复可合并状态(mergeable: true;当前 blocked = CI 检查在途 + 人工合并门禁,非冲突)。

经过:本 lane 开始解冲突时,并行 lane 已把分支 rebase 到 master(b91218a8f + 543396765)并强推。我独立复现了同一份 rebase 并在两个 head 上分别做了本地验证,确认远端解法正确,未覆盖已发布的 head(两份解法的唯一差异是 #4368 日志行落在启动序列的哪一行——同一段 startServer 内、listen 之前,行为完全等价)。

冲突本身:master 在这 250 个提交里重构了 startServer——launcherLane/ownFingerprint/ownShape 的定义被前移(early-twin 快速退出路径,#4341/#3044),PR 原 hunk 的上下文锚点失效,产生 src/server.ts 单点文本冲突。解法:保留 master 的新布局,只把 PR 的 6 行 #4368 启动日志块(launcherLane 已声明且无 launchToken 时打一条 info)插回 startServer 内,删掉重复的旧定义块;净 diff 相对 master 仍为原 PR 内容(13 文件 +242/−50,src/server.ts 仅 +6 行),无语义漂移。无需设计决策。

验证(rebased head 543396765,本地定向):

  • npm run typecheck:干净;
  • node --import tsx --test tests/launcher.test.ts tests/cli-parseargs.test.ts(PR 触碰的两个测试面):349 例,348 过 / 0 挂 / 1 skip;
  • 全量回归以远端 CI 为准:新 head 的全部 test lanes(ubuntu/windows × node 22/24)已在跑,红了再定向排查。

八问:

  1. 是什么问题:PR 分支落后 master 250 个提交导致与目标分支文本冲突,PR 被 merge_conflict 卡住无法合并。
  2. 什么原因导致的:master 侧对 src/server.ts 的热文件演进(startServer 内 lane/指纹定义块因 early-twin 路径前移)使 PR hunk 上下文失配;属常规并发漂移,非设计问题。
  3. 影响范围与严重程度:仅限本 feature PR 的合并阻塞;对用户无任何运行时影响。
  4. 怎么修复的:rebase 到当前 master;按「union of intent」保留双方意图——master 的新代码布局 + PR 唯一的 6 行日志新增;重复定义块删除不重复。
  5. 是否有回归问题:无。逐项核过既有行为:启动序列除新增一条 info 日志外不变;日志仅在手动 daemon(BILI_LAUNCHER_LANE 有值且无 BILI_LAUNCH_TOKEN)触发一次;early-twin 退出路径、端口 ladder、instance 注册均未触碰。typecheck + 定向测试绿。
  6. 是否破坏缓存:不涉及(未触碰缓存/重试/游标/去重逻辑)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及(--lane / BILI_LAUNCHER_LANE 语义是 PR 自身功能,文档 en+zh 与 env index 已随 PR 更新)。

判定:冲突闭环,等 CI 全绿后由 owner 合并即可。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] (ai: vllm-qwen/qwen3.8-27b)

CI 结果(head 5433967,55/55 checks 完成):

最终判定:本 PR 自身零回归、门禁全过,唯一红项为继承的 master 存储红(非本 PR 引入、非本 PR 可修)。待 #4490 家族修复落地(或该两个测试转绿)后即可合并;若 owner 认可「继承红不阻塞」的处置方式,现在也可直接合——合并留给 owner。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(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 拉日志提取):

  1. run 40076251868(head 5433967)中 5 个红的 test shard,断言失败全部且仅有两个存储测试:
    • ubuntu 22 s1、ubuntu 24 s1:\#3250: a configured cap flows open() → journal_size_limit (custom limit honored end-to-end)
    • ubuntu 22 s3、ubuntu 24 s3:media CAS: stale-row sweep releases media refs and mappings (full re-ingest drops the image)
    • windows 22 s2:以上两个都有
    • 其余 7 个 test shard 全绿 —— 本 PR 自己的测试(tests/cli-parseargs.test.ts、tests/launcher.test.ts)在其中通过。
  2. 继承性证明:同一基线提交 02f544d(= 当前 master HEAD,也是本 PR 的 base)上,master 自身的 CI run 40073163544 就红在这两个测试上,TAP 行逐字一致 —— 同一份代码、同一批测试,master 自己就是红的。
  3. 本 PR diff 只碰 src/cli.ts / src/instance.ts / src/launcher.ts / src/server.ts(+7 行启动日志)/ 文档 / 两个 CLI 测试文件,与存储引擎路径零交集;分支已基于最新 master(merge-base = 02f544d),rebase 没有新东西可取。
  4. 唯一例外项:ubuntu 24 s1 该次运行进程中途死亡(日志止于第 3406 个测试、无 TAP 汇总)= 运行器级偶发(同 shard 在 master 那次跑完 3550 个测试正常收尾);该 shard 里唯一的断言失败仍是上述 [bug] index.db-wal 在长驻进程内永不 checkpoint —— STORAGE_PRAGMAS 无 journal_size_limit、master 无 wal_checkpoint 调用,WAL 单调增长到 55 MiB 不回收 #3250,rerun 时自然消失。

八问

  1. 是什么问题:5 个红 shard 不是本 PR 造成的 —— 是 master 自带的两个存储测试(WAL 自定义上限端到端不截断;media CAS 陈旧行不释放引用)。
  2. 什么原因导致的:master 侧 f013414(Four storage-layer defects: identity hash contaminated with positional metadata (truncation triggers identity swap) / sw | 存储层四缺陷:身份哈希掺位置元数据(截断即换血)/清扫删除回退历史/渲染接缝图片只比长度/fork 谱系死列 #4390 row-identity 重构)后存储回收行为变化,这两个测试随之变红,已跟踪于 Storage reclamation regression: WAL custom limit not truncating, media CAS stale rows not clearing references (introduce | 存储回收回归:WAL 自定义上限不截断、media CAS 陈旧行不清引用(#4390/#4316 行身份重构引入),master CI 红、所有 PR 门禁被堵 #4490/master CI red since f013414d9 (#4390): WAL cap ignored at autocheckpoint + stale-row sweep no longer releases media refs #4498/master CI red: two storage tests stale after the historian/seq-ledger merges (media-cas sweep, WAL cap) — every PR inherits the red #4492,WAL 侧修复 [PR] Fix flaky WAL custom-cap test: assert convergence instead of a fixed ingest count (#4489) #4502 在途。本 PR 无因果参与。
  3. 影响范围与严重程度:对本 PR = 合并被阻塞(checks 不过);对仓库 = 既有 master 红,与本 PR 无关。严重度按 Storage reclamation regression: WAL custom limit not truncating, media CAS stale rows not clearing references (introduce | 存储回收回归:WAL 自定义上限不截断、media CAS 陈旧行不清引用(#4390/#4316 行身份重构引入),master CI 红、所有 PR 门禁被堵 #4490 家族既有定级,不在本线程重判。
  4. 怎么修复的:本分支无需修也不应修 —— 把存储引擎修复塞进 launcher 特性 PR 违反一 issue 一范围,且与在途 [PR] Fix flaky WAL custom-cap test: assert convergence instead of a fixed ingest count (#4489) #4502 有撞车回归风险。正确路径:Storage reclamation regression: WAL custom limit not truncating, media CAS stale rows not clearing references (introduce | 存储回收回归:WAL 自定义上限不截断、media CAS 陈旧行不清引用(#4390/#4316 行身份重构引入),master CI 红、所有 PR 门禁被堵 #4490 家族修复(WAL 侧 [PR] Fix flaky WAL custom-cap test: assert convergence instead of a fixed ingest count (#4489) #4502 + media CAS 侧对应部分)落 master 后,重跑本 PR checks 即转绿。
  5. 是否有回归问题:无。已核对本 PR 触碰路径(cli 参数解析 / launcher zone 判定 / instance 启动日志)的既有行为不受这两个测试牵连;PR 新增测试在 CI 通过。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及(本 PR 原设计不变)。
  8. 是否引入了新的配置:本次处置不涉及(PR 本身的 --lane / BILI_LAUNCHER_LANE 配置面见 PR 描述)。

判定收工:停手 —— 失败需要的是 #4490 家族的机制层修复(设计层、已有在途 PR),不是本分支的小修。建议:#4502 及 media CAS 侧落 master 后 rerun 本 PR checks;ubuntu 24 s1 的中途死亡为偶发,rerun 时观察即可。

awork and others added 3 commits November 14, 2026 07:24
…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.
@ranxianglei
ranxianglei force-pushed the 2026-10-23_start-lane-flag branch from 3407d40 to 06f97b2 Compare November 14, 2026 00:09
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: qwen/qwen3.8-27b)

Conflict rebase complete — PR #4422

Rebased 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

File Resolution
src/cli.ts Merged master's #5428 posture block (-i/-s) + master's new fields (sessionsApply/sessionsRestoreTarget/packAction/packSpec/packProject/packForce) with the PR's lane field + --lane validation block.
src/launcher.ts (a) KNOWN_LANES kept the PR's definition + master's LAUNCH_CLIENTS additions (kiro/pi-inline/opencode-inline). (b) attachGateAllows kept master's signature health: HealthInfo | undefined (body uses health?.watchdog?.armed) + the PR's improved comment. isUserZoneInstance auto-merged to return inst.launchToken === undefined;.
tests/cli-parseargs.test.ts Kept both master's posture/info-flag tests (#5428/#5491/#5606) and the PR's --lane tests (20 tests total).
5 root docs Took master's redirect stubs (master moved docs to docs/ per #5920).
website/config-reference/env-only.yaml Merged the PR's new desc_en/desc_zh (BILI_LAUNCHER_LANE) + master's desc_ja field (wrote a new ja translation).

Docs re-targeting (post #5920)

The feature commit's docs edits landed on root-level stub files after master moved them to docs/. Re-targeted the content:

Verification

  • npm run typecheck — clean
  • node --import tsx --test tests/cli-parseargs.test.ts tests/launcher.test.ts — 377 tests, 376 pass, 1 skip, 0 fail
  • Full-suite verdict will come from CI on the pushed head.

八问

  1. 是什么问题:PR [PR] feat: bili start --lane <name> — declare which client lane a manual instance serves #4422 与 master 基线冲突(落后 2016 个提交),merge state dirty,无法合并。
  2. 什么原因导致的:PR 分支自 2026-10-26 起空闲,期间 master 大量演进(含 [PR] docs: batch-migrate 14 root-level documents into docs/ (consolidation + master index + redirect placeholders) | docs: 14 个根级文档一次性迁入 docs/(集中 + 总目录 + 重定向占位) #5920 文档迁移到 docs/、kernel authorization request: release v0.1.211 bundles kernel 0.0.176 (#5415 abort-absorb nudge debt) #5428 posture 参数、kiro/pi-inline/opencode-inline 车道等),导致 src/cli.ts、src/launcher.ts、tests/cli-parseargs.test.ts 及 5 个根级文档文件产生冲突。
  3. 影响范围与严重程度:仅影响本 PR 分支的合并状态,不影响任何已发布行为。PR 功能(bili start --lane)尚未合入 master,无外部用户影响。
  4. 怎么修复的:将 2 个功能提交 cherry-pick 到当前 master,丢弃 3 个 ci-fixes 合并噪声提交;逐文件解决冲突(保留双方意图的并集);因 [PR] docs: batch-migrate 14 root-level documents into docs/ (consolidation + master index + redirect placeholders) | docs: 14 个根级文档一次性迁入 docs/(集中 + 总目录 + 重定向占位) #5920 文档迁移,将 PR 的文档内容重新定向到 docs/ 新位置并重新生成配置文档。
  5. 是否有回归问题:无。typecheck 干净,定向测试(cli-parseargs 20 例 + launcher 357 例)全绿。isUserZoneInstance 语义变更(lane===undefined && launchToken===undefined → launchToken===undefined)是 PR 本身的设计意图(手动守护声明自身 lane = 用户主权区),非 rebase 引入。master 的 kernel authorization request: release v0.1.211 bundles kernel 0.0.176 (#5415 abort-absorb nudge debt) #5428 posture 块、kiro/pi-inline/opencode-inline 车道、attachGateAllows 签名均完整保留。
  6. 是否破坏缓存:不涉及。无缓存/重试/增量游标/去重键相关变更。
  7. 是否改了设计方向:不涉及。rebase 未改变 PR 的设计方向,仅解决冲突。
  8. 是否引入了新的配置:不涉及。BILI_LAUNCHER_LANE / --lane 是 PR 本身引入的配置项(非 rebase 新增),已在 docs/configuration.md 三语 + website/config-reference/env-only.yaml 种子中完整记录。

判定:冲突已全部解决,分支已 force-push 到 upstream/2026-10-23_start-lane-flag(head 06f97b263c),等待 CI 全量验证。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bili start has no --lane flag: manually started instances silently land in the worst attach class without the undocumented BILI_LAUNCHER_LANE

1 participant