Repository navigation
[PR] Put each compression summary at its fold point; the old slot keeps a pointer instead of a full compress command (compressAtFoldPoint v2) - #5949
Conversation
…the pair stays in its slot with pointer args (#5470 follow-up) v1 moved each still-visible compress call/result pair verbatim to its fold point. With the knob ON that leaves a mid-history wall of fully-shaped compress interactions, which weak-attention models (qwen3-27b) read as an invitation to keep compressing — observed as voluntary re-compress loops even while the ledger showed healthy headroom. v2 keeps exactly what the model needs at each spot: - the SUMMARY TEXT (args content) is re-emitted as a plain user text carrier at the fold point it describes ('[bili fold summary — block(s) bN …]'); - the pair KEEPS its chronological slot; the call core's args are replaced by a short pointer ('compression succeeded — summary relocated …; already folded — do not re-compress'), so it no longer reads as an open command; - the result core is forwarded verbatim (compression still 'succeeded'). View-only and deterministic as before; idempotent via carrier id (acp_reloc_<callId>) plus an args marker probe (survives host round-trips that strip synthetic ids). The call core rewrite is a shallow clone — input cores are never mutated. Boundary rule, ambiguity skips, #4732 tail fallback and the predicate-gated thinking clear are unchanged. kernel-change: fold-point relocation semantics v2 (owner-directed fix after live mis-behaviour analysis on a dev lane); kernel 0.0.187 → 0.0.188.
Follow-up to 2dd1f997c: the v2 fold-point carrier (plain user text carrying the relocated summary) had NO checkpoint protection — a plain message-ref compress range could fold it as if it were ordinary user text, re-distilling a summary whose source history is already folded away (#335's exact hazard). The carrier now carries summaryOfBlockId = the anchor block of the pair (first block; multi-block pairs virtually always get consumed together by the block-ref distillation that spans them). While the anchor is active: - recommend.ts screens the carrier as a protected gap — no advertised range bridges it; - unit-projection carves it out of any hand-rolled plain range (it stays visible, with the existing warning pointing at block refs); - once the anchor block is consumed by a block-ref distillation — which sees and absorbs the carrier text into the new summary — the carrier goes stale and folds like ordinary text: the RESULT remains compressible, the SUMMARY cannot be silently re-distilled as plain text. v1 (pair moved verbatim) had the same gap; nothing marked the moved pair. kernel-change: carrier protection hook-up (#335 predicate); 0.0.188 → 0.0.189.
📦 Built Package ArtifactBranch: Latest build — install this exact versionThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
Install instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — 本线程只有一个 [PR] 行(mirror #5951 → GitHub PR #5949),无并列修复 PR,未另开分支。 标签: 按 [PR] 规程处理:没有重做工作,拉取活分支核对代码 + 实时确认 CI。以下为核对面(全部为今日实时查证,非记忆): Live state (verified just now)
Code review findings
两处小发现(均不挡合并)
结构化八问(PR 审核结论)
收工判定:代码与描述逐项吻合、CI 在该树上全绿(含清理后的最新 check-run 全 success/skipped)、版本纪律合规、无回归发现——我这边判定可合并,合并动作留给 owner(「马上合并」标签已在)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1097-master.d70e6e2 # this exact build
npm install -g billion-context@master # always the newest merged build
|
…sis, ranxianglei#5949 relocated fold summaries, ranxianglei#5971 codex lane fixes, ranxianglei#5961 compress-burst loop fix Advances the base from 848f59b to 33d4951 (20 commits, 43 files). The only overlap with this lane is src/pipe-free relay.ts; upstream touched the WS oversize diagnosis, outbound stamping and continuation refetch paths, while the lane's non-streaming compact egress sits at src/server/relay.ts:2103. Both survive — the auto-merge needed no manual resolution. Notable upstream commits adopted: - cc1e240 kernel: relocate-compress v2 — summary text moves to the fold point - e03cc4b Stop the compress-burst loop: ack fold-point pointer echoes - 725084b feat: context analysis — init size, nudge cadence, harvest acceptance - 3fcf41e fix(codex): answer WS-lane failures with object error frames (ranxianglei#4601) - 86aae0d fix(google): keep tool_result-first part order for Claude-through-Google - d3fab0d fix(codex): keep marketplace Git repos inside the codex overlay tmp - 50e4cdc fix(ci): sync root + kernel lockfiles to acp-kernel 0.0.189
…anxianglei#6132) Owner-directed full removal of the experimental compressAtFoldPoint / compressAtFoldPointClearThinking feature (v1 ranxianglei#5471 + unreleased v2 ranxianglei#5949): two distinct live pathologies in 9 days on its own target model family — 2026-11-08 voluntary re-compress loops (v1, ranxianglei#5949 field report) and 2026-11-10 authorship misattribution (v1 in v0.1.213 production: the pair's relocation left the turn's own answer text bare at the transcript tail, and a 27B model read its own last utterance as a user message, m00376 chain). - delete kernel/src/relocate-compress.ts + kernel/tests/relocate-compress.test.ts - drop the relocate-compress-carriers pipeline node (after hide-compress-calls, before view-latch) and its registration - drop Config.compressAtFoldPoint / .compressAtFoldPointClearThinking / .reasoningDroppable and the public relocateCompressCarriers/plan exports - drop the already-folded-echo parse kind + v2 pointer marker (parse-compress-input.ts) and the two echo tests - kernel 0.0.192 -> 0.0.193 (both package-locks) kernel-change: removed relocate-compress.ts, the pipeline node, 3 Config fields and the public exports (full feature removal, owner decision after the 2026-11-10 incident, ranxianglei#6132); with the switch off the transform was a byte-identical no-op, so removal changes nothing for the default layout. kernel 0.0.192 -> 0.0.193. Closes ranxianglei#6132 (kernel side; host/web/docs follow in the next commit of this PR)
…#6132) Companion to the kernel removal: strip the experimental fold-point relocation feature (v1 ranxianglei#5471 + unreleased v2 ranxianglei#5949) from everything else. - env knobs BILI_COMPRESS_AT_FOLD_POINT(_CLEAR_THINKING) + resolvers (knobs.ts), file keys compress.compressAtFoldPoint(_ClearThinking) (config.ts: CompressSettings fields, COMPRESS_SETTING_FIELDS, parser loop), compress-settings.ts cascade/pass-through/reachability, relay.ts round-2 mirror + drop-predicate install, the four prepare* install sites, plugin-render.ts S4 mirror, makeFoldPointReasoningDroppable (server.ts), the v2 already-folded-echo ack in stream.ts - stale configs: one-shot INERT deprecation warning extended to the two removed keys (every level incl. top-level), values ignored - web config row + i18n strings (en/zh), config-reference yaml, site docs, site i18n strings, blog post + article entries deleted (owner instruction) - docs configuration en/zh + lifecycle ledger (rows removed, §5 note), CHANGELOG entry - tests: delete tests/compress-at-fold-point.test.ts, drop the echo test from compress-reject-reasons.test.ts, extend removed-compress-keys-inert with the removed fold-point keys Closes ranxianglei#6132
kernel-change: fold-point relocation semantics v2 + live-carrier protection hook-up — owner-directed fix in session 2026-11-08 (dev-lane live mis-behaviour analysis: weak-attention model read the v1 mid-history wall of fully-shaped compress exchanges as an invitation to keep compressing; voluntary re-compress loops while the ledger showed healthy headroom).
What was wrong
With
compressAtFoldPointON, v1 moved each still-visible compress call/result pair VERBATIM to its fold point. That leaves a mid-history wall of fully-shaped compress interactions (call args = full summary + range, result = success receipt). Weak-attention models (qwen3-27b) imitate shapes: they kept issuing new voluntary compress calls against already-folded ranges, got refused by the existing guards (requireNudge / out-of-bounds), retried the same call verbatim — a refuse-loop that burned ~78k input tokens per attempt (observed live on a dev lane, 8 refusals stacked in one history).What this PR changes (v2)
[bili fold summary — block(s) bN …; relocated from compress call <id>]+ the summary body. The content the model needs to re-read sits where it needs it.compression succeeded — summary relocated to its fold point above; already folded — do not re-compress. No fully-shaped compress command remains in the wall.The summary cannot be re-compressed as plain text (#335 hook-up)
Follow-up commit: the new carrier rides the existing live-checkpoint-carrier protection (
summaryOfBlockId= the pair's anchor block):v1 had the same gap (the moved pair carried no protection either).
Invariants kept
acp_reloc_<callId>PLUS an args-marker probe (survives host round-trips that strip synthetic ids).Verification