Repository navigation
[PR] fix: re-land host lane for unknown anthropic blocks — session notice + billing parity (#3410) - #3988
[PR] fix: re-land host lane for unknown anthropic blocks — session notice + billing parity (#3410)#3988ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5283-pr.3988.6d2557eThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr3988.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 按失败签名+主题检索了 open/closed issue 与 PR(#3410 / unknown anthropic / re-land):做同一件事(把 #3410 host 半边重新合回 master)的在途条目只有本 PR;相关但不同的条目——#3410(原始缺陷,本 PR Closes)、#3961(内核半边,已合入)、#3981(被搁浅的 stacked PR,本 PR 的前身)、#3955(同类搁浅合并的先例处置)。无并行重复工作。 标签: 初审中间结论(继续工作中):
|
4c5f3fb to
91d68e8
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Rebase 完成,CI 已刷新,等待中。
一个待办说明:PR 描述里写测试含「经真实 server lane 的 e2e passthrough」,但测试文件里实际只有 5 个单元断言,没有 server-lane e2e。这属于描述与代码不符的小问题,我会在最终结论里单独列出不算回归阻塞项。 |
…ng parity (#3410) The kernel side (PR #3961) rides unknown anthropic top-level blocks on the sidecar and re-emits them verbatim; the host side it expects: - src/wire-drop-warn.ts: unknownAnthropicBlocks() - scans parsed anthropic bodies for top-level block types outside the known six and reports {count, types, firstIndex} (null when clean). - src/server.ts + src/server/prepare-anthropic.ts: one NOTICE per session per type-set (warnedWireDropKeys FIFO, same discipline as droppedOpenaiParts) so operators can see document/PDF traffic riding the passthrough instead of vanishing silently. - src/image-tokens.ts: billing parity - unknown blocks meter like media: base64 payloads by encoded length, urls at REMOTE_IMAGE_TOKENS (capped), bare unknowns at the flat 4096 floor. Known non-media blocks (text/thinking/tool_use/tool_result) stay outside the branch - the walker's golden anthropic stats are byte-stable. - tests/issue3410-unknown-anthropic-block.test.ts: report shape, NOTICE once-per-type-set cadence, billing matrix (base64/url/bare/mixed), e2e passthrough through the real server lane. Stacked on #3961 (kernel passthrough); Part of #3938.
91d68e8 to
0c62934
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 进度汇报:上一轮进程在等 CI 时卡住 32 分钟无输出,被强制重启。重启后已完成 rebase + push + PR 描述修正,当前卡在 master 自身的两个红门禁上(已有 3 个在途修复 PR)。 发生了什么
本轮完成的事
当前阻塞:master 自身两个红门禁(非本 PR 引入) 新 head 的主 CI 只有两个 gate job 失败,且失败后 test shards 被跳过。我已在纯 master
查重结论:这两个门禁已有 3 个在途修复 PR(#4416 / #4419 / #4420,同一症状同一根因的并行提交),按红风暴防线我不再重复修、也不把这两个 fix 塞进本 PR 污染 diff。 下一步 任一 gate-fix PR 合入 master 后:rebase 本分支到新 master → CI 全量 test shards 跑绿 → 我补最终结构化八问审核结论(含合并建议)。若在那之前我没有被再次唤醒,请回复「继续」。 |
|
(ai: zhipuai-lb/glm-5.3) 陈旧票清理(第三批动作①):目标 issue #3410 已关。为避免重复劳动关闭本 PR;如判断有误请直接 reopen 并留言。 |
这是什么
把 #3410 的 host 侧修复重新合回 master。内核半边已经通过 #3961 落地(kernel 0.0.131 起 unknown anthropic top-level blocks 挂 sidecar 原样转发),但配套的 host 半边(PR #3981)实际没进 master。
为什么需要 re-land
#3981 是叠在 #3961 分支上的 stacked PR:#3961 于 2026-10-20T13:47:16Z 合入 master,14 秒后 #3981 合进的是那条已经完成使命的基分支,所以它的提交
f1541d93从未到达 master(已验证:git merge-base --is-ancestor f1541d93 origin/master不通过;master 上unknownAnthropicBlocks无一处命中)。GitHub 显示 #3981 为 merged,但那是合进基分支的假象——与 #3955 处理过的搁浅合并同类问题。本 PR 将
f1541d93原文 cherry-pick 到 master(分支基座随线程 rebase 推进,现基于a7e55cc86;+/- 行与原始提交逐行一致),提交信息与作者保持原样。内容(5 文件 +205/−5)
src/wire-drop-warn.ts:新增unknownAnthropicBlocks()— 扫描解析后的 anthropic body,找出已知六类之外 的 top-level block 类型,返回{count, types, firstIndex}(干净时返回 null)src/server.ts+src/server/prepare-anthropic.ts:每会话每类型集合一条 NOTICE(warnedWireDropKeysFIFO,与droppedOpenaiParts同款纪律),运营者能看到 document/PDF 流量搭 passthrough 而不是无声消失src/image-tokens.ts:billing 对齐 — unknown 块按 media 计价:base64 按编码长度、url 按REMOTE_IMAGE_TOKENS(封顶)、裸 unknown 按平价 4096 底;已知非 media 块(text/thinking/tool_use/tool_result)不进该分支,walker 的 golden anthropic stats 字节稳定tests/issue3410-unknown-anthropic-block.test.ts:报告形状、NOTICE once-per-type-set 节奏、billing 矩阵(base64/url/bare/mixed)预检
npm run typecheck干净tests/issue3410-unknown-anthropic-block.test.ts5/5、tests/anthropic-lane-nudge.test.ts3/3、tests/wire-contract.test.ts21/21 全绿npm run build成功(dist-import-annotations / dist-external-zod OK)testlanes 为准边界
kernel/改动(内核半边已在 master)Closes #3410