Repository navigation
[PR] #2924 oversize 422: point dead-scope users at a host restart, not a futile retry - #3595
Conversation
…etry (#3589) The refuse-oversized arm is reachable ONLY via attribution-threw + body-over-window (the host's agent scope died mid-request). In that state retrying the same call keeps failing and compaction is impossible (no fold handle), so the old guidance ('retry the turn; ... needs compaction or a fresh session') was misleading. State why retry is futile and make the remedy a host restart (session state is persisted on disk); fresh session as the fallback. Behavior change (error TEXT only — no logic/wire/code path change): the 422 'message' field of bili_gate_oversize_refusal now says restart-the-client-host instead of retry/compaction. The stable code, HTTP status, x-bili-gate header, and retryable:false are all unchanged.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4250-pr.3595.b6e6689This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3595.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复(独立检索,open+closed issue 与近期 PR,按措辞/失败签名匹配):无任何在途条目提议此 422 文案变更。相关但不同机制的条目:#3593(attribution 失效的可见化——panel + 初审已独立完成(不复读 PR 描述):
CI 状态:static gates 全绿(kernel-guard/config-surface-guard/docs-sync/…),test 分片运行中。绿了之后补结构化八问结论。 |
…wn flake, unrelated to this diff
(ai: vllm-qwen/qwen3.8-27b) CI 结论 + 结构化八问 CI:初跑(e8fdea0)恰好一个红 lane ——
处置:agent 账号无 actions rerun 权限( 八问:
判定:可合并 —— 方向关/回归清单/测试有效性/diff 整洁度全部通过,全套 CI 绿(head |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.582-master.4a40022 # this exact build
npm install -g billion-context@master # always the newest merged build
|
What & why
Follows #3589. When a dsh agent scope dies mid-request (e.g. an auto-update cuts an in-flight stream), the
#2924takeover gate'srefuse-oversizedarm fires: attribution throws, the raw body provably exceeds the window, and bili refuses locally with a 422 (bili_gate_oversize_refusal) instead of forwarding a guaranteed upstream 400.That arm is reachable only through the threw+oversized path — i.e. the scope is dead. In that state the old message told the user to "Retry the turn; if it persists … needs compaction or a fresh session", which is actively misleading: retrying the same call keeps failing while the scope stays dead, and compaction is impossible (there is no fold handle once attribution throws). The #3589 incident user retried 5+ times, each a 422, and read it as "context blew up".
This makes the 422 wording tell the truth and give the one remedy that actually works: restart the client host (session state is persisted on disk, nothing is lost; after the restart the oversized history folds back under the window normally), with a fresh session as the fallback.
Behavior change (error TEXT only — flagged per policy)
No logic / wire / HTTP-status / header /
code/retryablechange. Only the human-facingmessagefield of the 422 changes:… host attribution failed mid-request and the request body cannot fit the model's context window — sending it uncompressed would be rejected upstream (#2924). Retry the turn; if it persists, the session's local history has outgrown the window and needs compaction or a fresh session.… the host's attribution lookup threw mid-request (its agent scope is disposed/closing), so this body cannot be folded into the model's context window — forwarding it uncompressed would be rejected upstream (#2924). While that scope stays dead, retrying this same call will keep failing; restart the client host once (its session state is persisted on disk, so nothing is lost) so the oversized history can be folded back under the window. If you cannot restart, start a fresh session instead.Why: the old "retry the turn / needs compaction" guidance cannot succeed in the only scenario that reaches this message (dead scope). Pointing at a host restart removes the futile-retry loop the user experienced in #3589.
Scope notes
oversizeDirectRefusal, [Bug] plugin native 车道疑似静默直连:attach/spawn 未就绪即 proxy unavailable — go direct,长会话按未压缩历史直发上游撞 400(0.1.197 / opencode v2 2.0.29) #3308) has a different trigger (proxy-unavailable, not attribution-threw) and its own message — intentionally untouched.messagestring;tests/native-intercept.test.tsasserts only the stablecodebili_gate_oversize_refusal, so this text change is test-safe.Verification
node --import tsx --test tests/native-intercept.test.ts tests/dsh-native.test.ts→ 114 pass / 0 fail (includes the#2924 refuse-oversizedcases).查重
不重复 —
#2924(takeover-gate refusal 机制)已 closed/已合入;无在途 issue/PR 提议此 422 文案增强。dsh 死 scope / 无限重试等根因属外部 dsh 仓库,见 #3589 责任拆解,不在本 PR 范围。Follows #3589