Repository navigation
[PR] fix(dsh): stand the host-plane /compact command down on a bili-owned lane (#7154) - #7159
Merged
ranxianglei merged 1 commit intoNov 24, 2026
Conversation
…lane (ranxianglei#7154) /compact drives the host's own compaction call — the same envelope bili's wire guard refuses unconditionally (ranxianglei#1729) — so on a bili-owned lane the command has no outcome except failure. dsh reports that failure as "Compaction could not produce a useful summary", blaming the model for a policy refusal, and every retry fails identically because the refusal is terminal. Disable the command entry in both patch carriers (persistent bundle + launcher overlay) with the same static semantics as the adjacent compaction-basic auto:false row. Escape hatch: a profile-level `disabled: false` for the same id brings it back; invocations are still refused at the wire.
ranxianglei
pushed a commit
to mariopasquali/billion-context
that referenced
this pull request
Nov 25, 2026
…ranxianglei#7678 wal-reclaim-passive (walJournalSizeLimitBytes default 0, ranxianglei#7674) + ranxianglei#7617 identity-tables-consolidate + ranxianglei#7581 egress block-flow checkpoint retire + ranxianglei#7659 eg-GA docs wrapup + ranxianglei#7671 degenerate-retry + ranxianglei#7676 megaturn-bridge + ranxianglei#7677 doom-prompt-mass + ranxianglei#7632 pure-echo latch + dsh batch (ranxianglei#7161/ranxianglei#7159/ranxianglei#7158/ranxianglei#7129/ranxianglei#7127) Only manual conflict: docs/configuration{,.zh-CN}.md env table — union of intent, original line order: master's walJournalSizeLimitBytes row (default 0, ranxianglei#7674) + PR's archiveAfterDays row (with the bili storage migrate ranxianglei#5599 clause). All code (src/persist.ts, src/storage/shadow.ts, src/storage/store.ts, tests/storage-unified.test.ts) auto-merged; local typecheck clean and the targeted storage suites (storage-unified/-ccr/-state-fields/ -batched-verification) pass 38/38 on the merged tree. (ranxianglei#6773)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7154.
问题
非 web 的 dsh profile 里,
/compact在命令表里,但每一次执行都被 bili 的 #1729 守卫拒绝,而 dsh 把拒绝报成"模型没摘要"。真机读数(
dsh --profile <p> --dump-config,bili 已以 bundle 方式挂入):链路:
/compact→ctx.compaction.compactNow()→ 用COMPACTION_INSTRUCTION模板发一次总结请求;这条请求与自动压缩是同一个信封(src/server/dsh-compaction-guard.ts的注释原文:auto pressure, context-overflow recovery, and manual /compact all send the same envelope),因此被无条件 422 拒绝(该守卫也不以插件标记为开关)。拒绝后按ManualCompactionError('summary')映射成:用户看到的是"模型不行",重试恒失败。
怎么修的
在两个 patch 载体里把这条命令关掉——它们是车道被挂载的仅有的两条路,必须同步(同
#3354的既有纪律):dsh.bundle.patch.yml(持久安装):- id: command-compact+disabled: true;src/launcher.ts的writeDshAcpPatch()(bili dshoverlay):同一行。语义与紧邻的
compaction-basic: auto: false完全一致(静态:bili-native 被 kill-switch 也不会把它带回来)。逃生口写在行内注释里:用户在自己 profile 的cordis.patch.yml里给同一 id 写disabled: false就能把它拿回来——代价是每次调用仍在 wire 上被拒。验证
真机合成:把改后的
dsh.bundle.patch.yml当 patch 层应用到真实 dsh profile,--dump-config结果:新增测试(
tests/issue7154-command-compact-disabled.test.ts,2 条):disabled: true行,且该行是顶层 patch 行、不在 insert 列表里(insert 会多挂一条,宿主原来那条仍然活着);同时auto: false行必须保留;auto: false之后(读起来是同一个决定),同样不得以 insert 形式出现。负向对照:把
dsh.bundle.patch.yml里的两行删掉 → 第 1 条立刻红;恢复后 2/2 绿。本地:
typecheck干净;issue2605/issue3354/issue3662/issue7154四套 18 条全过(这三套都直接读dsh.bundle.patch.yml,改 yml 必须过它们)。风险 / 边界
bili-native被 disable 时/compact也不会回来——与同文件auto: false同层静态语义,不是新引入的不一致;要恢复用上面那个disabled: false逃生口。/compact段落同步应单独一轮(本 PR 的行为说明落在 yml 行内注释里)。若你希望这个 PR 就把文档带上,我按docs-sync的规则补齐后再推。command-compact在 preset 的嵌套行里,已由#3354的加载期 overlay 处理;这条顶层行在 web 上本来就没人用。