Repository navigation
[PR] fix: steer compress partial-failure recovery back to one batched call (#1523) - #1526
ranxianglei wants to merge 1 commit into
Conversation
…#1523) v0.1.163's droppedEntriesNote receipts taught serial recovery: the truncated variant said 're-issue the missing range(s)' without a batch instruction, and the invalidItems variant said 'in a new compress call' (singular). In lossy gateway sessions (#1495) each big batch then triggered explicit negative feedback plus per-range guidance, so models rationally converged to one-range-per-call — N serial proxy round-trips instead of 1. Both variants now steer back to ONE batched call ('batched with everything else still pending — never one range per call'). The truncated variant additionally offers the gateway-resilient shape: carry the whole batch as a single plain-string content (line-form segments, blank-line separated), which kernel splitLineEntries parses and which has no array structure for a lossy gateway to cut. Test anchors updated in tests/issue1495-partial-compress-drop.test.ts and tests/issue1494-compress-params.test.ts. Clean-call receipts unchanged.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1468-pr.1526.b4716d0This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1526.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Review of PR #1526 (head c459646) — pulled the branch, audited the code, checked CI. Conclusion below; one blocker found during duplicate screening. ① Original issue — direction ✅Issue #1523 (source-marked from #1495) is correct and well-layered: the post-v0.1.163 serial-call regression is produced by the recovery wording itself ( ② Regression review — behaviors on touched paths
③ Code / ④ Tests / ⑤ Diff
⚠ Blocker: overlap with open PR #1520 (same root cause, same lines)Duplicate screening surfaced PR #1520 ("fix(compress): teach ONE-call single-string re-issue in loss receipts", opened 2026-09-27T15:45Z — ~9 min before issue #1523 was opened, per the owner's #1495 re-review). It fixes the same defect in the same function, and both PRs edit the identical lines in src/stream.ts — they cannot both merge without a textual conflict. Differences:
Both are CI-green and base-current. Not identical (scope + wording differ), so I'm keeping both open rather than closing either — owner decision needed on which is canonical. My recommendation: take #1520 as canonical (earlier, superset coverage — the two total-failure receipts carry the same defect class and #1526 leaves them untouched, and it's coordinated with the kernel-side teaching), optionally folding in #1526's sharper "never one range per call" phrasing; if you prefer #1526's wording instead, fold #1520's two total-failure-receipt additions into it. Verdict: technically complete and mergeable as-is, but hold for the #1520-vs-#1526 call. Also stays human per the auto-merge gate (model-facing receipt wording = product decision). 中文摘要:PR #1526 代码正确、CI 全绿、干净回执逐字节不变(已验证),但查重发现更早的 PR #1520 修的是同一根因且覆盖面更大(4 处回执 vs 2 处)、还配套了 kernel 侧改动,两个 PR 改同一批行无法同时合并——请 owner 拍板以哪个为准(建议 #1520 为主、吸收本 PR 的措辞),在此之前先搁置合并。 |
|
深审:✅ 可合——src 措辞精确落实 #1523 的修复建议,测试锚点齐,零越界。 验证
细节核过
无阻塞项。 |
[bot] 🏷 收到深审结论,无异议——我这边也零阻塞。补两条我复核后的事实更新(不影响「可合」判定):
剩一个待你处置的小尾巴:PR #1520 仍开着。若 #1526 先合,#1520 会在 中文摘要:确认深审「可合」结论,补充核实了 master 前移后本 PR 仍零冲突可直接合并、kernel 0.0.98 配套已落地,并提请 owner 决定重叠的 PR #1520 是关闭还是缩成小 follow-up。 |
|
(ai: zhipuai-lb/glm-5.3) 陈旧票清理(第三批动作①):目标 issue #1523 已关。为避免重复劳动关闭本 PR;如判断有误请直接 reopen 并留言。 |
What changed
droppedEntriesNote(src/stream.ts) — the partial-failure receipt appended tocompresstool results when a submitted batch is only partially salvaged — taught serial recovery in both variants:In lossy-gateway sessions (#1495: long JSON arrays stringify/truncated by the gateway), every big batch then produced explicit negative feedback plus per-range recovery guidance, so models rationally converged to one range per call — N serial proxy round-trips instead of 1. That is the post-v0.1.163 regression reported in #1523.
Both variants now steer back to ONE batched call: "batched with everything else still pending — never one range per call." The truncated variant additionally offers the gateway-resilient shape: carry the whole batch as a single plain-string
contentinstead of an array — line-form segments (mNNNNN–mNNNNN optional topicheader + summary lines, blank-line separated), which kernelsplitLineEntriesparses and which has no array structure for a lossy gateway to cut (the only surviving param shape in the #1495 session).Test anchors updated: tests/issue1495-partial-compress-drop.test.ts (both variant assertions extended) and tests/issue1494-compress-params.test.ts:119 (old singular anchor replaced).
Behavior change disclosure (model-facing receipt text)
Intended per #1523 (the old wording IS the defect). Clean-call receipts are byte-unchanged (pinned by the existing "clean call" test, still green). No config surface, wire protocol, persistence, or dependency changes.
Pre-flight (on rebased head, master 86e0b68)
npm run typecheck✅npm test: 3001 pass / 0 fail / 12 skipped (default-gated E2E) ✅npm run build✅Fixes #1523