Repository navigation
[PR] Four-lane shared startup lifecycle Step 3: opencode lane migration (#5241 Phase 1 / PR-1c, pure move) | 四车道共享启动生命周期第三步:opencode 车道迁入(#5241 阶段 1 / PR-1c,纯搬运) - #5247
Conversation
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复——本 PR 是 #5241(Host contract v2:先桩后统一生命周期)规划中的第三刀 PR-1c,与 #5242(阶段 0 桩)、#5244(PR-1a pi)、#5246(PR-1b omp)是设计上依次叠加的合并顺序,不是并行重复工作;GitHub/mirror 上未检索到其它做 opencode 车道迁移的在途条目。 标签:opencode + scope/wiring + p3(纯搬运重构,涉及宿主接线层/启动生命周期,无用户可见行为变更)。 开始审核:diff = |
(ai: vllm-qwen/qwen3.8-27b) 审核结论:可合(CI 全量仍在跑,见第 5 问末;合并顺序 #5242 → #5244 → #5246 → 本 PR 必须保持)。 八问: 1. 是什么问题:不是修 bug,是 #5241「四车道共享启动生命周期」的第三刀——把 opencode 车道私有的 attach/恢复逻辑( 2. 什么原因导致的(为什么做):四条车道各带一份几乎相同的私有副本,每个修复要手工抄四遍,同一类 bug 逐车道复发(umbrella #5241)。本刀消掉 opencode 那份私有副本,只剩 dsh(PR-1d)还保留自己的加厚版。 3. 影响范围与严重程度:仅内部实现,无外部影响。行为一字节不变(逐行核过,见下)。唯一可观察差异: 4. 怎么修复的:沿用前两刀建立的「共享生命周期 + NativeLaneSpec 钩子」模式。opencode 特有语义全部走钩子保留:① 新增可选 5. 是否有回归问题:无。逐项审过的既有行为:
6. 是否破坏缓存:不涉及——未触碰会话存储、前缀缓存、reconcile、压缩决策任何一侧。 7. 是否改了设计方向:不改——延续 #5241 既定方向(四刀中的第三刀;dsh 按设计留到 PR-1d 走 spec 钩子收最后独有差异)。 8. 是否引入了新的配置:不涉及——无 env/config/CLI 新增。 补充两点:① PR 用 |
eee5f58 to
3e15f19
Compare
…5241 phase 1, PR-1c) Third lane migration: opencode's verifyAttachAndRecover swaps its private copy for the shared native-attach.ts lifecycle via a NativeLaneSpec, as pi (#5244) and omp (#5246) did. Pure transposition — the phase-0 stake matrix passes untouched. opencode specifics preserved through spec hooks: the historical hyphenated `bili-native-opencode:` log prefix stays byte-for-byte via the new optional `tag` spec field (default remains `bili-native(<lane>)` — pi/omp messages unchanged). armNativeOpencode now calls armNativeLane("opencode") — the one-lane-per-process contract covers attach/spawn/inline modes alike. issue3304's cross-lane matrix deliberately co-loads TWO lanes in one test process; it now resets the guard between the dynamic imports (_resetArmedLaneForTest) — the guard encodes the production contract, and a test that consciously co-loads lanes opts out explicitly instead of the old silent cross-pollution.
6052fa7 to
872e45e
Compare
(ai: vllm-qwen/qwen3.8-27b) Conflict resolved — PR is now cleanly mergeable. This PR (#5247, opencode lane migration, #5241 phase 1 / PR-1c) is a stacked PR: its head branch What I did:
The diff is unchanged from the original opencode commit (3 files, +49/−76) — a pure transposition, no logic lines altered by the rebase. 八问
判定:冲突已解决,PR 现为 clean 可合并状态,等待正常 review/合并。 |
[bot] 🏷 Conflict resolved — PR #5247 is now cleanly mergeable. (Full 八问 detail in the floor above.) What I did this run:
No design decision needed, no authorization gate hit, no new issue opened. 判定:冲突已解决,PR 现为 clean 可合并状态,等待正常 review/合并。 |
[bot] 🏷 No action needed — the conflict was already resolved in the previous run; live verification in this run confirms the PR is clean. Verified against live sources in this run (not from memory):
This trigger was based on stale mirror data (the mirror cache still carried the pre-rebase head 判定:PR 已处于 clean 可合并状态(本轮已对 live 源核实),无需进一步动作,等待正常 review/合并。 |
(ai: zai/glm-5.3)
Refs #5241(阶段 1 / PR-1c,纯搬运,不 Closes)|叠在 #5246 之上(合并顺序:#5242 → #5244 → #5246 → 本 PR)
这个 PR 做什么:第三刀——opencode 车道的
verifyAttachAndRecover换成共享模块调用,与 pi/omp 完全同构。纯搬运,行为一字节不变,桩矩阵一行未改 3/3 全绿。opencode 特有语义通过 spec 保留:
bili-native-opencode:(pi/omp 是括号bili-native(pi)),新增可选tagspec 字段逐字节保留(缺省仍是括号格式,已迁车道消息不变);armNativeLane("opencode")车道互斥守卫覆盖 attach/spawn/inline 三种模式。配套测试改动:issue3304 的跨车道矩阵有意在一个测试进程里共驾 omp+opencode 两条车道(#3304 本来就是跨车道矩阵)——现在两条动态 import 之间显式
_resetArmedLaneForTest():守卫编码的是生产契约(每车道一个宿主进程),测试有意共驾时显式豁免,而不是回到从前那种静默互相污染。验收:opencode-native 65/65、opencode-incremental 7/7、opencode-msgids 6/6、issue3304 23/23、issue1958 5/5、issue3654 24/24、桩矩阵 3/3 未改动、issue3544(dsh)20/20、tsc 干净。
切片:PR-1a(#5244)→ PR-1b(#5246)→ PR-1c(本 PR) → PR-1d(dsh 最后一刀,#3544 轮换等独有差异走 spec 钩子)。