Repository navigation
[PR] msgid: pi+omp full-resend turns onto the biliMsgIds envelope (#6525/#6539) - #6549
Closed
ranxianglei wants to merge 1 commit into
Closed
ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
Contributor
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9588-pr.6549.b9cf7a8This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6549.tgz
npm install -g packageInstall instructions are refreshed on each push. |
This was referenced Nov 13, 2026
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
一句话
让 pi + omp 的 full-resend 请求也带上 msgid 信封(
biliMsgIds),补齐 #6525「信封通道零客户端接线」里的 pi/omp 一块——msgid 发送不再依赖增量车道(车道无关,讨论 #6539 提案)。背景
信封载体①(
biliMsgIds,full-resend body 平行数组)是 #5759/#4491 身份管线的主通道,但改造前只有增量车道在发(msgIds,delta body),full-resend——尤其是 OpenAI-family 的 wire(#3433 shape-gated away from the lane)——一条宿主号都不带,存储里整段会话是内容摘要。pi/omp 的配对 walker 早就存在(laneMsgIdsForWire/laneMsgIdsForOpenAiWire,车道/水位/fork 都在用),只是从没接到 full-resend 信封上。怎么做(全部在 src/agent/,服务端零改动)
coreAlignEnvelopeIds(src/agent/pi-msgids.ts,新 export):信封必须与 post-hoist core 数对齐(服务端按转换后 core 列表校验),不是 wire 元素数。walker 给出 wire 对齐数组后,用内核自己的 wire→core 投影(acp-kernel/wire的openaiToCore/anthropicToCore)的wireIndex逐元素证明 1:1——一个 wire 元素拆成 N 个 core(图文混排、text+tool_call 混合、多 tool_calls)或消失(非 lead system)→ 整体 bail。openai wire 的前导bili-ps-N槽(=内核 hoist 掉的 lead system)剥掉,中段再出现即 bail;重复 id 拒。bodyProxyVisible(src/agent/pi.ts,新):把stampPromptCacheKey里 omp 18.4.1 回归:扩展事件 before_provider_headers 已不存在(改名 before_provider_request),会话头永不附加,/acp 恒显一行空面板 #1579/[Bug] bili omp 扩展 stampPromptCacheKey 无条件注入顶层 prompt_cache_key —— 严格 schema 上游(opencode zen anthropic 端点)全量 400 #1403 的 routing gate 提成单一谓词,pck 戳与信封戳共用,两条 stamp 路径永不漂移;blind tunnel(拦截器不会改写的目标)永不戳——字段会原样骑进严格 schema 上游 400([Bug] bili omp 扩展 stampPromptCacheKey 无条件注入顶层 prompt_cache_key —— 严格 schema 上游(opencode zen anthropic 端点)全量 400 #1403 教训)。cowork 绕过 fetch 的 transport 同样不戳([Bug] Anthropic requests leak prompt_cache_key when Cowork transport bypasses native fetch interception #2583)。resolveEnvelopeIdsForFullResend/stampMsgIdEnvelope:配对源=活 branch(ctx.sessionManager.getBranch,与车道/水位同源,不新增采集器);detectWireFormat门 openai/anthropic(google/responses 留 v1 之后);任何失配/异常 → 返回 undefined → 请求字节不变。处理器末行return stampMsgIdEnvelope(event, ctx, agent, pck) ?? pck——omp 可见时信封与 pck 并存(同一个 base),pi 以原 payload 为 base;增量车道早返回,两字段不会双盖。验证
npx tsc --noEmit干净。tests/issue6525-pi-omp-envelope.test.ts23/23:coreAlign 十例(1:1 成功含 lead+工具轮;text+tc/图文/双 tc/中段 system/lead-only/重复/长度失配/非数组全 bail;anthropic 1:1)、bodyProxyVisible 两例(/bili/ 包裹可见、裸 upstream 不可见)、resolve 五例(google wire 出局/无 branch/branch 截短/getBranch 抛)、stamp 六例(可见+可解→{...payload, biliMsgIds}、blind tunnel 字节不变、omp pck base 并存、已盖戳不双盖、不可解、非对象 payload)。边界
相关
#6525(缺口盘点+计划) · #6539(提案:msgid 全生命周期) · #6532(dsh 信封) · #6540(服务端四 wire pin + GA) · #6293(fork msgid 轨) · #4491/#5759/#1403/#1579/#3433