Repository navigation
[PR] fix: Disable the "Continue Compressing" recommendation in the compression receipt by default (compress.postComPressTail) | fix: 压缩回执的"继续压缩"推荐默认关闭(compress.postComPressTail),开启后未覆盖提示每轮最多一次 - #7415
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11115-pr.7415.9277f91This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7415.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…efault off)⚠️ MODEL-FACING TEXT CHANGE — the success compress receipt changes what the model reads: with the new default (compress.postComPressTail off, the pre-existing behavior is NOT the default), the receipt no longer re-advises the remaining foldable ranges after every successful fold, and no longer emits the 'Uncovered history remains' audit note. With it on (explicit opt-in), the range list is restored and the uncovered note fires at most once per nudge-injection cycle (fresh injection re-opens it). The verbatim context-minimum stop signal is unchanged in both modes. Consumption-chain reasoning (#6855 discipline): the removed text carried the only forward-pointing refs the model propagated into its NEXT compress call (startId/endId copied from the 'Current compressible ranges' list). Removing it removes the propagation anchor entirely — no phantom-value class possible. Nothing else in the receipt is altered byte-wise; the stop-signal sentence (#1387) is preserved verbatim, so models that key on it see identical text. The per-turn growth nudge (KDD #8) is a separate channel and untouched. Why: per-receipt re-recommendation drove models into endless fold loops against explicit user stop requests (#7318: 200+ folds in one night on a 0.1.216 build; #6522 '不要连续推荐' and #5872 are the same family — the receipt footer drives single-message retry folds). Each fold rewrites the context prefix and re-bills the prompt cache. config surface (#1437 discipline, owner decision in-thread 2026-11-20): adds compress.postComPressTail (boolean, default off) to the existing three- level compress hierarchy (global/provider/model via mergeCompress); boolean only (non-boolean rejects the whole block like the sibling requireNudge / requireRecommendation); no new env var (knob goes through the existing compress file hierarchy, env-discipline #2030). Docs: config-reference seed entry + regenerated configuration.md en/zh/ja + website. Plumbing: the flag is stamped per round on session.transient next to the existing nudge gate (src/unprompted-gate.ts) and read at the tail decision point in src/stream.ts — off by default when a session has no stamp (defensive: never recommend on an unknown posture). The #6522 at-most-once latch rides on an in-memory Session field (uncoveredReceiptNoted), re-opened only by an actual nudge injection. Fixes #7318 (design: default off); implements #6526's at-most-once note (that PR is superseded — its change was unconditional, this one is gated). Supersedes: #6526
59dadb1 to
d401a28
Compare
…t minimum (#7318) The #7318 anti-nag latch (session.uncoveredReceiptNoted) made a latched fold fall through to the "No compressible ranges remain" stop signal even when a >=10K-token run still sat outside every active block — a false "at its minimum" claim that breaks the #4331 honesty contract (the pre-#7318 code always returned the uncovered note in that case, never the minimum claim). Return "" (honest silence) instead: the detail stays available on demand via acp_status(scope:"uncompressed"). Update the N2 regression test to assert the silence rather than the false claim.
[bot] 🏷 PR #7415 审核结论(八问)是什么问题:#7318——压缩成功回执尾部的"继续压缩"推荐(剩余可折范围列表 + "Uncovered history remains" 提示)把范围 ref 直接递给模型复制进下一次 compress,叠加成 compress→note→compress 循环(0.1.216 一晚 200+ 次折叠,用户已明确说停仍每轮重推)。 什么原因导致的:回执的范围列表是模型持续折叠的传播锚点——模型逐字复制 ref 进下一次调用;未覆盖提示(每次 ≥10K token 未覆盖就发)叠加形成循环。每次折叠改写上下文前缀并重新计费 prompt cache。根因是"回执每轮重新推荐",不是"模型不听话"。 影响范围与严重程度:所有用户(回执对所有会话展示)。严重度中高——循环驱动 200+ 次折叠/晚,浪费算力 + 重复计费;但非数据丢失/不可用,用户明确说停时模型仍可停止(主要是浪费 + 体验)。 怎么修复的:推荐整体默认关闭(新开关 是否有回归问题:审了回执全部分支。发现并修复一个 #4331 诚实性回归(已推 commit 是否破坏缓存:不破坏,反而改善——默认 off 时回执更短(无范围列表),循环减少 → 前缀改写减少 → prompt cache 更稳。 是否改了设计方向:无架构变更。新增一个 config 开关 + 一个内存 latch。方向合理(推荐 opt-in,与 是否引入了新的配置:是, 回归审查(既有行为清点):
测试有效性:新 diff 整洁度:原 PR 20 文件 348 增 10 删;我的修复 commit CI 状态:新 head 合并判定:方向合理、回归已修、测试有牙、diff 干净。默认行为变更(推荐默认 off)属产品决策,不能 auto-merge(§7.4:fallback/default-value change 必须 human)。等 CI 全绿 + owner 拍板后可合。#6526 可关(本 PR supersedes)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1242-master.e691e6e # this exact build
npm install -g billion-context@master # always the newest merged build
|
master e691e6e (PR ranxianglei#7415, 3 commits / 20 files) touches the compress receipt "fold more" recommendation and the uncovered-note fold silence. Six of its files overlap this lane (three configuration docs, the compress seed, website/docs/index.html, website/main.js); all auto-merge with no hand resolution. Verified on the merged tree: kernel build ok, tsc only the five pre-existing @deepseek-ai/cordis farm errors, five gates ok, config docs idempotent (no diff), lane anchors intact (isDraftDump at src/plugin.ts:3027, src/plugin.ts:4810, src/loop/core.ts:1300; endsWithAnnouncement 6 hits; endsWithDraftClose only its definition; MYSQL_SCHEMA_VERSION 11 at src/storage/mysql.ts:77). Suites: issue5175 66/0, tag-echo 79/0, issue2190 32/0, issue3905 19/0, issue7318 6/0, issue2929 1/0, native-compact-terminal 1/0, notice-registry 5/0, plugin-fork 58/0, issue5403 1/0, issue4666 2/0, issue4739 4/0, issue4788 4/0.
Brings in PR ranxianglei#7415's follow-up batch: a kernel compress receipt that no longer double-claims a batch seam, third-party scan hardening, and the per-turn pf window ledger full-path coverage. Overlap with this branch is limited to the three generated configuration docs, which auto-merged.
compress.postComPressTail关)时,回执不再在每次成功折叠后重新推荐剩余可折叠范围,也不再发 "Uncovered history remains" 审计提示;显式开启后恢复范围列表,且未覆盖提示每个 nudge 注入周期最多发一次(新注入重开)。上下文已耗尽时的逐字停止信号(#1387)两种模式都逐字保留;每轮增长 nudge(KDD #8)是独立通道,不受影响。现象与根因
#7318(0.1.216 构建,一晚 200+ 次压缩折叠):模型每次 compress 成功后,回执尾部的
Current compressible ranges (use these refs exactly as listed):列表把范围 ref 直接递给模型复制到下一次调用——这是模型持续折叠的传播锚点。用户已明确说停,回执却每轮重新推荐;未覆盖历史提示(每次 ≥10K token 未覆盖就发)叠加形成 compress→note→compress 循环(同族:#6522「不要连续推荐」、#5872 回执驱动单消息重试)。每次折叠改写上下文前缀并重新计费 prompt cache。修法(按 owner 2026-11-20 定夺)
compress.postComPressTail(boolean,默认 off),off 时回执对"还能折什么"保持沉默——不列范围、不发未覆盖提示、也不发"已到底"假声明([Bug] compress reports 'no compressible ranges remain' while mid-history spans sit outside every block #4331 诚实性)。session.uncoveredReceiptNoted内存闩,发一次后闩住;真实 nudge 注入(nudgeOutcome === "injected")重开闩——新 nudge 意味着上下文又涨到了该顺手压缩的时刻;重启复位,至多多发一条。session.transient(src/unprompted-gate.ts,与requireNudge/requireRecommendation同缝);无盖戳 = off(防御性默认:未知姿态不推荐)。消费链推演(#6855 纪律):被删文本里唯一的前向传播锚点就是范围列表的 ref(模型逐字复制进下一次 compress 调用),删除即锚点消失,不存在 phantom-value 类;停止信号逐字未动,依赖它的模型看到相同字节;回执其余部分字节不变。
config surface
compress.postComPressTail:boolean,默认 off,进入既有mergeCompress三级合并(model > provider > global)。compress层级没有"回执推荐"开关;requireNudge管的是拦截越界折叠,方向相反;nudge 文案/节奏由 kernel 拥有(KDD feat: release CI (npm auto-publish on release branch) #8)不该为此改。requireNudge/requireRecommendation一致:整块拒绝。website/config-reference/compress.yaml种子条目 +gen-config-docs重新生成 configuration.md en/zh/ja + website。测试
tests/issue7318-post-compress-tail.test.ts:6 用例双方向断言(Test Blind Spot Retrospective: Reinforcing Negative Assertion Discipline, Tightening Fake Upstream Strictness, Thin Inst | 测试盲区复盘:补反向断言纪律、假上游严格化、薄安装冒烟、形态矩阵与生命周期覆盖 #3617)——off 下部分折叠/耗尽+空洞/耗尽+排空三态,on 下列表恢复 + Uncovered history remains 不要连续推荐 #6522 闩周期(发一次→闩住→重开→再发),配置解析/合并单测。关系