Repository navigation
[PR] fix: name non-compressible (zero-ref) compress lanes conclusively in the failure receipt (#3596) - #3605
ranxianglei wants to merge 1 commit into
Conversation
#3596) A dsh sub-agent lane replays its whole parent history as ONE opaque user message, so its own compression state carries ZERO mapped refs while the view is non-empty. The model cites the parent session's mNNNNN refs (rendered into the blob by the host); every one is necessarily unknown to this lane and NONE can ever resolve. applyRanges previously fell through to the generic per-ref "unknown" dump + a "stale-ref" cause label, which misleads the model into an acp_status/compress retry loop that can never succeed on a structurally incompressible lane. In the blocksCreated===0 path, when the session maps zero refs, return one clean conclusive verdict naming the structural cause and forbidding the retry, instead of echoing the per-ref unknown list. Complements #3126 (empty in-memory view): here the view is non-empty but addressable-free. Operator log keeps the full kernel text; the #2432 breaker still arms via the same failure tracking. Messaging-only: no change to compression behavior, wire shape, state, or the routing decided in #3601 (complementary bili-side fix for the mis-routed main-session calls).
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4253-pr.3605.60dc55eThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3605.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。关系核对:与 #3126(空 in-memory view 的拒收文案)互补而非重叠——#3126 的 Review 进行中:已通读 diff 与 |
(ai: vllm-qwen/qwen3.8-27b) Review 完成(独立审 diff,未复用 #3596 线程结论)。本地在 head 结构化八问
行为变更披露(旧→新):① 模型可见回执:逐条 unknown dump + 测试有效性:三个断言都有牙——负向断言钉住「不再逐条 spam、不再误标 stale-ref」、breaker 三连败跨不同 spec 仍 arm(防后续重构绕过跟踪)、refed 控制会话保持旧路径(防误伤);控制测试用前缀匹配 判定:可合入。唯一红 lane 为已知预存 flake(#3602),如想要全绿记录可在合并前重跑该 job;另注 PR 正文按设计不 close 任何 issue(根因在 dsh,#3596 继续作跟踪项),与仓库惯例的 |
Part of #3596 (bili-side secondary improvement ①). Complementary to #3601 (bili-side routing fix for the mis-routed main-session calls) — this PR does NOT touch routing.
What & why
A dsh sub-agent lane replays its whole parent history as ONE opaque user message, so its own compression state maps zero refs while the view is non-empty. The model cites the parent session's
mNNNNNrefs (rendered into the blob by the host); every one is necessarily unknown to this lane and none can ever resolve.applyRangespreviously fell through to the generic per-ref "unknown" dump plus a[cause: stale-ref]label, which misleads the model into anacp_status/compressretry loop that can never succeed on a structurally incompressible lane.Change
In the
blocksCreated === 0path ofapplyRanges(src/stream.ts), when the session maps zero refs, return one clean conclusive verdict naming the structural cause and forbidding the retry, instead of echoing the per-ref unknown list. Complements #3126 (empty in-memory view): here the view is non-empty but addressable-free. The operator log keeps the full kernel text; the #2432 breaker still arms via the same failure tracking.Behavior change (old → new)
For compress calls landing on a zero-ref lane (e.g. the #3596 sub-agent blob lane), the model-visible receipt changes:
[Compression FAILED: <per-ref "unknown" list> [cause: stale-ref — …] <hints>]— invitesacp_status/compressretries that always fail.[Compression FAILED: this conversation has N message(s) but ZERO addressable per-message refs, so NO ref can resolve here … Compression is structurally impossible on this lane — do NOT retry compress or call acp_status about it; continue the task.]Refed sessions are unaffected (a control test pins this). No change to compression behavior, wire shape, state, or routing.
Config surface
None. No new env/config/CLI field.
Tests
tests/issue3596-non-addressable-lane.test.ts: zero-ref lane gets the conclusive verdict (no per-ref spam, not mislabeled stale-ref); operator log retains the 0-ref signature; the breaker still arms over 3 consecutive failures; a refed-session control keeps the generic path. Related suites re-run green on the rebased head: issue2360, issue2146, issue2432, issue3126, compress-reject-reasons, issue847, issue1875, issue1029, compress-span-hint, fix-1124, loop-compress (80 tests). Typecheck clean. Full-suite verdict = remote CI.Closes nothing — the root cause is dsh's single-blob replay (tracked in #3596) and the routing half in #3601; this PR ships only the bili-side messaging slice.