Repository navigation
[PR] fork: msgid identity track for the plugin fork protocol (#6262) - #6293
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9319-pr.6293.06b95acThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6293.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Principle 1 of the four-principles proposal (discussion #6262): identity, not bytes, decides which prefix a fork inherits. The plugin-protocol channel (dsh/omp/pi declared forks) gains an optional msgid track: - a host-pinned parent exposes the host's stable message ids AS its snapshot rawIds, so the child may present the host id of each matched prefix message (prefixMsgIds) plus the hash-run length (driftFrom); - the server accepts a byte-drifted prefix only when every presented id equals the parent's rawId at its slot; the receipt is marked status "drifted" (or "expanded+drifted") with the verified driftFrom echoed; - a gate failure never fails the fork: the byte-verified strict fork proceeds exactly as before (no 409); malformed shapes are 400; parents without host-pinned ids make the track a no-op (byte path unchanged). Client: lanes inject their existing parity-pinned collectors (dsh hostMsgIdsOf; pi/omp laneMsgIdsForWire on the anthropic wire with the same content-pinnable gate the incremental pin uses); fork-adopt performs only the core-alignment length lock — no new validator copies, msgid-rule-parity matrix untouched. opencode-v2 is not wired in this PR (byte track, follow-up). Tests: tests/issue6262-fork-msgid-track.test.ts (8) — client prefix extension across a drift cell, the byte-fallback arms, a full-chain proxy round trip, and the server gate (drifted receipt / strict fallback / 400 arms). Docs: msgid-infrastructure.md consumer 6, plugin-protocol.md section 8, architecture.md.
…k row (#6262) in en+zh The PR's count bump (five→six consumers) left the table with only five rows and the zh twin still at 五个. Adds the missing ⑥ row in both languages and fixes the 'other four/five' cross-references in row ①.
f377a6f to
2eb2055
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重:不重复——open [PR] 列表中指向本线程的只有本 PR 一个,无并列修复分支。 结论:审核通过。旧 head 唯一的 CI 红项是 flake(偶发),非回归;审核中发现的 2 处文档缺陷已直接修掉并推送;PR 已 rebase 到最新 master,新 head CI 绿后即可合。 (上一轮会话在等 CI 时挂起被重启,本轮改为单次检查,以下为已核实的最新状态。) 验证与处置
八问
标签:pr(原有)+ dsh、pi(本 PR 接线的插件车道;omp 经 pi 同一工厂覆盖)、scope/wiring(插件协议接线)、p3(功能 PR,无用户可见缺陷)——已打。 CI 结论已同步到 #4599。合并/收工判定:代码+文档就绪、flake 已印证、PR 已 rebase 到最新 master(新 head 2eb2055),新 head CI 绿后即可合并(人工合并)。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 进度汇报:rebase 完成、新 head 全 CI 绿,合并只差 full-matrix 门。 已完成(相对上一条回复的增量)
为什么 mergeable_state 仍是 blocked(已 live 核实)
选项(各带代价)
八问
结论:代码侧已闭环(审查 + 文档修正 + rebase),新 head 10 个 workflow 全绿;只差 |
[PR] fork: msgid identity track for the plugin fork protocol (#6262)
一句话
fork(会话分叉)协议现在用 msgid 识别"共享父会话的前缀",不再只靠逐字节比对。某条消息在 fork 后被改写过(同一 id、字节变了),子会话也能完整继承该前缀——以前这种字节漂移会让 fork 前缀在漂移点被截断(首格漂移则 fork 直接失败)。
这是四原则提案(discussion #6262)的第一条:身份(msgid) > 顺序 > hash。本 PR 只实现插件通道(dsh/omp/pi 声明式 fork);非插件通道(服务端字节猜测收养)按讨论边界不动,后续 PR 处理。
为什么
现有 fork 前缀验证是字节精确匹配(stableJson + order hash)。两个现实失败场景:
no prefix match→ fork 失败。"字节变、身份不变"是常态:#3011(fork 零继承,41 评论,用户讨论最热的 bug)、#5984(dsh-live-compact 改写宿主历史)都反复出现。
怎么做的
prefixMsgIds(前缀每格的宿主 msgid)+driftFrom(字节验证前缀的长度,即漂移区起点)。rawId就是宿主 msgid;子会话声明的每格宿主 id 与父 rawId 逐格相等 → 接受字节漂移的前缀,回执标status: "drifted"(跨块时"expanded+drifted"),回显已验证的driftFrom。hostMsgIdsOf;pi/omplaneMsgIdsForWire+ content-pinnable 门,与增量 pin 同条件);服务端复用既有identifier();tests/msgid-rule-parity.test.ts的 6 副本矩阵不变。fork-adopt 自身只做"与投影 core 等长"一条锁。验证
npm run typecheck干净tests/issue6262-fork-msgid-track.test.ts:客户端前缀跨漂移格扩展、字节回退各分支、全链路代理 round-trip、服务端 gate drifted/strict/400 各臂)tools/check-architecture-docs.mjs全绿边界
相关