Repository navigation
[PR] feat: four-host msgIds wiring on the incremental lane (dsh/pi/opencode/omp) (#4491 host batch) - #4523
Conversation
…ost wiring) The llm/stream dispatch scope now captures the host's per-message ids alongside the session id (#4082 machinery), and the incremental turn envelope carries them as msgIds when — and only when — they line up 1:1 with the wire messages actually sent. All-or-nothing per turn: sidecar shapes (compaction/title) and any unusable id degrade to an id-less turn, never a guessed pairing. planIncrementalTurn drops a count-mismatched list locally so a caller alignment bug can never pin a wrong id.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5457-pr.4523.7714a8bThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4523.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。open issue/PR 里检索 msgIds / incremental lane 宿主接线,无其他在途同主题工作;本 PR 是 #4491 的宿主接线批次(服务端地基 #4505 已合),与既有 PR 无重叠。 标签: 状态: 已拉取 PR head |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.814-master.3138bda # this exact build
npm install -g billion-context@master # always the newest merged build
|
背景
#4491 服务端地基(#4505)已合:lane 接受
msgIds(与 messages 平行的宿主消息 id 数组,严格校验),但还没有任何宿主真的发。本 PR 补上四宿主接线,插件车道的服务端正史从「休眠」变「通电」。改动(每宿主一个 commit,冲突在 incremental-client.ts/pi.ts 已合并)
llm/stream的options.messages[].id挂进既有 Why did it spike to several M tokens: after dsh attribution was lost, requests bypassed bili and were sent directly, ren | 为什么会涨到几 M tokens:dsh 归因丢失后请求绕过 bili 直发,压缩与护栏全部失效 #4082 ALS 作用域(作用域载荷从裸 sid 扩为{sid, msgIds}),发送时与实际 wire 消息 1:1 对齐才带;侧车(compaction/title)无 id→整轮降级。客户端侧校验镜像(不 import 服务端模块的纪律)。CoreMessage.id(新模块src/agent/pi-msgids.ts,validateMsgIds直接复用服务端校验)+lanePinnableContent对齐。messages.transform的info.id采集(opencode-msgids.tsharvest + 对齐)。V2 http.request 只见 wire 拿不到 id——V2 形状降级为内容派生(四宿主最弱一环,issue 里已有记录)。sessionManager.getBranch()树条目 id,before_provider_request快照 hint(TTL 30s)+ count/role 双对齐;另持msgidClaims本地镜像——已上车过的 id 重试时降级,不撞 lane 的 400(重复认领硬失败)。planIncrementalTurn的PlanArgs.msgIds(数量不齐本地丢弃)+ delta 轮 slice 对齐。全或无纪律贯穿四宿主:任一消息拿不到合格 id(缺失/重复/
acp_summary_保留前缀/空白控制字符/超长/数量不齐)→ 整轮不带字段,服务端回落内容派生 id;宁可降级绝不错配(错配=给错身份,不可逆)。测试
新增
tests/{pi,dsh,opencode,omp}-msgids.test.ts(5/5/5/6 例,hermetic mock harness):带 id 上车+对齐/部分无 id 降级/侧车形状降级/重复 id 降级/count 不齐不发。组装分支复验(四分支合一后):四套 msgid 桩全绿 + msgid-pin 9 + msgid-algebra 14 + plugin-render-endpoint 7 + msgid-lane-flow 5 + incremental-lane 24 + tsc 0 + unused-exports clean。
备注
pluginLaneServerHistory不动(仍 0%):接线是能力,开闸(本机狗粮→灰度)单独走。Part of #4491(服务端地基=#4505,本 PR=宿主接线批次)。