Repository navigation
fix: failed compress receipts name the live compressible span (#1026) - #1036
Conversation
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1036Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1036.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Port of PR #1008's head commit, slimmed to just the span hint: both failure receipts (no-valid-ranges and blocksCreated===0) append compressibleSpanHint() — the raw-ref span not covered by an ACTIVE block — so one retry lands on a valid range instead of re-issuing refs an earlier fold consumed. Boundary counts active blocks only (decompress releases it); exhausted fallback names real active block ids for a higher-tier b-range fold (kernel-first-class). Co-authored-by: asuan-dev <asuan_10907@163.com>
49cbd4c to
c56fd04
Compare
[bot] 🏷 Reviewed PR #1036 — verified, rebased onto current master, green. Ready for a human merge (I can't merge PRs — system rules forbid it). Diff review (first gate: cleanliness) — 3 files, +123/−2, every line serves #1026:
Correctness checks:
Rebase (was required): the PR base (3adc9ac) was stale — master moved under it (release v0.1.127 + PR #867 Google wire). Rebased the single commit onto current master (c366828): zero conflicts, byte-identical diff, pushed with Pre-flight on the rebased head (not just the original SHA):
Two non-blocking observations (left as-is, your call):
结论(中文摘要):已核对 diff(干净、每行都服务于 #1026)、验证了内核契约与两种压缩模式,把 PR rebase 到最新 master(c56fd04)并在其上重跑 typecheck/test/build 全绿——修复了失败压缩回执缺少"当前可压缩区间"提示导致模型反复重试死区间的问题,可以合并。 |
[bot] 🏷 CI update on rebased head c56fd04: all 8 checks passed ✅ — build-artifact, version-guard, both codex e2e runs, and the full test matrix (ubuntu 22/24, windows 22/24). Nothing left outstanding on my side; the PR is ready whenever you merge it. CI 全绿(8/8),rebase 后的 c56fd04 上构建、版本守卫、codex e2e、双平台测试矩阵全部通过,可以合并。 |
Fixes #1026
Slimmed maintainer port of #1008 (credit: @asuan-dev — the idea, the head commit, and the kernel-error analysis are theirs).
What
Both failed-compress receipts —
no valid ranges parsedandblocksCreated === 0— now append a live compressible span hint: the raw-ref range NOT covered by an ACTIVE block right now:When nothing raw is compressible, the receipt names the active blocks' real ids instead:
Why (#1026)
A model whose compress fails keeps anchoring on refs an earlier fold already consumed: it re-issues the same dead range, burns retries, then gives up and lets the nudge re-fire every turn (observed live 2026-09-18: three consecutive failed compresses, two full T1 checkpoints wasted). Kernel errors say "run acp_status" — still one extra round-trip. The hint hands over the live span directly; one retry recovers.
Coordinates with the #849 repeat-failure guard: the guard forbids repeating the same dead ranges; the hint supplies the live ones.
Notable details
endRefamong ACTIVE blocks only → after a decompress, the restored span shows as compressible again (exactly the recoverable truth).effectiveMessageIdsand merge into a higher tier (verified against acp-kernel directly).Pre-flight
npm run typecheck✅npm test— 2029 pass / 0 fail / 2 skipped ✅ (5 new tests intests/compress-span-hint.test.ts)npm run build✅