Repository navigation
Compaction config in cordis.patch.yml is silently ignored on web profiles — preset-mounted dsh-compaction-basic always runs with defaults, #12776
Replies: 3 comments
|
The override lands on a row that never mounts.
A profile patch keyed by The defaults are what you computed. What actually changes the running instance today: the preset row, not the base row. The On the three asks: a warning when a patch targets a disabled row would have to live in the include applier, which currently has no disabled concept; the "configure globally for all presets" lever does not exist because the plugin is per-preset by design; and the 65,536 default is a flat number, so the fix for small windows is to set |
|
I checked the The web patch disables the top-level However, the Rather than editing the shared installed With a 120,000-token window and an effective 16,000-token output reservation, the reported 38,464 threshold follows from the default formula. If setting I haven’t reproduced this on your installation, so the version/preset discrepancy remains an observation rather than a confirmed explanation. |
|
At I checked the same file at four refs: Which preset ran is in the session, not the patch file: the session meta carries For the effective configuration: If you send the |
Uh oh!
There was an error while loading. Please reload this page.
Compaction config in
cordis.patch.ymlis silently ignored on web profiles — preset-mounteddsh-compaction-basicalways runs with defaults, and the 65,536-token headroom default triggers compaction at ~32% of context on smaller modelsDSH version:
0.2.0-rc.2(dsh web, profileweb)Q: What happened?
Compaction fired at ~32% of context (~38.2K of 120K) while my
cordis.patch.ymlexplicitly configuredcompaction-basicwiththresholdRatio: 0.8. Tuning the patch (headroom, ratios, per-model policies) had zero effect — and the behavior appeared to change "randomly" between sessions, because different presets/models resolved different effective thresholds.Q: Why?
Two stacked issues:
The profile-patch entry targets a disabled row.
dsh-basedefines a top-level rowid: compaction-basic, but the web-app layer disables it (- id: compaction-basic/disabled: trueindsh-web-app/cordis.patch.yml). A user patch override on that id merges silently into a row that never mounts. No warning is emitted.The actually-running plugin comes from the agent preset (
preset-minimal,preset-standard,preset-ptc,preset-cordisinserts indsh-web-app/presets/*.patch.yml), and every preset shipscompaction-basicwith no config — so the plugin's built-in defaults apply. With defaults, the trigger is:On a 120K-context local model with 16K reserved output that is
min(96000, 38464)= 38,464 tokens ≈ 32% of the window.Evidence:
agent/pre-steppressure path) with metered totals of 31,239 and 14,433 tokens — far below the configured 96,000 threshold. The second fired immediately after the first because the usage-anchored baseline stays above 38,464 right after a compaction.dsh-compaction-basic/lib/index.js(headroomTokens ?? 65536→?? 0) made the 80% trigger work immediately for every preset — confirming the patched config never reached the mounted instance.Q: What is the expected behavior?
At minimum, one of:
patch: entry compaction-basic targets a disabled row, skipping— instead of silently merging into it. The loader already warns onentry not found; a disabled target deserves the same.config.plugins(whole-config replacement, no per-plugin merge), which freezes the preset definition and is impractical across four built-ins plus user presets.W − O − 65536 ≤ 0), disables proactive compaction entirely with only a single warn-once log line. A fraction-of-window default (or falling back to0when0.8 × Wis smaller) would behave sanely across window sizes.Q: How to reproduce
Run
dsh web(profileweb), select theminimalpreset, and use a model declared withcontextWindow: 120000andmaxTokens: 16000.Add to
cordis.patch.yml:Restart the profile and run a long session.
Observed: compaction fires at ~38.2K tokens (32%), ignoring the patched config entirely.
min(W × 0.8, W − O − 65536)predicts the observed trigger exactly.Q: Workaround
Edit the plugin defaults in
@deepseek-ai/dsh-compaction-basic/lib/index.js:One file covers every preset because profiles symlink to the shared install.
Written by GLM 5.3 Max
All reactions