Repository navigation
fix(dsh): #1772 结论修正 —— web profile 可用 profile 层完整快照 patch 关掉原生自动压缩(告警指路 + 坑位警示) - #2477
Conversation
…atch CAN switch off web-profile native auto-compaction (#2474) The #1772 boot warning ended in a dead end ('no patch layer can reach'). Verified live against dsh 0.2.1-alpha.1: preset-standard is an ordinary bundle-layer entry; a profile-level cordis.patch.yml row (applied after every bundle) replaces its config WHOLESALE, so a full-snapshot override carrying auto:false under compaction-basic switches off native auto-compaction. The once-per-process warning now names that recipe plus both verified traps (a partial snippet drops everything not restated — other plugins AND the preset's id/order identity; - insert: with the same id appends a dead duplicate row); launcher stderr, config doc, bundle-patch header and CLIENTS(en/zh)/README(en/zh) corrected to match; the regression test pins the exit pointer. Snapshot-freeze walkthrough lives in the companion CONFIGURATION.md PR (#2476). Supersedes #1786's dead recipe (.agent-presets user root removed in dsh 0.1.7+). Refs #2474
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2687-pr.2477.ad99fd8This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2477.tgz
npm install -g packageInstall instructions are refreshed on each push. |
… in the allowDshCompaction env-table rows (#1772/#2474) Review pass-fix for the #1772 conclusion correction in this PR: the BILI_ALLOW_DSH_COMPACTION rows in CONFIGURATION.md / CONFIGURATION.zh-CN.md still asserted the pre-#2474 dead-end ('no patch layer reaches the preset-nested instance'). Reworded to the corrected mechanism statement used elsewhere in this PR (the preset-nested row is not addressable by id from any patch layer) plus the #2474 escape hatch (profile-layer full-snapshot override of preset-standard). Docs-only, no behavior change; docs-sync + docs-coverage gates re-run locally green.
[bot] 🏷 转发 #2476 作者(PTC/创建者模式实地验证过)的一条建议:告警文案目前只点名 顺带一处措辞对齐:新注释写「the engine indexes top-level rows only」,而旧 CLIENTS.md 写「indexes only top-level rows and true group children」。你本 PR 反正要重写 CLIENTS.md 那节,请对着解包的 0.2.1-alpha.1 包把代码注释和文档落到同一个说法上(实测点号路径 |
[bot] 🏷 PR #2477 审核结论:可合并。 分支 验证过程
审核中发现并已顺手修掉的一个残留(独立标注 commit 结构化八问
关联条目核对:Supersedes 的 #1786 已带详细机制史评论关闭 ✓;docs 侧 #2476 与本 PR 分工清晰(其待补的快照刷新句在 #2476 线程跟踪中);两个 PR 都合后 #2474 可关(提醒:#2476 正文写 一句话收工:可合并——方向有活体证据支撑、回归逐项核过、测试有牙、diff 干净、CI 26/26 绿、base 即当前 master;审核中发现的 env 表残留已直接修入分支。合并请你来。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.188-master.0c89947 # this exact build
npm install -g billion-context@master # always the newest merged build
|
改了什么
#1772 的结论(web profile 下 preset 内
compaction-basic任何 patch 层都够不到 → 告警即终点)是错的:preset-standard本身是 bundle 层的普通顶层条目,profile 层 patch(在所有 bundle 之后生效)可以整体替换它的config—— 完整快照 + 在其compaction-basic行下加auto: false,就能关掉 web profile 的原生自动压缩。本 PR 把被写死的旧结论全部修正,并让一次性启动告警从死胡同变成指路。验证(隔离环境活体复现,dsh 0.2.1-alpha.1,与报告者同版本)
compaction-basic下config.auto: false- id: preset-standard.compaction.compaction-basicpatch: entry ... not found,零变化plugins的部分覆盖config.id/order身份也丢- insert:同 iddsh web-app bundle 自家
cordis.patch.yml头注文档化了这两条语义(「rows here override base rows by id, with the profile's own cordis.patch.yml and any --patch overlays still to come」/「A patch replaces the targeted row's whole config」),presets/standard.patch.yml头注明 Web editor 就是按 id 从 profile patch 覆盖 —— 该写法走的是设计内路径。行为变更(旧值→新值,按规披露)
[dsh-client]启动告警文案(src/agent/dsh-native.ts):旧 = "...stays enabled in this profile (ACP compression unaffected)"(死胡同结尾);新 = 保留全部旧事实,追加出口配方(完整快照 + cordis.patch.yml + auto:false 位置)+ 两个已验证坑位(部分片段静默丢掉一切未重述的键,含 preset 身份;- insert:同 id 追加死行)+ 快照冻结 roster。触发条件(web-app 在 bundles、每进程一次)与通道(persistClientEvent durable log)均不变。bili dsh启动器 stderr 提示(src/launcher.ts):"profile patches cannot reach it" → "nested rows no patch layer can address by id … stays ARMED unless you apply the fix(dsh): profile 层 patch 其实可以关掉 web profile 的原生自动压缩(#1772 结论修正)+ 一个会静默清空整个 preset 的写法坑 #2474 full-snapshot override"。触发条件不变。src/config.tsallowDshCompaction JSDoc、dsh.bundle.patch.yml头注、CLIENTS.md/zh、README.md:255、README.zh-CN.md:207。tests/dsh-native.test.ts):钉住出口指针(fix(dsh): profile 层 patch 其实可以关掉 web profile 的原生自动压缩(#1772 结论修正)+ 一个会静默清空整个 preset 的写法坑 #2474 / cordis.patch.yml / WHOLESALE / insert:)。无 wire 协议、消息形状、配置 schema、持久化格式变更。config surface:无(未增/改名/改语义任何字段)。无
kernel-change(未触碰kernel/**)。与其他条目的关系
.agent-presets/user-root 配方踩在 dsh 0.1.7+ 已移除的机制上(includeUserRoot/.agent-presets/ 复数包@deepseek-ai/dsh-agent-presets在 0.2.1-alpha.1 安装树中零出现),方向死路;将留详细评论后关闭。本地验证
npm run typecheck✅(先重建 kernel/pi-subagents)node --import tsx --test --test-name-pattern "1772" tests/dsh-native.test.ts✅Review supplement (2026-10-09, ework-daemon): 审核中发现
CONFIGURATION.md/CONFIGURATION.zh-CN.md的BILI_ALLOW_DSH_COMPACTIONenv 表行仍残留 #2474 之前的旧结论(「no patch layer reaches the preset-nested instance」),已补两行措辞修正(commita64efdd60,纯文档、无运行时效果;docs-sync/docs-coverage 本地复跑绿)。配方 walkthrough 一节仍归 #2476,本 PR 依旧不碰它。