Repository navigation
fix: stop telling DSH to call an unreachable compress tool (#3177) - #3287
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3879-pr.3287.c6a60bcThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3287.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。按失败签名+机制检索 open/closed issue 与近期 PR:同症状(DSH 这是 agent 完成的 PR(正文为 PR 描述),我按 PR Review 规范做独立审核——不复述 PR 自述,重新核 diff、既有行为与测试有效性,结论用结构化八问给出。注意一点:PR base( |
(ai: vllm-qwen/qwen3.8-27b) 独立审核结论(非转述 PR 描述,全部对 pr 分支代码重读核实)方向关:#3177 最终定调是「DSH 会话的整个模型侧压缩面关掉(nudge + 常驻 compress system prompt),四条 wire 全关,其他 lane 不动」。本 PR 实现的就是这个承诺,不多不少。修在产生端:删掉的是「指示模型去调用工具」的两个产物本身,不是事后过滤报错——疏不是堵。若明天 DSH 冒出别的 unknown-tool 形态,这个修法依然成立。✓ 回归审查(逐项既有行为):
测试有效性:两个新测试是真测试——hermetic(临时端口、确定性 usage 报告 arm、唯一 session id),断言有牙。我在未修复的 origin/master 上复跑 PR 的测试文件:两条 #3177 用例均失败( CI 过程说明(重要):PR 原 head 审核中发现的新问题(不同机制,未并入本 PR):absorb 开启后,插件模式会话会被注入 absorb 指令但 absorb 工具 schema 在插件模式下从不注入——与 #3177 同症状家族(unknown tool)、机制不同(absorb 门控漏查 pluginMode,波及所有插件 lane)。已按规范另立 issue:#3293 (带来源标记与查重声明)。 结构化八问
判定建议合并(head |
|
冲突 ,另外看起来是特判? 是不是打的狗皮膏药 没有到根本原因? |
6e6fac7 to
00a1f24
Compare
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决:rebase 到当前 master( 冲突点只有一处,且是重复修复:分支第二个 commit( rebase 后验证(rebased head 本地):typecheck + build 干净;定向套件全绿—— 结构化八问
关于「特判?狗皮膏药?」(floor 6)直说:是 lane 门控(特判),但在 bili 边界内它是根因修复,不是遮症状。分两层:
判定:冲突已清,head |
(ai: vllm-qwen/qwen3.8-27b) 这条评论(冲突 + 特判/狗皮膏药)已在上一条回复里完整作答,这里不重复全文,只给结论指针:
详见上一条回复(含八问):#3287 (comment) |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.477-master.5bbef69 # this exact build
npm install -g billion-context@master # always the newest merged build
|
…3312-#3320 batch) - keep #3298 changes on master's post-absorb shapes: relay round-2 rebuild and all four prepare* paths keep withProjectAttribution; absorb imports/ sections dropped with #3309 - storage-render goldens: metadata-section drift after the merge (absorb fields gone from session metadata) — regenerated via scripts/update-storage-render-goldens.ts, wire-body sections unchanged
Closes #3177
What & why
In DSH (DeepSeek Harness), bili registers its ACP compression tools (
compress/decompress/ …) at the host scope viadsh-native.js, which the preset-standard agent cannot reach — the issue's full scan found 0 of 3939 request headers carrying bili's tools, while third-party MCP tools appeared in 758. Despite that, bili still did two things for DSH-bound plugin sessions:telling the model to invoke a tool it can never see or call → recurring
Error: unknown tool "compress". The bursts were amplified by the #3004 self-heal 10-minute re-arm cap, which kept re-triggering the nudge on a session that is structurally incapable of compressing.This fix suppresses both the nudge and the standing compress system prompt for DSH-bound plugin sessions, across all four wires (openai / google / responses / anthropic). pi / omp / opencode and proxy-mode sessions are unchanged — their ACP tools are visible, so they keep the nudge as their proactive trigger (#451).
How
Per wire, one gate:
then the nudge gate and the compress-system-prompt gate additionally require
!dshCompressSurfaceOff. On the responses wire this is folded intocompressSurfaceOn = shouldInject && !dshCompressSurfaceOffso a DSH session takes the same stable tags-only developer slot as any non-injecting session (this keeps the prefix cache append-stable across the native-compaction rebase — without it the developer-message slot would appear/disappear and breakcache-friendly-plugin).inject.tsgains an optionalsuppressCompressPromptparameter used by the anthropic wire. Tool-schema injection, absorb, and rules gating are intentionally left on the rawinjectToolflag (separate features, out of scope).Behavior change (old → new)
dsh.allowDshCompaction) or bili'sexternalSummary+autoFold, not from the model callingcompress.Config surface
No new config keys, env vars, or CLI flags. No config schema, persistence-format, or wire-shape change beyond dropping the two model-facing artifacts described above.
Tests
tests/plugin-nudge-injection.test.ts: a DSH plugin session drops the nudge (forwarded turn length 30 vs omp's 31) and drops the standing compress system prompt; omp/proxy still get the nudge (unchanged controls).tests/issue2432-dsh-local-compaction.test.ts: the "[bug] DSH 桌面端 0.1.188:宿主原生压缩落地摧毁折叠基底 → 同一区间永久不可锚定、compress 连片失败并熔断(compaction-basic auto:false 仍无效) #2432 breaker quenches the nudge" subtest previously drove a DSH session — which by design no longer receives the nudge, so its control premise was exactly the bug being fixed. Repointed it to a tool-visible plugin lane (omp) so the breaker coverage stays meaningful.cache-friendly-plugin(11),issue2432-dsh-local-compaction(12),plugin-nudge-injection(5) all green. Full suite runs on CI.Rebase note
Rebased onto current master; auto-merged cleanly alongside #3229 (codex mid-history developer) and #3251 in
prepare-responses.ts— disjoint regions, no semantic interaction with thecompressSurfaceOngate.