Repository navigation
[PR] fix: egress-shed gate keys on the WS transport tag, not any managed transport (#3701 Finding 1, option a) - #3778
Conversation
…ransport (#3701 Finding 1) The network.wsOutboundBytes pre-send image shed fired for ANY request running under a managed custom fetch transport — including dsh-inline's HTTP lane (inline-engine.ts), whose large bodies deliver fine (16 MiB observed succeeding; the close-1009 oversize verdict was never observed there). Docs already promised WS-only; now the gate actually is: responses-ws.ts tags its transport with markWsLaneTransport, and shedEgressIfOverBudget passes through everything else untouched. Regression pin: the managed-HTTP (dsh-inline shape) transport must pass through byte-identical with zero sheds.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4466-pr.3778.1d8f25cThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3778.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复 —— open+closed 按 独立审核进行中:已拉分支(master + 单 commit cf794e9,base 最新)、diff 逐行读完、门控机制在 先报一个合并前必须处理的问题:PR 描述开头写「Closes #3771」是错的 —— #3771 是「snapshot-render D 车道测试 CI 非确定性红」,仍 open 且正在修(修它的是 #3774),与本 PR 无关;照现状合并会误关 #3771。本 PR 实际没有对应追踪 issue(来源是 #3706 review 线程里的拍板项),这行应删掉或改写。我会在收尾时直接修掉 PR 描述并报备。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.596-master.81ebd8e # this exact build
npm install -g billion-context@master # always the newest merged build
|
ai: zhipuai-lb/glm-5.3
#3771 之外无关联 issue;来源 = PR #3706 review 的 Finding 1(owner 评论 issuecomment-6259847978 待拍板项 ①,选项 (a))。
一句话:摘图门从「任何受管自定义传输」收窄到「真 WebSocket 传输」——dsh-inline 的 HTTP 大请求不再被无谓摘图。
问题(#3706 引入的过宽门)
network.wsOutboundBytes的发送前摘图门判定条件是currentFetchTransport() !== undefined——而设置受管传输的有两处:src/responses-ws.ts:729src/inline-engine.ts:253后果:dsh-inline 超 10 MiB 的 HTTP 请求,老图被摘成占位符、部分图片被强制缩档——信息白损 + 前缀缓存白断,而 HTTP(硬拒上限
network.outboundBodyBytes=5 GiB)本来能完整送达。修法(选项 (a),最小改动)
src/fetch-transport.ts:markWsLaneTransport()/isWsLaneTransport()(WeakSet 打标)src/responses-ws.ts:729:transport 闭包套markWsLaneTransport(...)src/egress-shed.ts门条件:currentFetchTransport() === undefined→!isWsLaneTransport(currentFetchTransport())测试
tests/issue3701-ws-byte-budget.test.ts:原 WS 用例改用打标传输;新钉回归:受管 HTTP 传输(dsh-inline 形状)原样透传、零摘图、字节不变——正是 [PR] fix: WS-lane egress byte budget with image shedding for close-1009 oversize requests (#3701) #3706 测试盲区(旧测试只测了「无传输」,没测「受管但非 WS」)放过 Finding 1 的那个形状行为变化