Repository navigation
[PR] fix: add recovery guidance to the dsh compaction refusal message (#3499) - #3502
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4648-pr.3502.2b11dccThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3502.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 按失败签名("compaction refusal guidance"、"No action is needed")检索 open+closed issues/PR,命中项只有本 PR 自身;相关条目 #1729(guard 原始设计)、#2028(opt-in 开关)、#3450(事故)、#3499(本 issue)均未修过这个文案缺口。 ① 原 issue(方向关):#3499 按报告者 DSH journal 重定范围后,剩余缺陷 = dsh compaction 拒绝消息只讲「为什么拒 + 怎么强制」,从不说「那该做什么」;#3450 事故里 over-window 会话的用户因此没有带内恢复杠杆,唯一可操作的一行还指向有害选项。本 PR 在源头(用户可见字符串常量 ② 回归审查(diff 触碰路径的既有行为清点,逐项结论):
③ 代码:一个字符串常量 + 一条注释 + 两条断言。关键核实:新句「if the session is currently over its window, it starts folding on the next turn (#3453)」与 #3453 的实际机制吻合——我逐行读了 #3453 的 patch:上游 stated overflow 计数被记入 fold target( ④ 测试有效性:两条新断言钉住引导句的确切措辞( ⑤/⑤b diff 与代码整洁:2 文件 +7/-1,每一行都与本 PR 目的相关;注释风格与仓库一致(说明 why、引用 issue 号);无死代码、无魔法串。全项通过。 验证证据:
结构化八问
判定:可合 —— 前提是先合 #3453(或同一 release 一起发);顺序满足后无其他阻塞。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.646-master.0eb6b2e # this exact build
npm install -g billion-context@master # always the newest merged build
|
Closes #3499
What this changes
On a bili-native dsh lane,
/compact(any dsh compaction call) is refused by design (#1729: a landed dsh checkpoint durably shadows the raw history and destroys bili's compression substrate). The refusal message explained only WHY it is refused and HOW TO FORCE dsh compaction (allowDshCompaction) — never what to do INSTEAD.In incident #3450 an over-window session left the user with no visible in-band recovery lever: two manual
/compactattempts (19:57:10, 19:58:25) were refused locally (60 ms, no upstream traffic, nothing billed), each surfacing "Compaction could not produce a useful summary" plus an opt-in hint that pointed the wrong way for that state. Disabling the plugin became the only remaining option.This PR adds the recovery sentence and repositions the opt-in as a last resort:
Before:
After:
Behavior change disclosure
retryable: false,dsh_compaction_refusedcode, the refusal DECISION logic, config surface (no keys added/renamed), wire shapes.Verification
Scope notes
/compactfired from the command lane — command-scoped compaction has NO initiator by design (turn: null), not post-incident attribution loss; severity downgraded accordingly (local refusal, no billing, no second 400). The remaining defect is the guidance gap fixed here.