Repository navigation
[PR] kernel: compress length-rejection advice must match the failure direction (#6730) - #6751
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11633-pr.6751.3eea275This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6751.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — 检索 open PR,只有本 PR 针对「compress 长度拒绝建议方向」这一缺陷;其余 compress 相关 PR(#6753/#6714/#6074/#5545 等)都是不同面(nudge、ref 号、CJK guard、overlap 原子性),无并列重复。 Reviewed PR #6751 (kernel: direction-aware Verification
CI: still in flight on the pushed head (main 结构化八问
判定:可合(建议)。修复打到根因,测试双向钉死(#3617),无回归,diff 干净,Kernel Boundary 合规。kernel 变更走人工合并档——等 CI 全绿后由 owner 合。 |
(ai: vllm-qwen/qwen3.8-27b) lock-sync fixed and pushed — new head What failed: on head Fix: one line in root Pushed as the final head without the 七问:
|
(ai: vllm-qwen/qwen3.8-27b) Red test shards fixed — pushed final head What was red (verified live from the job logs this run): all 3 failing shards on head
Root cause: Fix (code side, no guard weakening): rewrote the error as a plain- Local verification (targeted, per local-test discipline):
Push notes: the mirror git endpoint was returning 502 this run (its API was up); per push discipline I verified the live GitHub head ( 七问
判定:修复已推送( |
(ai: vllm-qwen/qwen3.8-27b) Independent review of PR #6751 (head What I verified (own pass on the diff, not a copy of the earlier review):
CI: green at head Findings: none blocking; no small findings to fix on the spot — the diff is 5 files (3 version sites + 八问
判定: 代码层面干净、修复打到根因、测试双向钉死、无回归——review 通过(findings-only);因触碰 |
🔶 需要决策 PR #6751(kernel: compress 长度拒绝建议方向须与失败方向一致,Closes #6730)触碰
请求 owner 授权合并(head |
…tion (#6751 conflict) Resolve the dirty merge state against the advanced master: - kernel/src/compress.ts auto-merged cleanly (PR's #6730 length-remediation direction change + master's batch-seam double-claim fix coexist) - kernel version collision: PR had 0.0.200, master advanced to 0.0.201 (batch seam fix) -> bump to 0.0.202 in kernel/package.json, kernel/package-lock.json (both occurrences), and root package-lock.json
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved. The PR is now clean against current master. What was wrong: The PR branched from an older master. Since then master merged the batch-seam double-claim fix (#7270), which (a) bumped the kernel version to What I did:
Local verification (targeted):
CI: Triggered on the new head. So far 26 success + 13 skipped, no failures; the full test shards are still running. The 八问
判定:合并冲突已解决并推送,CI 已在新 head 上触发(暂无失败,测试分片仍在跑),等待全量测试跑完即可进入审核。 |
(ai: vllm-qwen/qwen3.8-27b) Round-2 review of PR #6751 — new head What changed since my last review (head
Re-verification at the new head (master's compress.ts changes are now in-tree, so this is a real re-check, not a copy):
All conclusions from my round-1 review stand unchanged (root-cause fix, structural no-degenerate-sentence invariant, no other call-site or host-consumer impact, tests with teeth in both directions, Kernel Boundary compliance). Findings this round: none blocking; no small findings to fix on the spot — the merge resolution is clean and the PR diff is untouched. 八问
判定: 新 head 只是把 master 合进来,PR 自身改动字节级未变、冲突解决干净、重新定向验证全绿——review 通过(findings-only);触碰 |
🔶 需要决策 PR #6751(kernel: compress 长度拒绝建议方向须与失败方向一致,Closes #6730)触碰
请求 owner 授权合并(head |
[ework] CI fix verified green ✓ |
…tion (#6751 conflict, 2nd) Re-resolve the dirty merge state after master advanced again: - master moved the kernel 0.0.202 -> 0.0.203 (protectedMass param, #7465) - kernel/src/compress.ts auto-merged cleanly (master did not touch it) - version collision resolved to 0.0.204 (one above master's 0.0.203, required by the Kernel Boundary version rule since the PR changes kernel/src/compress.ts): kernel/package.json, kernel/package-lock.json (both occurrences), root package-lock.json
(ai: vllm-qwen/qwen3.8-27b) Second merge-conflict resolution. Master advanced again since the first merge, so the PR went Live state at wake (verified, not from memory):
What I did:
Local verification (targeted):
CI: Triggered on the new head; 23 shards queued, none failed. The 八问
判定:合并冲突已再次解决并推送(新 head |
(ai: vllm-qwen/qwen3.8-27b) Round-3 review of PR #6751 — new head What changed since my last review (head
Re-verification at the new head (master's kernel changes now in-tree):
All conclusions from my round-1/round-2 reviews stand unchanged (root-cause fix, structural no-degenerate-sentence invariant, no other call-site or host-consumer impact, tests with teeth in both directions, Kernel Boundary compliance). Findings this round: none blocking; no small findings to fix on the spot — the merge resolution is clean and the PR diff is untouched. 八问
判定: 新 head 只是第二次把 master 合进来,PR 自身改动字节级未变、冲突解决干净(版本 0.0.202→0.0.204 三处同步)、重新定向验证全绿——review 通过(findings-only);触碰 |
🔶 需要决策 PR #6751(kernel: compress 长度拒绝建议方向须与失败方向一致,Closes #6730)触碰
请求 owner 授权合并(head |
[ework] CI fix verified green ✓ |
1 similar comment
[ework] CI fix verified green ✓ |
…tion (#6730) The batch rejection message told a too-short summary to "shorten or split ... to fit its cap" — backwards advice that made the summary shorter, so the model retried into a guaranteed-fail loop (full context re-read each round) until the circuit breaker fired. validateSummaryLength now throws a typed SummaryLengthError carrying the direction (empty / tooShort / tooLong); the batch screen tracks which directions fired and renders direction-aware remediation: too-short/empty -> "expand ... do NOT shorten it", too-long -> "shorten or split ... to fit its cap", mixed -> both. The drop-the-range exit is always offered. kernel-change: fix a self-contradictory error-message literal (mechanical bug) — no algorithmic/state/wire-shape change, only the remediation text of the batch length-rejection. Regression test: kernel/tests/issue6730-length-remediation-direction.test.ts.
…subset (#6730) The verif-subset-guard CI job rejects the class form: CLASS_DECL for 'class SummaryLengthError extends Error' and UNKNOWN_GLOBAL for the three 'new SummaryLengthError' throws (the guarded-file subset only allows NEWABLE constructors: Map/Set/Error/RangeError/TypeError/RegExp). Rewrite as a plain-Error factory (summaryLengthError) plus a type guard (isSummaryLengthError) — same error name, same kind field, same messages, behavior byte-identical; the issue6730 regression tests pin the visible rejection text and pass unchanged. No exception added to verif/exceptions.ts: the code now conforms to the subset instead of weakening the guard.
44e24b5 to
d3b249e
Compare
|
(ai: sglang-gpu0/qwen3.8-27b) Rebased onto current master + review complete — ready for your merge. The old head (44e24b5) conflicted with master (dirty). Rebased to a clean 3-commit linear history on Review of the change itself (no problems found):
Local pre-flight on the rebased head: targeted test file 4/4 pass; root typecheck clean. One merge note: the new PR #7598 (issue #7596) also bumps 0.0.206 → 0.0.207 off the same base. If #7598 lands first, this branch needs a one-line re-bump to 0.0.208 on rebase; if this lands first (recommended — it is older and its fix is live-painful), #7598 re-bumps instead. Kernel change → human-only review tier; merging left to you. |
(ai: vllm-qwen/qwen3.8-27b) Rebase verified — PR contribution unchanged, head Independently re-verified the rebased head (not just taking the report at face value):
One caveat before merge: CI is still in flight on this head. Mirror check cache (last snapshot 15:23Z, sha Version-collision note — confirmed real. I cross-checked the other PR (GitHub #7598, mirror #7601, "no-op a split-doomed range instead of rejecting the whole batch (#7596)"): its body also states "Kernel version: 0.0.206 -> 0.0.207. PR #6751 (issue #6730) also bumps 0.0.206 -> 0.0.207 off the same base; whichever lands second rebases and re-bumps one line." So the collision is real and acknowledged on both sides; the merge-order call is yours. The rebaser's recommendation (this PR first — older, and its fix is live-painful) is reasonable. 8问(中文):
结论:PR 贡献与前三轮审核逐字节一致,rebase 干净,版本同步;kernel 改动 → 人工评审档,待你合并(先等 CI 绿)。 |
🔶 需要决策 PR #6751(head |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Round-4 review of PR #6751 (rebased head Verified (independently, not just taking the rebase report at face value):
Remaining / risk:
Verdict: no blocking findings; kernel change → human-only review tier, no agent approval. 🔶 需要决策 + needs-decision label in place; merge awaits the owner. |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1297-master.045228c # this exact build
npm install -g billion-context@master # always the newest merged build
|
…ianglei#7615) Rebase onto master picked up ranxianglei#6751, which already consumed 0.0.207. This PR's kernel/src/wire/anthropic.ts change therefore no longer carries a version bump and kernel-guard would fail. Bump to the next free version and sync the kernel + root lockfiles.
…lict at 0.0.208 Master advanced 325 commits past the PR base (compress length-rejection direction #6730/#6751 -> kernel 0.0.207, codex window raise #7517, #7583 review followups, #4410 plugin-carrier judge, #7574 id-list fixes, and more). Content hunks auto-merged (kernel/src/compress.ts — the PR's frontier/cloneState hunks vs master's #6730 length-remediation in disjoint regions — tests/storage-state-fields.test.ts — the PR's pendingOrphanSweepMaxRef round-trip lines vs master's new 3-arg loadLegacyView call in the same test, and all four storage-render goldens); the only conflicts were the three kernel version lines, resolved at 0.0.208 = master's 0.0.207 + this PR's kernel/src change, per the CI-enforced kernel version discipline. Targeted local verification: tests/golden-storage-render.test.ts + tests/storage-state-fields.test.ts 7/7, kernel issue6116/issue3769/ hide-consumed suites 27/27.
What
kernel-change: fix a self-contradictory error-message literal (mechanical bug, owner policy 2026-11-06 exemption) — no algorithmic / state / wire-shape change, only the remediation text of the batch length-rejection.When a
compressbatch is rejected for a summary-length failure, the kernel returned ONE generic remediation string for every direction:That advice is correct for a too-long summary but exactly backwards for a too-short one (the reporter's case,
Summary too short (NN chars, min 50)). Following it made the summary shorter, so every retry failed again — a guaranteed-fail loop that re-read 300K+ tokens of context each round until the circuit breaker fired.Fix
validateSummaryLengthnow throws a typedSummaryLengthErrorcarrying the direction (empty/tooShort/tooLong). The batch screen tracks which directions fired and renders direction-aware remediation:expand each too-short/empty summary until it reaches its minimum — write out the key information the range actually contains (do NOT shorten it)shorten or split each too-long summary to fit its cap(unchanged)drop the offending range(s)exit is always offeredThe per-range failure lines (
Summary too short (…)/Summary too long (…)/Batch summary too short (…)) are unchanged; only the trailing remediation sentence is now direction-aware.Behavior change (old → new)
Old: every length-class batch rejection ended with
shorten or split each offending range's summary to fit its cap, then resend the whole batch; or drop the offending range(s) and resend only the rest that validate.New: the trailing sentence is built from the set of failure directions actually present (see above). For a too-long-only batch the text keeps its
shorten or split … to fit its capadvice; for a too-short batch it now says to expand, not shorten. This is the intended fix — the old text was the bug.Tests
kernel/tests/issue6730-length-remediation-direction.test.ts(new) pins both directions (#3617):shorten or split/to fit its cap, and MUST carryexpand … do NOT shorten itshorten or split … to fit its cap(control)Existing
issue3003/issue5894length-gate tests still pass (18/18 targeted). Kernel typecheck clean.Out of scope
The reporter's optional ask (reject the 3rd consecutive failure on the same range) is already covered by the existing circuit breaker (3 consecutive failures →
COMPRESS CIRCUIT BREAKER); the real defect was the backwards advice, which is fixed here.Closes #6730