Repository navigation
[PR] fix(compress): teach ONE-call single-string re-issue in loss receipts - #1520
ranxianglei wants to merge 1 commit into
Conversation
…#1495) Owner re-review on #1495: after the honest-loss receipts, models stopped batching — the lossy gateway killed their array calls, so they rationally retreated to one-range-per-call, multiplying compress turns. The kernel parser has always accepted ONE plain string carrying MULTIPLE ranges (each block starting with its refs header line); teach that form exactly where the model is recovering from a loss: - truncated-salvage receipt: re-issue ALL missing ranges TOGETHER in ONE call as a single plain string - multi-entry rejection receipt: same teaching (n>1 only; the n=1 text stays unchanged) - unparseable-JSON receipt: mention the plain-string content escape - no-valid-ranges format lecture: document the multi-range string form Pinned texts updated deliberately (compress-observability #1366 lecture tail); 2 new tests pin the batch teaching.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1464-pr.1520.2b80023This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1520.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Review complete — mergeable. Verified on a local rebase onto current master ( ① Direction (original issue) — correct, and I verified the load-bearing claim rather than taking it on faith. Owner re-review on #1495 (floor 6): after #1499's honest-loss receipts, models retreated to one compress call per range — functionally equivalent, but multiplied turns. This PR teaches the existing escape hatch where the model actually recovers from a loss (the 4 receipts), instead of patching symptoms elsewhere. Critically, I checked the pinned kernel: ② Regression review — existing behaviors on the touched paths, item by item:
③ Code — pure string edits plus one ④ Test validity — the new multi-entry rejection test has teeth: it submits ⑤ Diff cleanliness — 4 files, +28/−5, every line purpose-related; no version bump, no lockfile churn, no whitespace noise. No open-PR contention on these regions. Verdict: root-cause fix at the decision point (the receipts are exactly where the model decides its recovery strategy), backed by verified kernel support in the currently-pinned version, with regression teeth on both new branches. Safe to merge; the acp-kernel#472 pin bump can follow once that releases. 修复了 #1499 诚实回执引发的副作用(模型退回单区间逐次调用、压缩轮次膨胀):在 4 处损失回执中教会模型内核本就支持的「单个纯字符串承载多区间」批量重发格式,已验证当前锁定的 acp-kernel 0.0.97 确实能解析该格式、rebase 到最新 master 后全套测试通过,可以合并。 |
|
(ai: zhipuai-lb/glm-5.3) 陈旧票清理(第三批动作①):目标 issue #1495 已关。为避免重复劳动关闭本 PR;如判断有误请直接 reopen 并留言。 |
Fixes #1495
What
Owner re-review on #1495 (15:31): after the honest-loss receipts landed, models stopped batching compress and issue one call per range — the lossy gateway corrupted their array batches, receipts told them what was lost, and the transcript shows them rationally concluding "single-range LINE FORM is the most robust path". Functionally equivalent, but it multiplies compress turns and pollutes the conversation.
The escape hatch already exists in the kernel parser (
splitLineEntries): ONE plain string may carry MULTIPLE ranges, each block starting with its ownmNNNNN–mNNNNN optional topicheader line — no array nesting for a gateway to stringify, and truncation salvage recovers every complete leading block. It was simply never documented anywhere the model looks.This PR teaches that form exactly where the model is recovering from a loss (src/stream.ts, 4 receipts):
contentmay be ONE plain string carrying ALL rangesTests
Re-issue the compress call with a valid content array→Re-issue ALL intended ranges in ONE compress call).tsc -p tsconfig.build.json0; issue1494 + issue1495 + compress-observability 29/29; all applyRanges-touching files 138/138; issue1502 raw-args-salvage 7/7.Pairs with
Kernel side (tool descriptions + nudge hint teach the same form): ranxianglei/acp-kernel#472 — pin bump follows after that releases.