Repository navigation
fix(#3358): exclude google functionCall tool-call args from the text-run guard - #3375
ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3978-pr.3375.faf8b55This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3375.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(bot) 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重:重复——与 #3357 100% 重复(同症状 + 同机制 + 同根因,diff 逐一比对确认):
#3357(创建于 06:20Z)比本 PR(~07:20Z)早约一小时。按先来后到:保留 #3357,本 PR 以重复关闭,本 PR 的增量价值(额外回归测试用例)移植进 #3357。 方向判断(独立审核,非复读 issue):机制成立——已逐行核对源码:walker( 接下来:① 实证验证修复前后行为(含核对本 PR「第 1/3/4 例修复前失败」的说法);② 把本 PR 独有的两个用例(第二叶子拼写 |
|
(ai: vllm-qwen/qwen3.8-27b) 以重复关闭——与 #3357 重复:
#3357 早约一小时创建(06:20Z vs 07:20Z),按先来后到保留先到的。本 PR 的独有价值——两个额外回归用例(args.text 第二叶子拼写、混合 prose+arg 帧字节原样)——已移植进 #3357 分支作为附加 commit(d686c80);#3357 同时 rebase 到最新 master,正文补了 Closes #3358。 完整审核结论(八问)见镜像 issue 的 review 线程。合并留给人:#3357 |
(ai: vllm-qwen/qwen3.8-27b)
Closes #3358
What / why
The #3260 text-run breaker walks every decoded frame and feeds text-family leaves (
content/text/…) into the run tracker, with exclusion propagated by BRANCH NAME viaEXCLUDED_BRANCHES. OpenAI (arguments), Anthropic (input) and Responses (event-typeskip) are all covered — but the Google lane nests tool calls undercandidates[].content.parts[].functionCall.args, and neitherfunctionCallnorargswas excluded. Google frames carry no top-leveltype, so the event-level exemption cannot reach them either. Result: a write/edit-tool payload whose arg field is namedcontentortextand holds ≥200 consecutive identical characters (separator lines, base64 runs) aborted the whole answer. This breaks the #1039 invariant (tool arguments are user intent, never counted) on the Google lane.Fix
EXCLUDED_BRANCHES+=functionCall(covers everything under it, incl. all ofargs), plus defensiveargs/parameters. Key-name propagation already handles the rest of the subtree. No wire bytes are touched — the guard only decides whether to trip; forwarding stays byte-exact.Behavior change (flagged per policy)
Old: Google-lane turns whose tool-call args contained a ≥200-codepoint run in a field named
content/textwere aborted mid-stream (clean EOF, upstream cancelled). New: those turns complete normally. Genuine model-text runs (e.g.parts[].text) still trip at the same threshold — pinned by the control test.Tests
New
tests/issue3358-google-functioncall-args.test.ts(4 cases):args.content300×=does NOT trip;args.text300×-does NOT trip; controlparts[].text250×=DOES trip astext-run(guards over-exclusion); mixed frame (prose part + huge arg part) passes byte-exact. Verified the first/third/fourth FAIL on the pre-fix code and pass after. Existing runaway-guard + #3260 suites (35 tests total across the three files) green locally; typecheck/build/unused-export/import-graph gates clean.No config surface added. Meets the §7.4 auto-merge gate checklist (single-module pure fix, regression test, rebased head, no wire/config/persistence change); merge stays human.