Skip to content

[PR] remove: the experimental compressAtFoldPoint feature — fold-point relocation (v1 #5471 + unreleased v2 #5949), #6132 - #6150

Merged
ranxianglei merged 4 commits into
masterfrom
2026-11-10_remove-compress-at-fold-point
Nov 11, 2026
Merged

ranxianglei merged 4 commits into
masterfrom
2026-11-10_remove-compress-at-fold-point

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

这是什么

按 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 与公开导出
  • v2 的 already-folded-echo 解析 kind + pointer marker(parse-compress-input.ts)

host / web / 文档 / 站点

  • env 旋钮 + resolver(knobs.ts)、文件键(config.ts 字段/字段表/解析循环)、compress-settings 级联与短路可达性、relay round-2 镜像、四个 prepare* 安装点、plugin-render S4 镜像、makeFoldPointReasoningDroppable(server.ts)、stream.ts 的 echo ack
  • 旧配置残留:一次性 INERT 弃用警告(warnInertRemovedCompressKeys,含 top-level 残留,各层级全命名),值忽略
  • web 配置行 + i18n(en/zh)、config-reference yaml、站点文档/i18n、博客文章直接删除(owner 指令,不留勘误)
  • docs configuration(en/zh)+ lifecycle 台账(§1 两行删除、§5 记录)、CHANGELOG

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 同步)。

预检(本地)

  • kernel: tsc --noEmit ✅;kernel 全量测试 1621/1621 ✅
  • host: tsc --noEmit ✅;check-unused-exports ✅
  • CI 守卫本地预跑:lifecycle-ledger-guard ✅、config-surface-guard ✅、gen-config-docs check-coverage ✅、check-architecture-docs ✅
  • 定向测试:removed-compress-keys-inert 4/4(含新增 Remove the compressAtFoldPoint feature — it reorders resent history and caused an authorship-misattribution incident in a live session #6132 用例:四层级命名 + 去重 + 值忽略)✅、compress-reject-reasons ✅、verif-subset-guard + 相关 verif/generic/induction 57 ✅、compress 配置解析套件(rules/absorb/kernel-tier-defaults/strip-images/external-summary)78 ✅
  • e2e-codex 车道与全量套件判定 = 远端 CI(本地 fake 车道需 codex 二进制长跑,留给 CI)

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 转绿。

ework-agent added 2 commits November 10, 2026 23:23
…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
@ranxianglei ranxianglei changed the title remove: the experimental compressAtFoldPoint feature — fold-point relocation (v1 #5471 + unreleased v2 #5949), #6132 [PR] remove: the experimental compressAtFoldPoint feature — fold-point relocation (v1 #5471 + unreleased v2 #5949), #6132 Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-10_remove-compress-at-fold-point (13015fe)

Latest build — install this exact version

npm install -g billion-context@0.0.9038-pr.6150.4aea2bb

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
13015fe billion-context@0.0.9038-pr.6150.4aea2bb build
5211ee9 billion-context@0.0.9001-pr.6150.0933416 build
e2e05d1 billion-context@0.0.8965-pr.6150.f9151bd build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6150.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei added bug Something isn't working p1 scope/kernel labels Nov 10, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

进度汇报(本会话曾因长时间无输出被平台强制重启一次,现已恢复,继续推进):

查重:不重复——open [PR] 行中只有本 PR(#6150)针对 #6132,无并行第二 PR。

已核实的当前状态(live 验证:head sha 确认未动,CI 快照取自已刷新的镜像缓存):

红因已钉死:guard 对 PR 正文做字面量匹配 kernel-change:(ci.yml:476),而本 PR 正文写的是 markdown 加粗的 **kernel-change**:——星号插在 "change" 与 ":" 之间,子串不命中,误判为未声明。声明内容本身是齐的(commit message 里也是规范的纯文本形式)。另注意 ci.yml 触发器 types 不含 edit,光改正文不会重跑 CI,必须推 commit。

代码审查结论(预览):两个 commit 的删除面干净彻底(kernel 节点/导出/Config 三字段/v2 echo kind、host 四个安装点、relay round-2 镜像、web/站点/文档/博客、lifecycle 台账、CHANGELOG 全对齐;残留键走一次性 INERT 警告且四层级命名有测试钉住)。发现 2 处移除后遗留的孤儿 import(src/server/prepare-google.ts:10 的 isStrictReasoningEcho、src/plugin-render.ts:14 的 loadConfigFile, isMcpBiliCompress),按「小问题直接修」将在 PR 分支上直接补一个标注 commit 修掉。golden wire-contract 四个 pin 文件均不含被删符号,无需再生成。

接下来:修 2 处孤儿 import + 定向测试 → 把 PR 正文的声明改回纯文本 kernel-change: → push 触发 CI 全量重跑 → CI 出来后给结构化八问最终结论。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

审核收尾。本轮完成:① 修掉移除后遗留的 2 处孤儿 import(src/server/prepare-google.ts:10、src/plugin-render.ts:14,均已 grep 验证无其他使用点),commit 5211ee90 已推上 PR 分支;② PR 正文第 23 行的声明由 markdown 加粗 **kernel-change**: 改为纯文本 kernel-change:(guard 做字面量匹配,加粗星号导致误判未声明——这是 e2e05d1 上 kernel-guard 红、其余 test/e2e 车道被连带跳过的唯一原因);③ push 触发 synchronize,CI 全量矩阵在新 head 5211ee90 上重跑中。标签已齐(bug / p1 / ci:full / scope/kernel,与本 PR diff 独立判定相符),无需改动。查重结论维持:不重复(open [PR] 行中仅本 PR 针对 #6132)。

结构化八问

  1. 是什么问题:实验功能 compress-at-fold-point(把重放视图中压缩产生的内容挪到折叠点处)在其目标模型家族(qwen3-27b 系)9 天内造成两次真实事故——2026-11-08 自发重复压缩循环、2026-11-10 生产会话作者误认(同轮「回答+compress」重放时,挪位后裸挂的回答文本被模型当成用户消息,重复回答了自己的答案并固化进折叠块主题);owner 裁定整体移除。
  2. 什么原因导致的:挪位变换改变了重放视图中消息的呈现位置与归属边界,弱于说话人归因的 27B 系模型把「自己的最后一条发言」误判为用户输入;v2 方案(pointer marker + already-folded-echo 解析)在同一模型家族上仍触发自发压缩循环,且从未发布——继续修补的成本高于移除。
  3. 影响范围与严重程度:仅显式开启开关的用户受影响(v1 线上约 10 天暴露面);默认用户零变化(开关关闭时管线节点直接 fast-path 返回,布局字节级一致)。严重度 p1:作者误认属核心语义破坏(会话内容被错误认知固化),故按 p1 处置。
  4. 怎么修复的:正向整删而非 git revert(revert 有 17 文件冲突,因 v2 在 master 改过同一批文件)。kernel:删 relocate-compress.ts + relocate-compress-carriers 节点 + Config 三字段 + 公开导出 + v2 echo kind/pointer marker,版本 0.0.192→0.0.193(两个 package-lock 同步)。host/web/文档:env 旋钮、文件键、compress-settings 级联、relay round-2 镜像、四个 prepare* 安装点、plugin-render S4 镜像、stream echo ack 全部移除;web 配置行/i18n、config-reference yaml、站点文档/i18n、博客文章(owner 指令直接删除)、docs configuration/lifecycle 台账、CHANGELOG 全对齐。残留键走一次性 INERT 弃用警告(四层级全命名、按签名去重、值忽略),并有新测试用例钉住。
  5. 是否有回归问题:逐项审过——默认用户零变更(快路径保证字节级一致);显式 opt-in 用户回到基线布局 = 有意行为变更(见下披露);含 v2 marker 文本的字符串从 echo kind 落入通用解析失败分类(v2 从未进 tag,生产不可达);resolveRequestConfig 短路条件恢复特性前形态,净输出不变;golden wire-contract 四个 pin 文件均不含被删符号,无需再生成;孤儿 import 两处已补修。未发现无意回归。
  6. 是否破坏缓存:不涉及——不触碰前缀缓存/折叠游标/去重键/重试策略;关闭态本就是字节级 no-op,头部 system 消息保持字节稳定。
  7. 是否改了设计方向:是但属「移除实验面」而非转向:两种压缩模式、快照渲染、水位车道的既有方向不变;Kernel Boundary 合规(kernel-change 声明在位且已修正格式、版本已 bump、human-only 评审档适用)。
  8. 是否引入新配置:无新增;移除 4 个键——文件 compress.compressAtFoldPoint、compress.compressAtFoldPointClearThinking,env BILI_COMPRESS_AT_FOLD_POINT、BILI_COMPRESS_AT_FOLD_POINT_CLEAR_THINKING。迁移:无需(关闭=基线行为);残留键=一次性 INERT 警告+值忽略。

行为变更披露(旧→新):① 显式开启用户的折叠点挪位布局 → 基线布局;② 上述 4 个配置键/env → 从生效变为忽略+一次性警告。原因:目标模型家族两次真实事故,owner 裁定移除(#6132)。

判定:代码侧已就绪,待 5211ee90 上 CI 矩阵转绿即可合并;合并动作按规则留给人工(kernel 变更恒为人工评审档,agent 不合并不发布)。CI 出结果后我会跟进汇报。

…+ 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
@ranxianglei
ranxianglei merged commit 33104b1 into master Nov 11, 2026
64 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1171-master.33104b1 (rolling master tag).

npm install -g billion-context@0.0.1171-master.33104b1  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

ranxianglei pushed a commit that referenced this pull request Nov 11, 2026
…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.
ranxianglei pushed a commit that referenced this pull request Nov 11, 2026
… master fold-point removal (#6132/#6150), auto-merged clean (#5385)

Master removed the compressAtFoldPoint feature; that removal does not overlap
the outbound-prefix hook resolution, so this merge is conflict-free. The
observeOutboundPrefix hook still runs on the final sent array (healedMessages).
ranxianglei pushed a commit that referenced this pull request Nov 11, 2026
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)
ranxianglei pushed a commit to Maziar123/billion-context that referenced this pull request Nov 11, 2026
ranxianglei added a commit that referenced this pull request Nov 12, 2026
… not the closed unrelated #6150

#6150 is the closed 'remove compressAtFoldPoint' PR — the comment refs
read as pointing at a retired feature. Fill the '#6xxx' placeholders with
the issue the fix actually closes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR p1 scope/kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the compressAtFoldPoint feature — it reorders resent history and caused an authorship-misattribution incident in a live session

1 participant