Repository navigation
[PR] test: pin the already-fixed 413 root causes (egress fuse dsh_ exclusion, ingest band default-off) at the relay level - #7488
Conversation
…on, ingest band default-off) at the relay level f6e891d (root-level dsh_* extension fields stop counting in the raw-body meter) and d351a4d (PR #7443, ingest cost band defaults to 0 for all lanes) fix #7013/#7189/#7168 and #6908/#7426 respectively, but both are unreleased and neither had a relay-level end-to-end pin: - tests/issue7013-egress-fuse-dsh-extensions.test.ts (new): an 8 MiB top-level dsh_session_log with a ~50-token real prompt forwards 200 through the relay egress fuse (no model -> preflight skipped) AND through preflight's measured gate (with model); plus a unit pin that NON-dsh_ top-level fields still count (the exclusion is prefix-scoped, not a meter bypass). - tests/issue5794-ingest-cap.test.ts (extended): a RE-ARMED band still refuses the opencode/dsh re-send lanes (the default-off decision is an opt-in re-arm, not a lane exemption — the conscious #6908 tradeoff), and the /v1/responses lane stays exempt from the band even when re-armed. Refs #7013 #7189 #7168 #6908 #7426 (all close at the next release, once the fixes are in a tag).
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11249-pr.7488.8303695This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7488.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 本 PR 是纯测试钉(零 标签:bug / dsh / opencode / scope/wiring / p2(钉 413 缺陷的测试线;dsh 与 opencode 两车道都涉及;闸门在请求边界;缺陷本身已修好故非 p1,但保护的是 p1 级行为故不降 p3)。 前置核实:f6e891d 与 d351a4d 均为 master 祖先;所引 #7013/#7189/#7168/#6908/#7426 五个 issue 均 open 且与 PR 描述一致;既有覆盖确实只是单元级—— 八问:
测试有效性(关键核查):5 个测试全部「有牙」——我逐个临时还原修复确认其变红,验证后源码全部还原(git status 干净):
跨 PR 交互(注意,非阻塞):#7092(open)是同家族根因修复——把计量器改成「只计 prompt mass」(按 wire 的 PROMPT_BODY_KEYS),supersede f6e891d 的「排除 dsh_*」窄修法。#7092 合入后,测试③的断言(非 dsh_ 字段仍计入 CI:30 checks,0 失败,11 运行中,其余绿(static-gates 已绿)。 判定:可合并。 纯测试钉、零行为风险、5 个测试全部有牙、diff 干净(2 文件 +276/-0,全测试相关)、typecheck 干净。唯一留意点是与 #7092 的语义跟进(③ 可能需在其合入后重钉),不阻塞本 PR。 |
(ai: vllm-qwen/qwen3.8-27b) CI fix: Fix: ran the job's exact commands locally ( Note: the earlier run's test lanes were Verified via the GitHub API (the mirror check-cache poller stalled at 18:18:04Z during the run, so I did a single direct API read of the run rather than loop-polling): ci.yml run for head 七问(CI 修复)
判定:lock-sync 已修复并验证全绿,PR 无剩余红项,可进入合并评审。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1287-master.08783ee # this exact build
npm install -g billion-context@master # always the newest merged build
|
…_* intercept The #7168/#7439 intercept (240a2e5) strips top-level dsh_* from the inbound body by default (rollout passDshExtensions percent:0), so the 8 MiB dsh_session_log no longer rides to the upstream. The test pin (4222c55, #7488) still asserted the pre-intercept ride-along (bytes > 7.9MB) and went born-red once both commits landed on master (08783ee) — a master-level stale test, not a regression in this PR (git diff origin/master..HEAD is empty for the 4 touched files). Re-pin: - keep the original fuse-blindness pin as the PASS-THROUGH (release-path) case (BILI_ROLLOUT_PASS_DSH_EXTENSIONS=1 forces the intercept off, the extension rides along, the fuse/measured-bar must not trip); - add a DEFAULT (strip) case: the extension is dropped, the small real prompt forwards, neither gate trips.
…lict, round 7) Master moved 0b68ade -> 15f06c6 (kernel 0.0.205, +preflight emergency-digest default-off #7549, +preflight 413 passthrough #7548, +sessions reattach #7512, +opencode user-fork detection #5511, +acp-status uncompressed nudge-align #7536, +preflight gate epoch exception #7558, +413 egress fuse pins #7488, +Korean README #7551, +many host/test changes). Conflicts: 3 version-only files (kernel/package.json, kernel/package-lock.json, root package-lock.json). Resolved to kernel 0.0.206 (merged kernel = superset of master's 0.0.205 + PR #6720/#6762 changes; kernel/src changed vs master => must bump above master's 0.0.205). Auto-merged clean: kernel/src/compress.ts (PR markers 13x + master changes), src/stream.ts (PR markers 3x), src/server.ts, master's new test files, docs. Local verification: typecheck ✓, build ✓, kernel 1671 pass / 0 fail, host nudge/receipt 7 pass / 0 fail, kernel-guard ✓ (SRC_CHANGED=2 BUMPED=1 0.0.205->0.0.206), version-guard ✓ (root 0.1.216 untouched), lock-sync ✓.
…pins to the ranxianglei#7470 intercept contract ranxianglei#7470 (240a2e5) landed after these pins were written in ranxianglei#7488 (4222c55): DSH top-level dsh_* client extensions are now intercepted before egress, so the upstream no longer sees them. The old assertions (extension rides along, ~8 MiB body upstream) went red on master the moment ranxianglei#7470 merged. Re-pin to the new contract: the small real prompt still forwards (the dsh_-blind meter holds) AND the upstream body contains no dsh_session_log. The residual-semantics unit test (non-dsh_ fields still count) is unchanged and still green.
这是什么
两个已经修好但还没发版的 413 根因,补上 relay 级端到端测试钉住,防止将来回归。本 PR 不改任何 src/ 代码,只有测试。
f6e891d(11-20 已进 master):顶层dsh_*扩展字段(DSH 会话日志回传,~8 MiB 纯遥测)不再计入出站体 token 计量。修的是 [Bug] estimateRawBodyBreakdown counts non-prompt extension fields toward the fuse budget, causing legitimate requests to | [Bug] estimateRawBodyBreakdown 将非 prompt 扩展字段计入 fuse 预算,导致合法请求被 413 误杀 #7013/The egress window fuse counts the provider extension field (dsh_session_log) toward the conversation token count, yet re | egress window fuse 把 provider 扩展字段(dsh_session_log)当对话 token 计数,413 却引导用户去清理 messages[] #7189/Egress window fuse counts non-contextual upload fields into the model window, permanently locking out healthy sessions w | egress window fuse 把非上下文的上传字段算进模型窗口,健康的会话被 413 永久锁死 #7168——真实 prompt 只有 ~100K token,却因为 8 MiB 的dsh_session_log被本地 egress fuse 每轮 413。d351a4d(PR [PR] fix: disable the 32 MiB ingest cost band by default for all lanes (#7426) #7443,11-21 已合并):32 MiB 入站成本闸默认关(band=0,全 lane)。修的是 [Bug][dsh][ingest] The 32 MiB ingest cost is measured against the pre-folding inbound body: a normal session folded down | [Bug][dsh][ingest] 32 MiB 摄入成本带量的是折叠前入站体:折叠到 446 KiB 的正常会话被永久 413 #6908/[Bug][opencode][ingest/0.1.216] Long sessions on the opencode lane are permanently 413'd by the 32 MiB ingest hard limit | [Bug][opencode][ingest/0.1.216] opencode 车道的长会话被 32 MiB ingest 硬闸永久 413(且 #6908/#6933 的修复只豁免 dsh 车道,opencode 仍在外) #7426——dsh/opencode 每轮重发全量历史,会话攒过 32 MiB 后每轮本地 413 死锁,连让 bili 压缩的那次调用本身都进不来。这两个修复之前只有单元级测试(计量函数本身),没有走真实转发链路的 e2e 钉——计量函数以后被人"顺手"改回去时,现有测试未必挡得住整条 fuse 链路。
改了什么
tests/issue7013-egress-fuse-dsh-extensions.test.ts(3 个测试):dsh_session_log+ ~50 token 真实 prompt:body 不带model(跳过 preflight)→ relay egress fuse 必须放行 200,且上游真的收到完整 ~8 MiB 体(是转发不是剥离);model→ preflight 的 measured 闸(同一个计量器的第二个消费点,armMeasuredBar)也必须放行;dsh_前缀的顶层扩展字段仍然计入(排除是前缀限定的,不是"所有未知字段都不计"的计量后门)。tests/issue5794-ingest-cap.test.ts(+2 个测试):BILI_INGEST_BODY_BYTES=1 MiB)后,opencode/dsh 重发 lane 仍然在 ingest 阶段被 413 拒——"默认关"是操作员 opt-in 的再武装,不是 lane 豁免(这是 [Bug][dsh][ingest] The 32 MiB ingest cost is measured against the pre-folding inbound body: a normal session folded down | [Bug][dsh][ingest] 32 MiB 摄入成本带量的是折叠前入站体:折叠到 446 KiB 的正常会话被永久 413 #6908 有意识的权衡,钉住防止将来悄悄改);/v1/responseslane 即使再武装也豁免入站闸(协议豁免,dsh compaction 骑这条线)。测试
raw-body-dsh-extensions3/3、issue4079-egress-window-fuse4/4 不变;tsc --noEmit干净。风险
零行为风险(纯测试)。若 CI 中某个新 e2e 暴露既有行为与断言不符,说明"已修"结论有误,应以本 PR 的失败为准重新诊断。
Refs #7013 #7189 #7168 #6908 #7426(发版进 tag 后统一关闭)