Repository navigation
feat: configurable request-body byte budgets under network.* (#3128) - #3202
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3903-pr.3202.5d7558dThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3202.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重结论:不重复。 已检索仓库近 30 个 PR(open+closed)与 "byte budget" 全文搜索:没有其他 PR/issue 实现可配置字节预算。相关项仅三个:#3128(本 PR 的源 issue)、#3138(part 1:可读 413,姊妹 PR,仍 open)、#3197(CI 端口冲突修复,与本 PR 无功能交集)。无重复立项,进入审核。 审核对象:分支 结构化八问
CI 红腿判定:既有已知基础设施缺陷,非本 PR 回归12 个 test-shard job 中 6 个红,全部落在「端口族 live 套件」,失败形态与 #3197 引用的空 PR 实证(#3190)一一对应:
这三种形态正是 #3197(在途,Closes #3182/#3184/#3188)定位的根因:#3145 分片把端口族 live 套件集中进同一 shard,#2816 的 concurrency=4 让多个 daemon 共享 zone 基址 18787 与临时端口池——确定性 shard 内争用,不是本 PR 引入。佐证:本 PR diff 不触碰这些路径;它自己的测试面(request-body-budget / image-request-budget / proxy-readbody / decode-fail-passthrough / knobs-config-precedence)在 CI 全绿;全部静态门禁(typecheck/build/docs-sync/config-surface-guard/unused-exports/lane-guard/kernel-guard/pi-subagents-guard 等)全绿。 已做动作:对 run 38600712419 触发了失败 job 重跑(API 返回 201 接受)。鉴于根因是 shard 内核争用,重跑大概率复现同样的红腿——真正的修法是 #3197 先落地。 判定代码审查通过,无阻塞项。两条调度备注:
按 §7.4,本 PR 涉及配置面 + 默认值变更,属 human-only 合并类——确认无误请手动合并:#3202 |
(ai: vllm-qwen/qwen3.8-27b) 重跑结果跟进(run 38600712419 attempt 2,已完成):
结论不变:红腿是既有 CI 基础设施缺陷(#3182/#3184/#3188,修复在途 #3197),重跑无法自愈。建议先合 #3197,再对本 PR 触发一次 CI(届时若绿即可直接走人工合并);或按已知红腿豁免处理。 代码审查判定维持:通过,无阻塞项;本 PR 属 human-only 合并类(配置面 + 默认值变更)。 |
509649f to
79f871e
Compare
|
ci还是失败咋回事 |
The HTTP request-body caps were hardcoded constants (100 MiB wire / 200 MiB decoded / 100 MiB outbound) with no surface to raise them. Add three knobs, resolved env > file > default through src/knobs.ts: network.receiveBodyBytes (BILI_RECEIVE_BODY_BYTES) default 5 GiB network.decodedBodyBytes (BILI_DECODED_BODY_BYTES) default 10 GiB network.outboundBodyBytes (BILI_OUTBOUND_BODY_BYTES) default 5 GiB The receive cap also drives the large-decode admission threshold. Defaults raised per owner decision so multi-gigabyte single requests are accepted instead of the socket being reset; WebSocket lanes keep the fixed 100 MiB surface. Garbage / non-positive values fall back to the default. Nested under the existing network block (no new top-level config key).
Owner rule (2026-10-14): when a defect makes a capability unavailable, fixing availability outranks every other consideration (performance, memory, elegance); ship the availability fix and track the performance cost separately. Added as a leading bullet in AGENTS.md §7.3 Correctness Guardrails.
Regenerated CONFIGURATION.md / CONFIGURATION.zh-CN.md from the merged
config-reference seeds after rebasing onto current master. Adds the three
network.{receive,decoded,outbound}BodyBytes rows; website page assets are
unchanged (plain leaf entries carry no site_* block).
79f871e to
76f5db9
Compare
(ai: vllm-qwen/qwen3.8-27b) 你看到的红是旧结果——那次运行基于的 master 上有两个 master 侧问题,今天都已修好,且都与本 PR 代码无关。 我已把分支 rebase 到最新 master 并推送,新一轮 CI 正在跑。 那次红(10-15 16:47 UTC 的运行)到底挂在哪
为什么确定不是本 PR 的代码
我刚做的
八问(简版)
判定:等这轮 CI 出结果即可,预期转绿;合并仍按之前结论走人工(配置面 + 默认值变更类)。若这轮再红,我立刻深挖。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.476-master.21f90d9 # this exact build
npm install -g billion-context@master # always the newest merged build
|
…anxianglei#4804) The Responses WebSocket lanes (codex-responses-ws, responses-ws) measured the RECONSTRUCTED full history against a hardcoded 100 MiB cap before dispatch ran, so a long session whose processed outbound was far below the cap died with 413 request_too_large on the next turn even when the client sent only a few MiB of delta; checkpoint accounting shared the same cap and cleared checkpoints near it, stranding continuations with previous_response_not_found. ranxianglei#3202 made the HTTP budgets configurable but explicitly left the WS surface fixed at 100 MiB. - ws maxPayload, reconstructed-body admission, upstream frame/backpressure/ output guards and checkpoint accounting all resolve limitsReceiveBytes() (BILI_RECEIVE_BODY_BYTES > network.receiveBodyBytes > 5 GiB) - zero new config fields - one full serialization per turn: admission measures the same wire string the pipeline envelope pushes (was two) Behavior changes (old -> new, defaults): - WS wire frame cap 100 MiB -> 5 GiB - WS reconstructed-body admission cap 100 MiB -> 5 GiB - checkpoint retention cap 100 MiB -> 5 GiB (near-cap checkpoints survive) - 413 message names the live budget instead of a constant "100 MiB" Restore the old value with BILI_RECEIVE_BODY_BYTES=104857600 (this also sets the HTTP receive budget, as it always did).
Part 2 of #3128 (part 1 — readable 413 instead of ECONNRESET — is #3138). Companion to #3138; both are needed to fully resolve #3128.
What
The three HTTP request-body caps were hardcoded constants (
MAX_REQUEST_BYTES100 MiB wire,MAX_DECODED_REQUEST_BYTES200 MiB decoded, outbound 100 MiB). A single request over any of them was unusable. This makes each stage's budget tunable and raises the defaults per owner decision so multi-gigabyte single requests are accepted instead of reset.Behavior change (old → new)
network.receiveBodyBytes/BILI_RECEIVE_BODY_BYTESnetwork.decodedBodyBytes/BILI_DECODED_BODY_BYTESnetwork.outboundBodyBytes/BILI_OUTBOUND_BODY_BYTESMAX_REQUEST_BYTES) — this is an HTTP request-body surface, not a WS frame/message cap.Config surface (per Configuration Surface Discipline)
networkblock:receiveBodyBytes,decodedBodyBytes,outboundBodyBytes. Env tierBILI_{RECEIVE,DECODED,OUTBOUND}_BODY_BYTES; file tiernetwork.*; resolved env > file > default via the standardknobs.tspattern. No new top-level config key.networkand not a new block: the original draft used a top-levellimitsblock, but adding a new FileConfig top-level key trips the config-surface guard's red line (check-coverageenforces the top-level-key set). Per owner direction the three budgets moved under the existingnetworktransport-knob namespace.network's documented scope is upstream-call timing, so these size caps are a slight scope extension — accepted because there is no dedicated request/proxy block and these are per-request transport byte budgets.src/request-body-budget.tswith zero env/config/CLI reachability. Theproviderstable, the three-levelcompresshierarchy, and the othernetwork.*timing knobs govern other concerns; none expresses a per-stage byte budget.limitsblock (rejected — tripped the config-surface red line); extending thecompresshierarchy (rejected — compression token budgets ≠ wire byte caps); reusingplugin.snapshotCapBytes(rejected — different surface, fork-API snapshots). Nesting undernetworkis the minimal home that clears the gate.network.receiveBodyBytes: 104857600, etc.). Invalid/non-positive values fall back to defaults silently (consistent with sibling knobs).website/config-reference/process.yamlseeds (CONFIGURATION.md en+zh). All CI gates pass locally: docs-sync (idempotent regen), check-coverage, config-surface-guard, check-unused-exports.Tests
knobs-config-precedencecase: defaults 5/10/5 GiB, file tier (network.*), env precedence, garbage/negative fallback.request-body-budget,image-request-budget,proxy-readbody,decode-fail-passthrough) pin the legacy 100/200/100 MiB values so their mechanism assertions stay independent of the shipped default — behavior on those suites is byte-identical to master.Rebased onto current master.