Repository navigation
docs(dsh): user-preset recipe disables native auto-compaction in web profiles (#1772) - #1786
ranxianglei wants to merge 2 commits into
Conversation
…profiles (#1772) The #1777 warning said native auto-compaction 'stays enabled' in web profiles because no patch layer can reach the preset-nested compaction-basic instance. That is true for the bundle patch, but dsh itself exposes a sanctioned path: the preset roster's user root ($DSH_HOME/.agent-presets/), which the Web UI preset picker already writes to. Duplicate the standard preset, give its compaction-basic row config: { auto: false } (compaction-basic only registers automatic compaction when this.config.auto), select the copy as the default — manual /compact and the tool-result pruner are kept. - CLIENTS.md / CLIENTS.zh-CN.md: full recipe under the #1772 caveat, with the verified-against-dsh-0.2.0-rc.2 notes and the caveats (no shipped-id reuse — the shipped root shadows duplicates; snapshot drift on preset upgrades; pre-switch sessions keep the old preset). - src/agent/dsh-native.ts: the one-time boot warning now points at the recipe instead of a dead end; same channel, same once-per-process gating, wire/persistence behavior unchanged. - tests/dsh-native.test.ts: assert the warning names the remedy. - README.md / README.zh-CN.md: bili dsh line now says web profiles switch presets per the recipe instead of 'off outside web profiles'.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1774-pr.1786.bd3ed46This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1786.tgz
npm install -g packageInstall instructions are refreshed on each push. |
PR #1786 review 结论(分支 先说判定:可合并。唯一红着的 CI 是一个与本 PR 无关的 Windows 计时抖动(Q4 详述),对该单 job 点 Re-run 即可转绿;按规矩我不代合。 查重:无平行工作。相关链只有 #1772(原报)→ #1777(已合并,本 PR 前置)→ 本 PR;#1754 是无关的 Claude Code 缓存问题。 结构化七问
审查五关小结
本地复核(独立于 PR 自述):detach worktree 到 一句话收工:可合并——docs + 一行日志文案的低风险 PR,方向正确、无回归、diff 干净、typecheck + 定向测试本地复现全绿;唯一红的 CI job 是无关的 Windows 计时抖动(同测试在另两个 runner 同 commit 通过),Re-run 该单 job 即可,合并请你来。 |
|
|
这条质疑成立。我独立核过(公开 discussion + npm registry),结论:配方建在一个已被移除的机制上,而它声称验证的目标版本(0.2.0-rc.2 = 当前 latest)里这套机制已不存在。建议先别合。 我查到的证据npm registry(
两个 preset 包的分野(关键):
你引用的 deepseek-harness discussion #7545(有维护者 PerryLink 逐版本核对背书):目录式 PR 自身最硬的一条内部矛盾: PR 正文引用 为什么这是阻塞项这是 docs + 一行告警文案的 PR,全部价值就在那条配方可用。若配方指向一个死目录( 我没法自己验证的部分(诚实说明)我没在无头沙盒里真装 0.2.0-rc.2 跑
两条若如预测,即坐实配方在当前版本失效。 建议方向
一句话收工:你的判断有据,我的独立核查支持它——配方踩在被移除的旧机制上,且 PR 自述版本与其引用的内部实现自相矛盾。建议 hold,按新的组合条目机制重做后再合;是否合并仍由你定。 |
[bot] 🏷 关闭本 PR —— 其押注的机制已被上游移除,正确路径已由 #2474 / PR #2477 / PR #2476 承接。 为什么关(机制史,写全)本 PR 的核心配方 —— user root 下
结论:即使本 PR 合并,对任何现行 dsh(≥0.1.7)都无实际效果,方向本身是死路。 正确路径(已落地)#2474 证明不需要任何新机制:
感谢一路 review 的各位 —— @beicause 的早期质疑直接避免了这条死路被修完上线。 |
…-snapshot patch CAN switch off web-profile native auto-compaction (ranxianglei#2474) The ranxianglei#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 (ranxianglei#2476). Supersedes ranxianglei#1786's dead recipe (.agent-presets user root removed in dsh 0.1.7+). Refs ranxianglei#2474
Refs #1772 (follow-up to #1777)
What
#1777 made the silent failure visible and correctly scoped the docs: in profiles bundling
@deepseek-ai/dsh-web-app, the runningcompaction-basiclives inside an agent preset that no patch layer can reach by id, so the bundledauto: falselands on web-app's already-disabled host-plane row. The warning ended on a dead end: "dsh native auto-compaction stays enabled in this profile".This PR replaces the dead end with the sanctioned fix. dsh's preset roster exposes a user root (
$DSH_HOME/.agent-presets/,includeUserRoot: trueby default) that the Web UI's preset picker already writes to (dsh-client-ui-agent-preset→ settings namespaceagent-presets). So the failure mode #1772 reports is fixable without any upstream change:standardpreset (or copy the shippedpresets/standard/directory — bothpreset.ymlandagent.cordis.yml).agent.cordis.yml, under thecompactiongroup, give thecompaction-basicrowconfig: { auto: false }.agent-presets: { default: <copy-id> }).Manual
/compactand the tool-result pruner are kept — only automatic compaction turns off.How it was verified (dsh 0.2.0-rc.2, on the live host)
compaction-basichonors the knob:lib/index.jsregisters automatic compaction onlyif (this.config.auto);auto: config.auto ?? true;Config = z.object({ … auto: z.boolean() }).entryListSchema(cordis-plugin-include, includes the!!jstags plain js-yaml rejects); 18 entries; the row reads back as{ id: "compaction-basic", name: "@deepseek-ai/dsh-compaction-basic", config: { auto: false } }.dsh --profile web --dump-configshows thedsh.bundle.patch.yml禁用自动压缩在 web profile 下静默失效 #1772 mechanism verbatim: host rowcompaction-basiccarriesdisabled: true+ ourauto: false, while the live instance comes from the preset mounted by theagent-presetsroster row.@deepseek-ai/*packages from the installed harness (PresetTree.importindsh-agent-presets/lib/index.js), so a copied composition imports cleanly from outside the harness tree.Caveats documented with the recipe: a user preset id must not reuse a shipped id (the shipped root shadows duplicates); the copy is a snapshot — re-apply the one-line edit after dsh upgrades its presets; sessions created before the switch keep the old preset.
Changes
CLIENTS.md/CLIENTS.zh-CN.md— recipe bullet under thedsh.bundle.patch.yml禁用自动压缩在 web profile 下静默失效 #1772 caveat.src/agent/dsh-native.ts— one-time boot warning now points at the recipe (same durable channel, same once-per-process gating; no wire/config/persistence change).tests/dsh-native.test.ts— asserts the warning names the remedy.README.md/README.zh-CN.md—bili dshline: "off (web profiles: preset switch,dsh.bundle.patch.yml禁用自动压缩在 web profile 下静默失效 #1772 recipe)".Test evidence
npm run typecheck— clean.node --import tsx --test --test-name-pattern 1772 tests/dsh-native.test.ts— pass (9.98ms).tests/dsh-native.test.tsis environment-broken on this dev host regardless of this change (21 pre-existing ✖ + hang against live local proxies; pristineorigin/mastershows the identical run). The touched assertion is covered by the targeted run above; CI runs the suite clean.No config surface changes; no version bump (release PRs are separate).