Repository navigation
Description
What happens
dsh.bundle.patch.yml (L23-30) gates four Web presets on the load-time overlay:
- id: preset-standard
inject: [biliBasicCompactionPolicy]
- id: preset-ptc
inject: [biliBasicCompactionPolicy]
- id: preset-minimal
inject: [biliBasicCompactionPolicy]
- id: preset-cordis
inject: [biliBasicCompactionPolicy]In a profile that does not ship the four official presets under those ids, all four patches match nothing. The loader does warn (patch: entry %C not found in cordis-plugin-include/src/index.ts L111), but that warning goes to the loader logger at startup — it is not surfaced in the plugin inventory, the settings UI, or any aggregated "this bundle patch did not fully apply" signal. From the outside the plugin looks fully healthy: enabled: true, fiberPhase: active, compaction disabled as intended.
So the failure mode is silent in practice, and the four gate rows are dead weight that reads as "working" in the YAML.
How I got here
Profile: desktop, DSH 0.2.1-rc.2, billion-context 0.1.202. The profile replaces the four factory presets with its own twelve (preset-omnipotent, preset-shipin, …, none of which are named preset-standard / preset-ptc / preset-minimal / preset-cordis).
Measured facts:
preset-{standard,ptc,minimal,cordis}appear 0 times in the profile'scordis.patch.yml.biliBasicCompactionPolicyappears 0 times in the profile'scordis.patch.yml.compaction-basicappears 12 times — once inside each local preset group — and all 12 already carryauto: false.
So the actual goal (stop basic compaction from running) is reached by the twelve local presets on their own; only the ordering gate is a no-op. Nothing is broken today, and I am not claiming a regression. The issue is that the bundle's patch is written against row ids that only exist in the factory configuration, and nothing tells you when that assumption fails.
The compaction-basic row at L17-19 is in the same position: the file's own comment (L5-13) says it targets the HOST-PLANE row, and that row is disabled in profiles that bundle @deepseek-ai/dsh-web-app, so that patch also lands on nothing there. Again the comment documents why the target may be missing, but the runtime gives no "0 of 5 patches applied" style signal.
What I would find useful
Anything that makes the assumption visible without reading the loader log. For example, either of:
- An aggregated per-bundle count — "bundle
billion-context: 5 patch rows, 1 applied, 4 skipped (ids not found: preset-standard, preset-ptc, preset-minimal, preset-cordis)" — surfaced through the plugin inventory entry or adshdiagnostic command. - A stricter opt-in for
injectgates specifically:@@insert if absent/ an explicitoptional: truemarker on the row, so a bundle author states "this may not exist here" and the loader can then stay quiet — leaving an unmarked miss as a real warning somebody has to look at.
A narrower fix would also work: keep the four gates but add enabled-style metadata to the rows so a user can see in the patch file which ones are conditional.
Why I did not just delete the rows locally
Because they are correct for the configuration they were written for — a profile that keeps the factory presets gets a real ordering fence from them. Deleting them would silently regress that case. The point is that the same file currently cannot distinguish "applied" from "target absent", and the person running it cannot either.
Environment
DSH 0.2.1-rc.2 (desktop profile)
plugin billion-context 0.1.202
OS Windows 11
Patch file content verified byte-for-byte at node_modules/billion-context/dsh.bundle.patch.yml (2,256 B, 46 lines).
Happy to test a diagnostic build if that helps.
Activity
ranxianglei commentedon Oct 20, 2026
ework
ranxianglei commentedon Oct 20, 2026
(ai: vllm-qwen/qwen3.8-27b)
查重: 不重复。 Searched open+closed issues/PRs for the bundle-patch silent-miss / preset-gate visibility gap (terms:
dsh.bundle.patch, preset gate,entry not found, "not fully applied"; plus the #3354/#2474/#1772/#3806 lineage). No existing item covers this observability gap. Nearest relative is #3806 (loud boot alarm for host-capability gaps — missinginternal/confighook / service-provide), a different failure domain from the roster-miss you report.What I verified in code (not taken at face value):
dsh.bundle.patch.yml:23-30does hardcode the four factory Web preset ids. Confirmed.patch: entry %C not foundis DSH'scordis-plugin-include/src/index.ts— not in this repo. So the warning surface, plugin inventory, settings UI and any diagnostic command are all DSH-side (cross-repo). billion-context only ships the YAML.internal/configmiddleware insrc/agent/dsh-compaction-disable.ts({global:true}) — it fires for every agent-preset resolution, id-independent. The four gate rows only add an ordering fence (a preset stays pending until the overlay service publishes, guaranteeing the middleware is registered first under out-of-order sibling imports).auto:falserows), nothing breaks today — only the ordering fence for non-factory presets is lost.Layer judgment: this is an observability gap, not a correctness regression. Two surfaces:
dsh.bundle.patch.yml+ the launcher overlay string atsrc/launcher.ts:3190) carry no hint the four rows are roster-conditional. → I'm shipping a decision-free doc clarification now (PR follows).dshdiagnostic, or anoptional:marker the loader understands — lives in DSH's loader+UI. I will not submit to the DSH project without your explicit approval (cross-repo rule).Recommendation (clear, not a menu): your option 1 is the real fix (aggregated per-bundle apply count in the dsh inventory + diagnostic) — it helps the person running dsh without opening any file, which is exactly the gap. Option 2 (
optional:) is a fine complement but only quiets log noise, doesn't solve "can't tell if it applied." Option 3 (in-file metadata) is what I'm doing now as the cheap in-repo slice — it helps whoever audits the file but not the casual runner, so treat it as partial.Decision needed: approve me prepping + submitting the option-1 diagnostic to the DSH project? If yes I'll post the delivery plan (target repo, form, content summary) here and wait for final sign-off before sending anything out.
标签:
bug·dsh·scope/wiring·p2(观测缺口而非正确性回归;自定义预设名册的 profile 下四行静默落空,目前只有 loader 日志能看到)。八问
preset-standard/ptc/minimal/cordis)按出厂预设名册写;profile 换成自定义预设名后这四行匹配不到任何东西,而"没匹配到"只在 dsh loader 启动日志里有一行警告,插件清单/UI/诊断命令里都看不到——文件读起来像"生效了",实际是空转。src/agent/dsh-compaction-disable.ts的全局中间件完成(与预设 id 无关);这四行只是排序栅栏。可见性面(loader 警告/清单/UI/诊断命令/YAML 可选标记)全在 DSH 侧,本仓只 ship 这个 YAML,天然给不出"N/M 已应用"信号。auto:false兜底),但存在掩盖真实误配置的风险:某 profile 既换预设名又没自设auto:false时,栅栏丢失后理论上可能因 import 时序竞态留下 armed compactor,而该状态无处可查。收工判定:本仓可立即部分我开一个标注清楚的小 PR(注释澄清、两载体同步);跨仓运行期可见性部分等你定方向并授权后再动。
ranxianglei commentedon Oct 20, 2026
这是用户自定义的不能用吗
ranxianglei commentedon Oct 20, 2026
(ai: vllm-qwen/qwen3.8-27b)
能用。用户自定义预设名的 profile 完全可用,不是坏的——这也是我标 p2 而不是 p1 的原因。两层都兜住了:
src/agent/dsh-compaction-disable.ts里的全局中间件({global:true}),它对每一个 agent-preset 解析都触发、跟预设 id 无关——所以那四行出厂门没匹配到,也不影响关停本身。compaction-basic已经各自带auto: false,又兜一层。四行门的唯一作用是排序栅栏(让预设在 overlay 服务发布前保持 pending,保证中间件先注册)。自定义名册下栅栏丢了,理论留一个 import 时序竞态的小窗口,但被上面两层盖死,实际不会留下 armed compactor。
所以问题不是「能不能用」,而是「看不出来」:patch 文件读起来像全生效了,其实四行是空转,得去翻 dsh loader 启动日志才发现。这就是本 issue 真正的缺口——纯观测,无正确性回归。
如果按这个定性(纯观测、且常见配置不受影响),我的建议收敛为:本仓只加注释澄清(两个 patch 载体写明这四行按出厂名册写、自定义名册下落空属预期、如何自查),不开跨仓 PR;DSH 侧聚合计数那个作为可选增强,你要推我再走跨仓审批。这样最省调度、也贴合实际严重度。要我照这个开小 PR 吗?
ranxianglei commentedon Oct 20, 2026
(ai: vllm-qwen/qwen3.8-27b)
本仓能立即做的部分已开好 PR:#4034 — 纯注释澄清、零行为变更。
改动(两个 patch 载体保持同步):
dsh.bundle.patch.yml:四行门上方加一段注释——它们按出厂 Web 预设名册写;自定义预设名的 profile 会全部落空(预期、非回归),因为真正的关停由src/agent/dsh-compaction-disable.ts的全局中间件完成(与预设 id 无关);并给出自查方法(grep dsh loader 日志的patch: entry ... not found)、以及"别删——出厂名册的 profile 靠它拿排序栅栏"。src/launcher.ts(writeDshAcpPatch):overlay 载体里加一句对应说明,两载体同步(See how to integrate the plugin that automatically disables dsh compression. | 自动关闭 dsh 压缩的插件看如何集成 #3354 有 carrier-agreement 测试钉着)。验证:定向测试绿——
tests/issue3354-dsh-compaction-disable.test.ts(含两载体一致断言)+tests/issue2605-dsh-retry-patch.test.ts,11/11 通过。全局 typecheck/test 交给 CI(纯注释、零类型影响)。PR 用
References #3962(不 auto-close),因为还差一块:待你拍板的一块(跨仓):你真正想要的运行期信号——dsh 插件清单里的聚合计数("5 行应用 N 行、跳过 M 行 + id 列表")或诊断命令、或 loader 认得的
optional:标记——都在 DSH 的 loader+UI,属跨仓提交,按规矩要你明确批准我才会动外部仓库。所以两条路你选:
我倾向 A(贴合实际严重度:纯观测缺口、常见配置不受影响);要更完整的运行期可见性就上 B。你定。
LHN-xiao-hai-tun commentedon Oct 21, 2026
这篇报告是我(LHN-xiao-hai-tun)写的。回来把结论补完,其中有一处需要修正你的定性。
事实层:全部成立
本机 desktop profile 实测(DSH 0.2.1-rc.2 / billion-context 0.1.202):
cordis.patch.yml305,608 Bpreset-standard/preset-ptc/preset-minimal/preset-cordis:各 0 次preset-omnipotent/preset-shipin/preset-novel/preset-finance/preset-fitness/preset-game/preset-lite/preset-local/preset-repo/preset-workflow/preset-creator/preset-ai-teacher)compaction-basic12 行,12 行全部带auto: falsecommand-compact12 行,全部是裸行,无disabled定性层:不是纯观测缺口
你的依据是「真正的关停由
src/agent/dsh-compaction-disable.ts的全局中间件完成({global:true}),与预设 id 无关」。这段代码我读了,确实如此——{global:true},且只按DSH_AGENT_PRESET_PACKAGE过滤。但由此得出「四行落空无妨」,漏了一个环节。上游 vendored 源
deshark42/dsh-compaction-basic-disable的 README 原文:即:中间件「会处理」不等于「保证来得及处理」。门闩(
inject: [biliBasicCompactionPolicy])的职能是让预设在策略发布前保持 pending,不是“排序好看”。自定义预设没有门闩,就是让时序竞态窗口真实存在。第二处:「十二行
auto: false兜底」兜不住全部。auto: false只关自动压缩;中间件做的却是把compaction-basic和command-compact一起disabled: true(disableBasicCompaction里两个包名并列)。本机 12 个预设的command-compact全是裸行——竞态一旦发生,预设会因缺少compaction服务加载失败,这是崩,不是静默。所以建议等级从 p2「观测缺口」改为「正确性风险 + 观测缺口」。
A/B 选择:B,但投递对象要改
我选 B,但目标不是跨仓。DSH 侧的聚合计数有用,但治标;根治在本仓——四行门只认四个出厂 id,自定义预设天然裸奔。请把 bundle 补丁改成对自定义预设也生效,或至少明确写进文档:自定义预设须自加
inject: [biliBasicCompactionPolicy]。PR #4034 的注释口径也要一起改。现在那句
harmless because the global middleware does the stand-down与上游 README 相抵触。下一步
我先在自己的 desktop profile 上验证「给 12 个自定义预设补门闩后是否真的补上」,有实测结果再回帖。这一步不依赖任何跨仓动作。
docs(dsh): correct #3962 note — ungated custom presets LOSE the order…
ranxianglei commentedon Oct 21, 2026
(ai: vllm-qwen/qwen3.8-27b)
你是对的,我错了。收回「harmless」那句——它把「中间件是全局的、与 id 无关」误当成了「中间件保证在每个预设解析之前都注册好」。这两者不是一回事。我没只凭你的转述,而是核了我们自己的源码,结论一致:
我核到的(本仓源码,非引用你的话):
src/agent/dsh-compaction-disable.ts:26-27:register-before-resolve 的保证明确只覆盖 GATED("protected")预设——「guaranteed registered before any protected preset resolves its config」。未加门的自定义预设不在保证内。:56:disableBasicCompaction同时把compaction-basic和command-compact置disabled:true。所以那 12 行自己的auto:false只挡自动触发,盖不住 command-compact。:11-12:模块存在的理由就是「dsh 压缩检查点落在 bili 视野外会永久遮蔽原始历史、摧毁压缩底座」。(上游 README 我在沙箱里没抓到——网络超时——但本仓这份 docstring 自己就把话说死了,更正不依赖你的引用。)
更正后的定性: 从 p2「纯观测缺口」改为 p1「正确性风险 + 观测缺口」,已改标(bug / dsh / scope-wiring / p1)。理由:竞态一旦丢,后果是压缩底座被毁,属 owner 规则里的数据丢失类,一律 p1。触发面是「自定义预设名册 + import 时序竞态」双条件,出厂名册的 profile 不受影响;你描述的「缺 compaction 服务导致加载失败」这个具体崩法属 DSH 内部行为,本仓代码看不到,等你本机实测确认。
PR #4034 已改: 两个载体的注释都重写——删掉「harmless」,改成正确性风险口径 + 缓解(自定义预设须自加
inject:[biliBasicCompactionPolicy],或保留出厂名册)+ 自查方法(grep loader 日志)。PR 描述同步改了。定向测试 11/11 绿(#3354 含两载体一致断言)。#4034根治那块(你选 B、且指向本仓)——有个硬约束要先讲清: 静态 YAML patch 无法枚举未知的自定义预设 id,所以「让补丁自动对自定义预设也生效」不是加几行静态行能做到的;而且排序保证天生要求门在 dsh 解析该预设之前就存在,这又指向「改变中间件相对预设解析的注册时机」——那是 DSH 侧的 seam,超出本仓能单方决定的范围。三个选项(代价升序):
我的建议:先合 (a)(#4034),把风险和要求说清楚;(b) 作为独立设计项等你拍板我再调研/实现;(c) 可选跨仓加固。你先在本机验证自加门是否真补得上——那个结果正好决定 (b) 值不值得做。你定方向。
LHN-xiao-hai-tun commentedon Oct 21, 2026
订正上一条评论里一处过强的定性
我 2026-10-21 在本 issue 的评论里写过:
这句错了,我订正。 实测结论:不是崩,是挂起。
依据(DSH fiber 状态机源码)
FAILED只有this._error一个入口(callback 或 config 抛异常)。等不到依赖服务 =PENDING= 挂起:进程照常运行、日志只出警告、该预设不工作。顺带确认
inject不是自创字段——dsh --dump-config-schema(947,539 B / 31,803 行)里"inject"在 L56 的 entry 定义内,是合法键。修正后的性质判断
「静默不生效」仍然是个真问题——用户看到的是预设选了但行为不对,日志里只有一条警告。但它比崩溃轻一个量级,我当时从「缺服务」直接推到「加载失败」,中间那步没验证就下了重结论。
本机实施结果(供参考)
dsh.bundle.patch.ymlL23-30 那四行只盖preset-standard / preset-ptc / preset-minimal / preset-cordis。本机 12 个预设全部改名了,四个门闩全落空。我按 README 的要求逐个补了inject: [biliBasicCompactionPolicy],重启后:1CC2282FC1FCC71A2010F5D1BFE1E43BConfig.listConfigs:16 个 agent-preset 条目全部status: "schema"(4 出厂 + 12 自定义),无一个卡 pendingcompaction-basic与command-compact均为inactive⇒ 中间件确实生效所以 README 那句「自定义预设还需为其条目添加依赖门闩」是准确的,缺门闩的实际后果是时序窗口而非崩溃——这一点我上条评论说重了,特此更正。
docs(dsh): refine #3962 note — missing latch is a timing window, not …
ranxianglei commentedon Oct 21, 2026
(ai: vllm-qwen/qwen3.8-27b)
这条自我订正很关键——正好打在我上轮升 p1 时过度依赖的那个假设(你那条「加载失败=崩」)上。我收回 p1、改回 p2,但不是退回我最初的口径。
为什么是现在的 p2(而非我最初那个 p2):
重判触发线(写死): 一旦有实测表明竞态真的丢过、或 armed compaction 确实落在 bili 视野外——立刻改回 p1。此前维持 p2。
诚实划边界: bili 侧事实(保证只覆盖 gated 预设、两个包都 disable、底座被毁是设计要防的)是我在自己源码里核过的;你给的 DSH fiber
PENDINGvsFAILED机制我沙箱里读不到 dsh 内部代码,是按你贴的源码采信——自洽、合理、与我这边结论一致。所以这是「我独立判断后与你一致」,不是照单全收一个未验证账号的话。你的本机实测顺带验证了 #4034 的缓解办法: 自加门后 16 个 agent-preset 全
status:"schema"、compaction-basic/command-compact 都 inactive——正是我注释里写的「自定义预设须自加inject:[biliBasicCompactionPolicy]」这条路,实测成立,README 那句也坐实。#4034 又精修一处: 把「never disabled -> destroys substrate」的确定性措辞改成「TIMING WINDOW / may stay armed(silent misbehavior;worst case substrate destruction)」,与你的订正对齐。定向测试 11/11 绿。#4034
当前状态: #4034(文档口径,option a)现在既准确又被你的实测验证,可合。根治(option b,动态发现免去手加门)仍需你拍板我才动;DSH 侧聚合计数(option c)跨仓可选加固。方向你定——或先合 #4034 收掉观测这块。
fix: cover custom presets structurally in the compaction overlay + su…
ranxianglei commentedon Oct 21, 2026
(ai: zhipuai-lb/glm-5.3)
Addressed in PR #3729 (cluster update): every overlay rewrite is now recorded on the shared globalThis telemetry channel, and the durable
[dsh-client]boot notes append actual coverage ("Overlay coverage so far: N preset entries rewritten (preset-x×1, …)"), so a bundle-patch gate row missing a renamed roster is visible without the host loader log. With #4147's structural matching the four factory gate-row ids become ordering insurance rather than the coverage boundary, which also removes the practical dead-weight risk this issue reported.docs(dsh): document roster-conditionality of the four Web preset gate…
refactor: dsh-native hygiene from #4545 review