Repository navigation
[PR] pi/opencode inline changed to manual opt-in: revert the default flip; default behavior is identical to the previous vers | pi/opencode inline 改为手动开启:收回默认翻转,默认行为与旧版完全一致 - #4687
Conversation
#3278 port) - planNativeOpencode(env, fileInline): explicit inline (BILI_OPENCODE_INLINE on | config opencode.inline=true) > attach > DEFAULT inline > spawn (explicit opt-out only) - arm inline branch mirrors pi-native: INLINE_ORIGIN frozen sync, engine respawn singleFlight, origin waiter, onGiveUp cleanup - module-load installs inline transport BEFORE native intercept (#3278 chain order, #1662 hop-fixed) - launcher: bili opencode-inline (OPENCODE_CONFIG clone + plugin dist/agent/opencode-native.js, BILI_OPENCODE_INLINE=1, inherited proxy env stripped) - config docs seeds + LIFECYCLE.md rows (BILI_OPENCODE_INLINE default on) - tests: plan matrix, arm freeze, fetch-chain + V2 route composition, launcher lane (2/2) Verified on opencode 1.14.47 (bun 1.3.14): fake-upstream run through the in-process engine, session stamped plugin=opencode, exit 0 in 4s.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5752-pr.4687.228d9d9This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4687.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— open+closed 全量检索 "opencode inline" / "inline mode" 仅命中本 PR;与 #4669(pi inline 默认翻转)相关但不同:#4669 是 pi 侧、已合入,本 PR 是其 opencode 侧后续,无并行在途的同类 PR。 标签: 当前状态:开始 review。已知事实——
详细结论(八问体例)随后补。 |
(ai: vllm-qwen/qwen3.8-27b) Review 结论(八问)
CI 状态(合并前唯一卡点):head 上 7/11 test 分片红,但这是继承性失败——master 自身红(tip ac844fa run failure;本 PR base d1b46fc 的 push run 同样 6/11 红,已知家族见 #4599 floor 151/152:plugin-fork/storage-engine-proofs/refLedgerAligned/generation-boundary 分片噪声)。5 个红分片与 base 红完全重合,其余是新增测试文件触发 LPT 重排换片;ci-fixes 当前是 master tip 的祖先,无可合修复。已在 #4599 留核对结论。分支落后 master 2 提交(#4673 版本对齐 + v0.1.207 bump),与本 PR 文件零冲突面,rebase 与否不影响结论。 行为变更披露(Deliverables #4):opencode 车道默认 spawn → inline(旧:每宿主起 proxy server;新:进程内引擎,不起 server)。原因:对齐 pi 车道 #4669 的决定,消除临时端口/proxy 进程依赖。发版时建议进 release notes。 判定:代码层面 PASS——方向正确、与 pi 车道严格同构、测试是真行为断言(组合链实测落引擎、敌意 env 剥离、dist 缺失拒绝,断言有牙)、文档台账齐。合并等 master CI 转绿(哨兵 #4599 域内事项)+ 补 config surface 小节后即可;无需返工。 |
Owner decision on #4687: do not flip the opencode default. inline arms only on BILI_OPENCODE_INLINE=1/on/yes/TRUE or {"opencode":{"inline":true}}; unset behaves exactly as before (attach > spawn). Explicit inline still beats an announced attach target. Seeds/docs/LIFECYCLE updated accordingly; plan matrix re-flipped ({}→spawn), lane test unchanged (sets the env).
Owner rule (never change defaults): plain with no signals plans the spawned proxy again, exactly as before #4669. Inline arms only on BILI_PI_INLINE=1/on/yes/TRUE or {"pi":{"inline":true}} (explicit choice still beats an announced attach target). Seeds/docs/LIFECYCLE updated; plan matrices re-flipped ({}→spawn pinned in pi-native + pi-inline-ws tests). Real-machine check: bare import plans spawn (spawn attempt observed), env-on/file-true plan inline.
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.840-master.bb7c249 # this exact build
npm install -g billion-context@master # always the newest merged build
|
…in32 rides cmd.exe (#679/#2196) The #4687 test asserted spawns[0].command === BILI_CLIENT_BIN, which can never hold on Windows: planClientSpawn wraps .cmd shims in COMSPEC /d /s /c (CreateProcess cannot exec a batch file). Assert the wrapped form on win32 (cmd.exe command, /d /s /c prefix, shim path inside the wrapped line); keep the direct assertion elsewhere. Fixes the windows-latest 22/3 shard red inherited from master bb7c249.
planNativePi used to fall through to 'spawn' — bare pi with the extension installed spawned its own proxy (dist/index.js start, ephemeral port, parent-pid watchdog). Inline was opt-in only since ranxianglei#4687 reverted the ranxianglei#4571 flip. This restores the ranxianglei#4571 posture with explicit escape hatches: kill-switch > /bili/ launch > explicit inline (BILI_PI_INLINE=1/ on/yes/TRUE or "pi":{"inline":true}) > ANNOUNCED attach target (launcher-set BILLION_CONTEXT_PROXY/ATTACH — bili pi keeps its launcher proxy) > inline DEFAULT > spawn (explicit opt-out only) Opt-out restores the old attach/spawn posture verbatim: BILI_PI_INLINE=0/false/no/off or "pi":{"inline":false}. Blank BILI_PI_INLINE="" folds to unset. opencode's lane stays opt-in. bili pi-inline stays (NOT deprecated): it scrubs inherited BILLION_CONTEXT_PROXY/BILI_MITM_HOSTS so a stale attach env can't hijack the child, and preflights extension availability — with no proxy there is no wire-mode fallback, so a missing extension would otherwise silently run uncompressed. Supersedes the ranxianglei#4687 owner decision for the pi lane.
这是干嘛的
本 PR 干两件事:
现在的统一规则(pi 和 opencode 一致)
BILI_PI_INLINE=1/BILI_OPENCODE_INLINE=1(on/yes/TRUE 也行){"pi":{"inline":true}}/{"opencode":{"inline":true}}bili pi-inline/bili opencode-inline(预置环境变量)关键改动
planNativePi/planNativeOpencode:显式 inline > attach > spawn(默认 spawn,无默认翻转)opencode-inline车道:插件入口用 dist/agent/opencode-native.js(原生插件,不是 wire 薄插件 opencode.js),OPENCODE_CONFIG 克隆注入,清掉继承的代理 env测试
{}→spawn(默认不翻转)