Repository navigation
[PR] kernel: classify tail-truncated stringified content arrays as truncated, not content-not-array (#6946) - #6970
ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11022-pr.6970.a9955aeThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6970.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) Reviewed the diff against current master and verified the fix locally. Kernel change → human-only review tier, no auto-merge. What I verified
八问(review checklist)
Minor note (non-blocking, host-side): the comment at src/stream.ts:1173 ("diag.length is set only for string inputs") is now slightly stale — the kernel also sets Verdict: code review complete and positive — fix is correct, minimal, well-tested; the lock-sync blocker is resolved. Merge is gated on (a) CI fully green on the new head (in progress, 0 failed so far) and (b) your human sign-off (kernel = human-only tier). Will follow up with final CI status. |
(ai: vllm-qwen/qwen3.8-27b) Closing status (full review + 8-question checklist posted above). Done & verified
Remaining (not yet verified)
Risk: low. Everything I can verify locally is green; the only unverified surface is the standard full test matrix, which is the CI gate's job. Verdict: code review positive — correct, minimal, well-tested, lock-sync resolved. Merge is gated on (a) CI fully green on the new head and (b) your sign-off (kernel change = human-only tier, no auto-merge). I'll pick up any red lane if one lands. |
|
(ai: vllm-qwen/qwen3.8-27b) This PR is superseded by the root-cause aggregation PR #6983. Per the owner's ruling on #6946 (2026-11-16): "修复走聚合 issue 统一出 PR" — the fix ships through the single aggregation PR. The core fix from this PR (commit 4ba234d) has been cherry-picked into #6983 with #6983 carries the |
(ai: vllm-qwen/qwen3.8-27b) Verified the supersession claim against GitHub — it checks out:
So the supersession is correct: this PR's fix now ships through #6983. My earlier code review (the 8-question checklist) covered the same 3-facet fix, so that work carries over to #6983's #6946 facet rather than being wasted — though #6983 additionally carries the #5455 pin and the lock-sync fix, which are new surface I haven't reviewed. On closing: per repo rules agents cannot close PRs (and your note says the same — "the human merges; I cannot close it"). So I will not close #6970. Next step (human action): once #6983 merges, close this PR as superseded. Until then it stays open. |
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) I did NOT rebase this PR — it is superseded, and the merge conflict is moot. I verified the live state before touching anything:
Why I did not rebase:
Options:
Recommendation: B. Default if undecided: B. I applied the 八问 (this run):
Verdict: 本 PR 被 #6983 取代,冲突无意义,建议 B——#6983 合并后由你关闭本 PR。kernel 版本决策(0.0.199→0.0.201)应在出货 PR #6983 上做,不在本 PR。 |
[ework] CI fix verified green ✓ |
…ed, not content-not-array (#6946) Rebased onto master (kernel 0.0.200). The salvage fix (parse-compress-input.ts + test) is byte-identical to the original; the kernel version is bumped 0.0.200 -> 0.0.201 to satisfy the version-discipline gate (kernel/src changed). This PR is superseded by #6983 (the rcagg aggregation carries the same fix as a faithful cherry-pick). Close after #6983 merges.
befb0bd to
738f33d
Compare
(ai: vllm-qwen/qwen3.8-27b) Resolved the merge conflict — rebased this PR onto master and force-pushed. This run I did the rebase (the literal task) rather than re-escalating: the auto-fix lane re-triggered on the (moot) conflict despite my previous What I did (all verified live this run):
Note on local verification: node_modules is not installed in this workdir, so I could not run the kernel test suite locally; the salvage-fix code is byte-identical to the original commit that already passed CI (floor 14 "CI fix verified green ✓"), and the only other change is the mechanical version/lockfile bump. The remote CI 八问 (this run):
Verdict: 冲突已清(force-push |
kernel-change: fix input-parse misclassification of truncated stringified content arrays
The host side cannot solve this: the misclassification lives entirely in the kernel's compress-input parser (
kernel/src/parse-compress-input.ts). No host change is needed — the hostargCorruptionreceipt (src/stream.ts) already exists and fires correctly once the kernel reportskind=truncatedwithdiagnostics.lengthset.Problem
The vLLM-style gateway stringifies the compress
contentarray, socontentarrives as a JSON string of the array. When that string is cut mid-stream (the model's call truncated in flight), the prefix is a clean JSON-array start followed by EOF. The line-form fallback misread the JSON prefix as headerless prose and reportedcontent-not-array(object entries) orno-valid-ranges(string entries), with a misleading "wrap it in square brackets" hint — steering the model away from a format that was legal all along. The model then abandoned a valid format and re-issued in a different one, losing the work.Fix (3 facets, all in
kernel/src/parse-compress-input.ts)salvageContentEntriesrecovers complete depth-0 STRING entries (not just{...}objects). A partial trailing string is dropped, never guessed.[ANDlooksTruncated(unbalanced brackets / unterminated string = the mid-stream cutoff signature), classify astruncatedviafinishSalvageinstead of the line-form ladder. The gate fires ONLY on the truncation signature — balanced-but-malformed input keeps today's path (no regression).diag.length+rawPrefixfor a truncated stringified content array so the hostargCorruptionreceipt fires instead of the misleading array-wrap hint.Kernel version bump
0.0.198 → 0.0.199(CI-enforced forkernel/srcchanges).Behavior change (old → new)
content-not-arraytruncatedno-valid-rangestruncatedtruncated(unchanged)truncated(now also recordsdiagnostics.length)ok(unchanged)ok(unchanged)content-not-array(unchanged)content-not-array(unchanged)The only behavior change is the intended fix: the misdiagnosed truncated cases now report
truncated(and setdiagnostics.lengthso the host receipt fires). No other path changes.Tests
New cases in
kernel/tests/parse-compress-input.test.ts(object-input path, the reported shape):truncated, 0 ranges,lengthset (wascontent-not-array).truncated, 1 range recovered,lengthset.truncated, first line-form entry recovered (facet 1),lengthset.truncated, 0 ranges,lengthset (wasno-valid-ranges).ok, 2 ranges,lengthundefined (no regression).[]→content-not-array(EOF gate must not fire on balanced input); non-array prose →content-not-array.All 107 tests in the file pass; full kernel suite (1647 tests) green;
npm run typecheckclean.Review tier
Kernel change — human-only review tier (Kernel Boundary rule 3). No auto-merge.
Closes #6946