Repository navigation
[PR] remove: the experimental compressAtFoldPoint feature — fold-point relocation (v1 #5471 + unreleased v2 #5949), #6132 - #6150
Conversation
…6132) Owner-directed full removal of the experimental compressAtFoldPoint / compressAtFoldPointClearThinking feature (v1 #5471 + unreleased v2 #5949): two distinct live pathologies in 9 days on its own target model family — 2026-11-08 voluntary re-compress loops (v1, #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, #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 #6132 (kernel side; host/web/docs follow in the next commit of this PR)
Companion to the kernel removal: strip the experimental fold-point relocation feature (v1 #5471 + unreleased v2 #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 #6132
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9038-pr.6150.4aea2bbThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6150.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 进度汇报(本会话曾因长时间无输出被平台强制重启一次,现已恢复,继续推进): 查重:不重复——open [PR] 行中只有本 PR(#6150)针对 #6132,无并行第二 PR。 已核实的当前状态(live 验证:head sha 确认未动,CI 快照取自已刷新的镜像缓存):
红因已钉死:guard 对 PR 正文做字面量匹配 代码审查结论(预览):两个 commit 的删除面干净彻底(kernel 节点/导出/Config 三字段/v2 echo kind、host 四个安装点、relay round-2 镜像、web/站点/文档/博客、lifecycle 台账、CHANGELOG 全对齐;残留键走一次性 INERT 警告且四层级命名有测试钉住)。发现 2 处移除后遗留的孤儿 import( 接下来:修 2 处孤儿 import + 定向测试 → 把 PR 正文的声明改回纯文本 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 审核收尾。本轮完成:① 修掉移除后遗留的 2 处孤儿 import( 结构化八问
行为变更披露(旧→新):① 显式开启用户的折叠点挪位布局 → 基线布局;② 上述 4 个配置键/env → 从生效变为忽略+一次性警告。原因:目标模型家族两次真实事故,owner 裁定移除(#6132)。 判定:代码侧已就绪,待 |
…+ tag-stripped body (#6160) The scripted queue key was conv|sourceText.slice(0,64) over the RAW last-user text, whose ACP render tag is volatile by design: the post-fold ledger alignment (#5608-D defers restampRefsToLedger to the next successful fold) renumbers old refs (m00001 -> m00015, refs-never-reused) and raises the #5608-C time-attribute high-water mark, so the very next request re-renders the same message with time= dropped. The 64-char key slice contains the tag, so one scripted turn split into two queues the instant a fold landed and the directive queue replayed from scratch — the #2791 tests' deterministic "compress must be CALLED exactly once (got 2)" on local node-25 and the intermittent red on CI (same SHA red and green across runs; the alignment no-ops when the unified store has no visible rows yet at the post-fold scheduleSave). The key is now conv|<source ref>|<stripAcps(source).slice(0,64)>: the ref names the message occurrence (stable for the turn; a remint voids the script anyway) and keeps byte-identical prompts distinct (switch/back both send 请调用probe_tool); stripAcps (existing helper) drops the volatile wrapper. One site (answerFor) covers all six suites sharing the fake. Verified locally (pi-stable 0.83.6): both #2791 tests green — the fold run's queue continues through the fold (probe -> compress -> acp_status, one call); full pass over native-pi/dsh/opencode/delegate-notify/subagent-sessions (the two remaining local failures reproduce identically on the unmodified fake: pre-existing local-environment artifacts). Closes #6160
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1171-master.33104b1 # this exact build
npm install -g billion-context@master # always the newest merged build
|
…6150 fold-point removal) Master independently bumped the kernel to 0.0.193 for the compressAtFoldPoint removal; this PR's overlap atomic-reject changes now sit on top of that, so the version must move again (max+1, same precedent as #5609 sync). Both lockfiles regenerated; diff vs master is only the kernel version lines.
New master content: #6132/#6150 remove the compressAtFoldPoint fold-point relocation feature (kernel + host + web + docs). Conflict resolved in src/server/prepare-openai.ts: - drop the fold-point thinking-clear block (its helper makeFoldPointReasoningDroppable no longer exists after #6132) - keep the PR's #5664 render-snapshot lane gate verbatim - RenderCaps.droppable pinned to false: with fold-point clear-thinking gone, reasoning blocks are never dropped at folds, so the render plane must account for them (previously mirrored the removed config flag compressAtFoldPointClearThinking)
… (clean auto-merge, incl. ranxianglei#6132/ranxianglei#6150 compressAtFoldPoint removal)
这是什么
按 owner 指令(2026-11-10,issue #6132 已附完整事故分析)整体移除实验性功能 compress-at-fold-point(
compress.compressAtFoldPoint/BILI_COMPRESS_AT_FOLD_POINT,v1 #5471 + 从未发布的 v2 #5949):它把重放视图中压缩产生的内容挪到折叠点处,9 天内在其目标模型家族(qwen3-27b 系)造成两次不同的真实事故——2026-11-08 的自发重复压缩循环(#5949 的现场报告,v2 的设计动机)和 2026-11-10 的生产会话作者误认(v0.1.213 = v1 语义:同轮「回答 + compress」被重放时,压缩对挪位后回答文本裸挂在 transcript 尾部,27B 模型把自己的最后一条发言当成用户消息,重复回答了自己的答案,错误认知还固化进了折叠块主题)。移除零迁移成本:开关 opt-in 默认关,关闭时布局 = 移除后布局(字节级一致);v2 从未进 tag(最新 v0.1.213 仍是 v1,
git tag --contains为空)。曾考虑直接git revert#5471:17 个文件冲突(v2 在 master 上改了同一批文件),否决,走正向删除。改动
kernel(0.0.192 → 0.0.193)
kernel/src/relocate-compress.ts+ 其测试;relocate-compress-carriers管线节点与注册Config.compressAtFoldPoint/.compressAtFoldPointClearThinking/.reasoningDroppable与公开导出already-folded-echo解析 kind + pointer marker(parse-compress-input.ts)host / web / 文档 / 站点
makeFoldPointReasoningDroppable(server.ts)、stream.ts 的 echo ackwarnInertRemovedCompressKeys,含 top-level 残留,各层级全命名),值忽略Config surface
移除键:
compress.compressAtFoldPoint、compress.compressAtFoldPointClearThinking(文件);BILI_COMPRESS_AT_FOLD_POINT、BILI_COMPRESS_AT_FOLD_POINT_CLEAR_THINKING(env)。实验性、默认关、线上仅 ~10 天(v1),v2 未发布。迁移:无需迁移(功能关闭 = 基线行为);残留键 = 一次性 INERT 警告 + 忽略值。kernel-change: 删除 relocate-compress.ts、relocate-compress-carriers 节点、Config.compressAtFoldPoint/.compressAtFoldPointClearThinking/.reasoningDroppable 与 relocateCompressCarriers/planRelocateCompressCarriers 导出——整功能移除(owner 裁定,#6132:9 天内两次目标模型家族上的真实事故,v2 未发布,移除零迁移成本;开关关闭时变换本就是字节级 no-op)。kernel 0.0.192 → 0.0.193(两个 package-lock 同步)。
预检(本地)
tsc --noEmit✅;kernel 全量测试 1621/1621 ✅tsc --noEmit✅;check-unused-exports ✅Closes #6132
附:CI 唯一红 lane 的修复(#6160)
本 PR 推送后,CI 唯一红的 lane(real pi package-native lane vs deterministic fake upstream,
e2e-native-pi的#2791两例compress must be CALLED exactly once)经排查非本 PR 引入:干净 master 本地与 schedule CI 同样红。根因在测试假上游tests/e2e/fake-upstream-chat.mjs——它的脚本队列键conv|sourceText.slice(0,64)把 ACP 渲染标签里的易变字节算进了键。首个真实 fold 后,产品侧(#5608-D 把引号空间对齐推迟到下一次成功 fold + #5608-C 抬升time=高水位)会重排旧 ref(m00001→m00015,refs 永不复用)并丢掉time=,于是同一条消息在下一次请求里标签字节变了,64 字切片一变键就变,脚本指令队列整段重放 → 多出一第二次(no-op)compress 调用。CI 上同 SHA 时红时绿:对齐在 fold 后的scheduleSave若 unified store 行尚未可见则 no-op(绿),行已可见则重排(红);本地 node-25 行总是可见 → 确定性红。修复(issue #6160 先行,commit
13015fec4随本 PR 分支追加):队列键改为conv|<source ref>|<stripAcps(body).slice(0,64)>。ref 是消息出现位置的标识(switch/back 两条字节相同的 prompt 仍各得各的队列;ref 被重排时脚本本就作废),stripAcps用既有辅助函数剥掉易变外壳。一处改动覆盖共享该假上游的全部 6 个 e2e 套件。本地验证(pi-stable 0.83.6):两 #2791 例转绿(fold 运行内队列完整走完 probe→compress→acp_status,恰一次 compress);native-pi/dsh/opencode/delegate-notify/subagent-sessions 全量跑过,余下两处本地失败在未改动假上游上复现完全相同(本地环境 artifact,与本改动无关)。CI 上该 lane 已在新 head
13015fec4转绿。