deepseek-harness/docs
Yichen Jiang 8d06b2d576 feat(agent-presets): make the default preset a user setting
`config.default` becomes the composition base of an `agent-presets` settings
namespace, so the user document layers over the deployment's engineering
default and a person can change which preset new sessions get without a
restart.

The value is read per resolution rather than snapshotted: a hot-reloaded
document takes effect on the next session created, and every running session
stays on the preset it was composed from — which is the same rule the
session-header guard enforces from the other side.

`resolve()` read `config.default` directly, which would have made the whole
setting inert; it now goes through `defaultId` like every other caller.

The write-protection test is rewritten against a temp profile root. It was
passing vacuously: the un-overridden Loader REWRITES the composition it read —
stamping `disabled: true` onto the self-disposing row — so the committed
fixture had been mutated by the very run that proved the bug, and every later
run compared against the damaged file and passed. Building the preset in a
temp directory makes the assertion immune to its own failure mode, and it now
fails with a visible `+ disabled: true` when the override is removed.

Review follow-ups on this layer. The exported schema is
`AgentPresetSettingsSchema`, symmetric with the `AgentPresetSettings`
interface it resolves and self-describing at an import site. The `session.create`
JSDoc promised "the deployment's default preset" for an omitted `agentPreset`,
which this layer makes false — it now names the effective default. The
constructor records why it does not use `installSettingsSection`: that helper
re-judges what a consumer DERIVED across attach and detach, and nothing here is
derived. The provider-unload test disposes the fiber `ctx.plugin()` handed back
instead of reaching into `ctx.reflect.store`, and the write-protection wait says
why slack is the right shape for an absence assertion.

The real composition covers the layering too. `apps/cli` boots the shipped
`cordis.yml`, stores `agent-presets.default`, and asserts an unnamed session
composes from it — the package suite proves the layering against a hand-built
context, this proves the roster and the settings provider are wired to each
other. That test also pins the settings row at a temp file: it defaulted to
`$DSH_HOME/settings.yaml`, so a developer's own stored default decided the
outcome of a file whose whole point is that only the shipped root does.

The Agent Note records the per-resolution read and its correspondence with the
session header, and the vacuous-test finding above.
2026-08-07 00:36:54 +08:00
..
cookbook Merge remote-tracking branch 'origin/master' into xtr/react-loop-simplification 2026-08-05 20:43:30 +08:00
cordis-catalog feat(agent-presets): make the default preset a user setting 2026-08-07 00:36:54 +08:00
cordis-tutorial docs: profile scheme across guides, notes, and generated catalogs; Agent Note 2026-08-06 06:29:06 +08:00
core-data-structures fix(web): correct the preset-layer contracts review found stale 2026-08-07 00:35:30 +08:00
i18n docs: apply hierarchy across the corpus 2026-08-05 16:13:28 +08:00
postmortem docs: finish hierarchy rescan after rebase 2026-08-05 16:18:58 +08:00
user docs: tutorial for packaging and installing a plugin bundle 2026-08-06 17:28:40 +08:00
agent-lifecycle.md fix inbox lifecycle downstream contracts 2026-07-31 22:00:39 +08:00
AGENTS.md docs: define hierarchy and document forms 2026-08-05 16:13:27 +08:00
architecture.i18n.yaml fix(agent): route loop dispatches through prebuilt fused dispatcher 2026-08-06 13:44:23 +08:00
architecture.md fix(agent): route loop dispatches through prebuilt fused dispatcher 2026-08-06 13:44:23 +08:00
architecture.zh.md fix(agent): route loop dispatches through prebuilt fused dispatcher 2026-08-06 13:44:23 +08:00
capability-seams.md fix(agent-presets): bound the mount registry on a host that never reads it 2026-08-07 00:33:40 +08:00
config-catalog.md fix(web): correct the preset-layer contracts review found stale 2026-08-07 00:35:30 +08:00
cordis-paper.pdf docs: add cordis paper 2026-07-31 15:54:36 +08:00
cordis-primer.i18n.yaml docs(i18n): proofread active Chinese documentation 2026-08-04 17:36:14 +08:00
cordis-primer.md Merge remote-tracking branch 'origin/master' into worktree/pr343-retarget-latest-master 2026-07-23 13:40:29 +08:00
cordis-primer.zh.md docs(i18n): proofread active Chinese documentation 2026-08-04 17:36:14 +08:00
defensive-patterns.i18n.yaml Merge remote-tracking branch 'origin/master' into xtr/react-loop-simplification 2026-08-05 20:43:30 +08:00
defensive-patterns.md Merge remote-tracking branch 'origin/master' into xtr/react-loop-simplification 2026-08-05 20:43:30 +08:00
defensive-patterns.zh.md Merge remote-tracking branch 'origin/master' into xtr/react-loop-simplification 2026-08-05 20:43:30 +08:00
development.i18n.yaml docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
development.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
development.zh.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
event-producer-consumer.md feat(agent-presets): compose each session's agent from a preset cordis.yml 2026-08-06 21:03:18 +08:00
glossary.i18n.yaml docs(i18n): address proofreading review findings 2026-08-04 18:42:13 +08:00
glossary.md docs: align Goal Round step cardinality 2026-07-24 12:10:40 +08:00
glossary.zh.md docs(i18n): address proofreading review findings 2026-08-04 18:42:13 +08:00
graph-atlas.md cleanup: remove TUI package and legacy dsh entrypoints 2026-08-04 13:20:28 +08:00
module-graph.md feat(agent-presets): make the default preset a user setting 2026-08-07 00:36:54 +08:00
persistence-catalog.md feat(web): compose a web session's agent from a named preset 2026-08-07 00:35:30 +08:00
testing.i18n.yaml docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
testing.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
testing.zh.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
tool-catalog.md Merge remote-tracking branch 'origin/master' into feat/profile-plugin-management 2026-08-06 06:55:42 +08:00
tool-execution-pipeline.md Merge remote-tracking branch 'origin/master' into feat/send-unify 2026-07-23 22:41:45 +08:00
web-styling.i18n.yaml docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
web-styling.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
web-styling.zh.md docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00