Skip to content

综合处理本issues中的关于opencodev2的issue #434

Closed

Activity

  1. ranxianglei commented on Sep 17, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷

    已对全部 OpenCode-V2 相关 issue 做综合核查(逐条读完线程 + 核对 GitHub 上所有开放 PR 的 CI 结论)。结论先行:本仓库 master 是 V1-only(v1.18.1 线);V2 迁移代码不在 master,而在 2026-09-17_v2-base 实验分支线 / drexb-ops/opencode-acp@1fe36e0 fork / billion-context 启动器模式。绝大多数实现工作已由前序会话完成并落在CI 全绿的开放 PR 上;当前所有卡点都落在「人工合并」或「owner 拍板」两类,没有可再单方面推进的实现工作(重做会违反 anti-loop,合并我无权做)。

    一、先厘清仓库边界(避免误判)

    二、状态总表(issue → PR → CI → 卡点)

    Issue 主题 PR CI 卡点
    #404 同会话初始化/转换串行化 #408 ✅ 全绿 待人工合并(#413 叠在其上)
    #410 session-guard 泄漏(ask 跨 guard) #413 ⚠️ 无 CI(叠在 #408 分支上) 依赖 #408 先合并,再 rebase 到 master
    #411 init 瞬时失败重试 #412 ✅ 全绿 待人工合并
    #407 compaction 重启 + fork 恢复 #409 ✅ 全绿 待人工合并
    #415 V2 lifecycle/projection/artifact 审计 #416(R4 legacy-ref + toFile symlink 逃逸) ✅ 全绿 待人工合并;其余 9 项属 billion-context/fork
    #405 与 billion-context native 模式让位 #406 ✅ 全绿 待人工合并(互斥语义见决策 B3)
    #421 compaction usage 变 phantom system(-285904 负预算) #430 ⚠️ 无 CI(v2-base 线) v2 实验树,未进 master
    #429* 重复系统文本按序去重 #429 ⚠️ 无 CI(v2-base 线) v2 实验树,未进 master
    #424 model/provider 顶层域前向兼容 本地分支 2026-09-17_v2-domain-forward-compat(commit a0417438) — 无法推 drexb-ops fork;上游无 V2 树 → 交付路径待你定
    #395 [Feature] OpenCode 2.0 插件 API 移交 billion-context#735 — 保持打开做追踪;范围拍板见 B1
    #417 V2 Plugin API compat(用户报告 LoadError) Phase 0 探针建议 — 等你拍板 B1/B2/B3 后开工

    (*#429 由开放 PR 反查,对应 v2 侧系统文本去重。)

    三、只有你能做的两件事(我无权代劳)

    A. 合并队列(人工操作;按 §5.1.1.2 我不能合并):
    建议顺序(注意依赖栈):

    1. fix: serialize same-session state initialization and transforms (#404) #408(fix: serialize same-session state initialization and transforms #404)→ 2. fix(#410): move compress/decompress permission ask outside the per-session guard #413(Session guard can leak permanently if tool execution is abandoned during a permission ask #410,rebase 到 master 后)—— 同一串行化特性,应成对落地
    2. fix: retry session init after transient failure instead of pinning sessionId (#411) #412(Transient init failure permanently suppresses persisted-state load for that session #411)、fix: reconcile compaction restart and custom-storage fork recovery #409(fix: reconcile compaction restart and custom-storage fork recovery #407)、fix: migrate legacy 4-digit CompressionBlock boundary refs at load and fork transfer #416(fix: close final OpenCode V2 lifecycle, projection, and artifact verification gaps #415)、fix: yield to billion-context native mode via action-time env re-check (#405) #406(与 billion-context native 模式共存:为 BILLION_CONTEXT_NATIVE 增加动作时退让检查 #405)—— 相互独立,任意顺序
      以上 5 个我已逐个验证 CI(pr-validation / build / test×Node22+24 / e2e / build-artifact)全部 success。

    B. 需要你拍板的决策(拍板后我才动手):

    1. [Feature]: 支持 OpenCode 2.0 插件 API #395/V2 Plugin API compatibility (OpenCode 2.0) #417 范围:同包 dual-shape {id, setup, server}(保 1.x + 加 2.0.x,我的推荐)还是 forward-only 2.0.x?以及是否绿灯 Phase 0 表面探针?
    2. V2 forward compatibility: model/provider domains replace catalog APIs and events #424 交付路径:给该账号 drexb-ops/opencode-acp 推送权限(我推分支并在那开 PR),还是指定别的落点?
    3. 互斥语义(#809 Q7):ACP 自禁用触发是 BILLION_CONTEXT_PROXY env + /bili/ baseURL,billion-context 本地 npm-plugin 模式下两者都不触发 → 两个插件会抢同一份历史。互斥逻辑放哪个仓库?你维护两边,需你定。

    四、我没有做的事(合规说明)

    需要我把 A 的合并队列整理成一份带 rebase 前置的可执行清单,或就 B 里某一项展开方案对比吗?告诉我方向即可。


    中文摘要:已综合核查全部 OpenCode-V2 issue 与 8 个开放 PR 的 CI——master 是 V1-only,V2 迁移在 v2-base 分支线 / drexb-ops fork / billion-context;实现基本完成且 5 个 PR 全绿(#408/#412/#409/#416/#406),当前只卡在「人工合并」(#408→#413→其余独立)和三项 owner 决策(#395/#417 范围与 Phase 0 绿灯、#424 交付路径、互斥语义 #809 Q7),可直接执行的清单已列出,等你拍板。

  2. ranxianglei commented on Sep 18, 2026

    @ranxianglei
    OwnerAuthor

    你需要判断这些够不够

  3. ranxianglei commented on Sep 18, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷

    直接回答:追踪是完整的,但作为「解决 V2」还不够 —— 而且我上一轮漏了两个关键点,逐条核实后结论更清楚了。

    上轮遗漏、本轮补核实的两个事实

    1. V2 主交付其实已完成并合入:billion-context #754 已 merged(纯代理模式 OC2 实测 round-trip 通过 + V2 启动器模式实现 + 全量测试绿)。所以「OpenCode 2.0 用户有没有可用 ACP 方案」→ 有,走 billion-context。opencode-acp#395 的实质诉求已被 #754 满足(#735 也据此关闭)。
    2. 仓库里另有与决议冲突的平行 V2 移植:分支 2026-09-17_v2-base(sha 1fe36e0,确在 ranxianglei/opencode-acp)上是 drexb-ops 的原生 V2 移植(lib/v2/projection/*、lib/v2/host.ts、lib/v2/proxy.ts)。这直接违背 [Feature]: 支持 OpenCode 2.0 插件 API #395 的书面决议「不在 opencode-acp 内移植 V2,走 billion-context」。fix: close final OpenCode V2 lifecycle, projection, and artifact verification gaps #415/V2: compaction usage becomes phantom system overhead and negative context budgets #421/V2 forward compatibility: model/provider domains replace catalog APIs and events #424/Withdrawn — filed in the wrong repository #428/fix: retain opaque historical messages when V2 context patch cannot remove them #418/fix: initialize persisted V2 ACP state before direct tool execution #419 及 PR fix(v2): map repeated identical system text by ordered occurrence #429/fix(v2): stop compaction usage from becoming phantom system overhead (#421) #430 全部属于这条 B 线。

    「够不够」的三个具体缺口

    缺口 1(根):战略分叉未裁决。 A 线(billion-context 薄壳,proxy 持压缩权威)= 完成且已合入;B 线(opencode-acp 原生移植)= 未完成、无 CI、且违背决议。不先确认哪条是正典,B 线那 8 个 issue 无法有意义地关闭——它们既非「已完成」,也不是能当普通 bug 修的缺陷,而是「要不要这条路线」的问题。这正是 issue 列表看起来「没处理干净」的真正原因。

    缺口 2:master 侧 5 个绿 PR 的「各自全绿」高估了就绪度。 三个 PR 都改 lib/state/state.ts(#408、#412、#409);#409 与 #416 共享 lib/state/rebuild.ts;#408/#413/#416 共享 lib/compress/decompress.ts;#408/#413 共享 lib/compress/range.ts 与 tests/session-guard.test.ts。逐个合入时后一个几乎必然与前一个冲突 → 必须按依赖序合并、每合一个把下一个 rebase 到新 master 并重跑 CI,不是「点五次合并」。建议顺序:#406(文件独立,随时)→ #408 → #413(本就叠在 #408)→ #412 → #409 → #416(最后,rebase 到含前述全部的新 master)。

    缺口 3:收尾动作尚未做。 若 A 为正典:#395、#417 应随 #754 已合并而关闭(交付达成),B 线的分支与 8 个 issue 归档/停止;若你想保留 B 作第二方案,则须明确撤销 #395 的 V1-only 决定并重新规划 coexistence(届时 A/B 会抢同一份历史,#809 Q7 互斥语义必须先行)。

    我的明确建议(等你一句话)

    以 A 为正典(已合入、测试绿、符合既有决议;B 属重复劳动)。确认后我会:

    1. 关闭 [Feature]: 支持 OpenCode 2.0 插件 API #395、V2 Plugin API compatibility (OpenCode 2.0) #417,标注「已由 billion-context#754 交付,本仓库维持 V1-only」;
    2. 对 B 线 fix: close final OpenCode V2 lifecycle, projection, and artifact verification gaps #415/V2: compaction usage becomes phantom system overhead and negative context budgets #421/V2 forward compatibility: model/provider domains replace catalog APIs and events #424/Withdrawn — filed in the wrong repository #428/fix: retain opaque historical messages when V2 context patch cannot remove them #418/fix: initialize persisted V2 ACP state before direct tool execution #419 逐个回复「路线已由 #735→#754 定案,billion-context 薄壳为唯一 V2 路径」并关闭/归档,2026-09-17_v2-base 分支保留但标记不再推进;
    3. 产出 master 侧 6 个 PR 的精确合并顺序清单(含每步 rebase 前置)供你人工合并。

    只需你确认两点:① A 为正典、B 归档,可否?② #395/#417 的关闭措辞是否 OK?确认后我立即执行 1–3(人工合并本身除外)。若你对 B 另有打算,说一声,我改成对应处置。


    中文摘要:核实后上轮有两处需更正——V2 主交付其实已合入(billion-context#754 merged,纯代理 + 启动器均实测通过),且仓库里另有一条违背 #395 决议的原生 V2 移植分支(v2-base,drexb-ops)悬而未决;再加 master 侧 5 个绿 PR 因共享 state.ts 存在合并顺序/冲突风险。「够不够」的答案:实现够了,但差一次战略裁决(A 为正典→B 归档)+ 一揽子收尾(关 #395/#417、归档 B 线 8 个 issue)+ 有序合并 master PR;建议与执行清单已列出,等你一句确认即动手。

  4. ranxianglei commented on Sep 19, 2026

    @ranxianglei
    OwnerAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions