You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix in PR #3729 (cluster update): the #3354 overlay transform now matches STRUCTURALLY — any entry whose resolved config.plugins nests compaction-basic/command-compact rows gets them disabled, so custom/profile-local presets are covered exactly like the factory one (this issue's consequence-A path: armed native compaction → landed checkpoint → substrate destroyed). Entries without compaction rows keep their resolved config identity. Regression tests in tests/issue4147-dsh-overlay-structural.test.ts (custom preset + group recursion + negative identity rows).
Activity
[-][Bug][dsh] #3354 原生压缩关闭 overlay 不覆盖自定义 preset → 原生自动压缩仍武装 → 压缩基底被毁(被迫换新会话)/上下文溢出循环[/-][+][Bug][dsh] #3354 Native compression disabled: overlay does not override custom preset → native auto-compression remains | [Bug][dsh] #3354 原生压缩关闭 overlay 不覆盖自定义 preset → 原生自动压缩仍武装 → 压缩基底被毁(被迫换新会话)/上下文溢出循环[/+]ranxianglei commentedon Oct 21, 2026
(ai: vllm-qwen/qwen3.8-27b)
查重: 不重复 —— open+closed 按失败签名检索(custom preset / preset-general / overlay latch / substrate destroyed / allowDshCompaction)均无命中;相关仅父单 #4033(本单即从它分流而来)与同批 #4146(60K tier-distill 预算,机制不同)。
标签:
bug·dsh·scope/wiring·p1(会话无法恢复/数据丢失类,按 owner 规则 2026-10-19 一律 p1)。审核三步
① 查证(问题是否真实存在):代码机制已在 origin/master 独立核对成立;运行侧有硬证据——报告者 diagnostics 的 conflict ledger 事件
native-compaction-inferred: compression substrate destroyed (total-loss drift, no checkpoint marker),classification=activeConfirmed,clients=dsh,伴随 128 次 wire-guard 拒绝(后果 A);另一会话 404 次compaction/end全部pi-ai detected context overflow(后果 B)。报告者系外部未验证用户且已下线 bili,独立复现待补——dsh 已开源(github.com/deepseek-ai/deepseek-harness),可在带自定义 preset 的 profile 上本地复现「原生压缩未被关」。② 定位层次(表面现象 vs 根本原因):症状 = 基底被毁被迫换新会话 / 溢出循环手动中止;直接原因 = 自定义 preset profile 里 dsh 原生自动压缩从未被关掉;根因 = #3354 overlay 的覆盖缺口。这里把 issue 的表述修正一层,对修法很关键:转换逻辑本身已经是结构化的——全局中间件对任何以
@deepseek-ai/dsh-agent-preset声明的条目都会递归逐行匹配两个 compaction 包名并置 disabled(src/agent/dsh-compaction-disable.ts:52-64);写死 4 个官方 id 的是 inject 顺序门闩,不是匹配器(DSH_WEB_PRESET_IDS只喂compactionDisablePatchRows(),生成dsh.bundle.patch.yml里的门控行)。静态 patch 行只能枚举已知 id,枚举不了用户的 preset id。于是自定义 preset 有两条逃逸路:inject: [biliBasicCompactionPolicy],兄弟 bundle 导入乱序时,preset 可能在中间件注册之前就把配置解析完了 → 转换整体错过。vendored 来源(deshark42 插件)作者 README 明确警告:「新增或自定义预设若使用相同的 agent-preset 声明插件,也会被中间件处理,但还需为其条目添加上述依赖门闩,不能只依靠声明顺序」;报告者的 dump-config 已确认其 5 个自定义 preset 无
biliBasicCompactionPolicy;具体走 (a) 还是 (b) 待复现时确认。既有诊断(src/agent/dsh-native.ts:2077-2085)对非 web-app profile 只给 preset-standard 的 #2474 兜底文案,对自定义 preset 零指引;旧开关dsh.allowDshCompaction自 #3651/#3666 起是死键(只剩弃用警告)——想关的用户没有任何能关的开关。③ 方案评估:issue 建议方向 A「按结构匹配而非写死 id」打中了问题但靶点偏一层——匹配器已是结构化的,真正缺的是门闩覆盖面、谓词范围、失效可见性;方向 B(纯文档)留陷阱原地:不读文档的用户会再丢一次会话,p1 会话丢失级不可接受。
推荐(明确立场,不是甩选择题):一个 PR 闭环覆盖整个机制族(连贯修复不拆片):
@deepseek-ai/dsh-compaction-basic/@deepseek-ai/dsh-command-compact两包名行级精确匹配,不再限定单一声明入口——首选在agentPresets.registerregistry 缝拦截(官方 preset 包自身就走这个公开服务,比内部 config hook 版本脆弱性低),internal/config 放宽作补充;persistClientEvent告警(Compression conflict banner (bili v0.1.201, node v24.14.0, win32-x64) #3806 同模式),把「数天后基底被毁」变成「启动即可见」;不引入新配置键。issue 注明「供 owner 拍板,非本次实现」,故等你批准后进入实现;批准后立即开分支交付 PR(Closes #4147),并在开源 dsh 上补独立复现证据。
结构化八问
@deepseek-ai/dsh-agent-preset声明的条目——自定义 preset 经「无门闩解析过早」或「声明机制不同」两条路逃逸;诊断文案只给 preset-standard 兜底,旧开关已删,用户无路可关。auto:falsebundle patch 行不受影响(双保险,幂等);③ kill-switch(BILLION_CONTEXT_NATIVE off / plan.mode=off)仍交还 stock dsh(registerCompactionDisable受 plan.mode 门控,不动);④ [dsh] Disabling the plugin permanently bricks dsh session creation - the bundle patch inject gate has no fallback (0.1.199 / dsh 0.2.1-rc.2) #3662「bili-native 禁用时 preset 仍可启动」约束保持——中间件/服务缺失时 fail-safe 降级 + wire guard 兜底,不挡启动;⑤ 转换面扩大使版本敏感的内部钩子暴露面略增,由第 2 项告警 + 测试收住。收工判定:等待 owner 决策(方案方向如上,我的推荐是四项单 PR 闭环);批准后开工。
fix: cover custom presets structurally in the compaction overlay + su…
ranxianglei commentedon Oct 21, 2026
(ai: zhipuai-lb/glm-5.3)
Fix in PR #3729 (cluster update): the #3354 overlay transform now matches STRUCTURALLY — any entry whose resolved
config.pluginsnestscompaction-basic/command-compactrows gets them disabled, so custom/profile-local presets are covered exactly like the factory one (this issue's consequence-A path: armed native compaction → landed checkpoint → substrate destroyed). Entries without compaction rows keep their resolved config identity. Regression tests intests/issue4147-dsh-overlay-structural.test.ts(custom preset + group recursion + negative identity rows).closerex commentedon Nov 12, 2026
本地实测补充:0.1.213 仍有直接 registry.register 的工厂预设路径,请重新打开或分流跟踪
查重后补在本单:结论不是旧的四个 preset id 匹配问题。#3729 已覆盖 resolved config.plugins,但以下直接注册路径不经过这个转换边界。
环境:Windows,DSH NEXT 0.2.2-rc.1,billion-context 0.1.213,dsh-ops 0.5.4,当前预设 ops-ptc。未附原始会话、凭据或完整配置。
复现与观察
__BILI_DSH_COMPACTION_VERDICT__ === 'active'。dsh-ops/lib/presets/ops-ptc/register.js:327-368,427-432从自身presets/ops-ptc.patch.yml读出定义,然后直接registry.register(definition)。该 plugin entry 的 resolved config 不是含 plugins 的 agent-preset 声明,所以dsh-compaction-gate的 resolved config.plugins 匹配不到。agentPresets.generationFor(agent.ctx)观察:ops-ptc 的 compaction-basic、command-compact 均 disabled=false、fiber state=2、有 uid;agentPresets.serviceFor(agent, 'compaction')返回实际服务。其他本机标准预设的对应两项已 disabled=true。不能用 agent.ctx.get('compaction') 代替 scoped serviceFor 验证。2026-11-12T07:15:49.196Z,sourcehost.kernel.basic-compaction-engine,原文compaction (step pressure): shadowed 164 surface nodes (seqs 2653-3495, ~554944 tokens)。bili 同时识别为 COMPACTION_INSTRUCTION 并用已有 snapshot 本地回答,之后 Host 写入 checkpoint。观察到 checkpoint 摘要没有带回较新的用户任务,造成目标回退;这里不声称已证明不可恢复的数据丢失。最小本地缓解与验证
在 dsh-ops 自身片段中,仅给 compaction-basic 和 command-compact 加 disabled:true。为当前已经持有的同一 generation,通过 Loader Entry.update({disabled:true}) 先停 command,再停 basic,不重绑 Agent、不动历史、不停整个组。实测两项 state=4、uid=null;共享该 generation 的两个 Agent 的 scoped compaction 服务均消失;tool-result-pruner 仍 state=2,uid 不变;surface.replaceGeneration 在操作前后不变。没有重启应用。仅改磁盘片段不能证明已持有的旧 generation 已修复。
这是临时本地 workaround,不是通用上游修复。它会随 dsh-ops 重装/更新丢失,且 bili 关闭后也不会自动恢复 stock compaction;不建议作为正式产品方案。也不声称 dispose 会取消早已进入的在途压缩。
建议在 preset 注册/实际 composition 生命周期覆盖直接工厂注册,并对仍持有的 generation 给出明确迁移或告警策略。需要测试 factory registry.register、保留旧 generation、新 Agent、bili off 的回退,以及非 compaction/pruner 不变。
sawFactoryPreset=false只能作为不完整的遥测,不能单独证明转换没发生;本报告用实际 Loader rows、scoped service 和原生 checkpoint 作证据。fix: read the dsh internal/config fiber from the first param, not `this`
fix: dsh runtime-registered presets — extend the compaction-disable v…
fix: dsh runtime-registered presets — extend the compaction-disable v…