DSH upgrade baseline: diff dump-config before and after
When behavior changes after a DeepSeek Harness upgrade and nobody edited the config, the cause is often configuration drift: defaults, fields, or layer order changed underneath you. The efficient response is a before/after diff, not clicking through settings. --dump-config captures values; --dump-config-schema captures declarations.
DeepSeek Harness: What to save before upgrading
Save at least the effective tree and the field schema; optionally save the template baseline too. Three baselines:(source)
| Baseline | Command | Purpose |
|---|---|---|
| Effective config | --dump-config | See which values changed |
| Field schema | --dump-config-schema | See which fields, defaults, or constraints changed |
| Template baseline | --dump-default-config | See whether bundle defaults changed |
The effective config applies the profile cordis.patch.yml, the home patch, and command-line --patch overlays, and includes source comments. It is the tree the process actually uses.
Store baselines outside the profile directory, such as /tmp/dsh-baseline/ or a separate operations repository. Do not put them somewhere a rebuild or cleanup will delete.
DeepSeek Harness: A script you can run
Use a version tag in the filename and capture all three artifacts in one go. Example:(source)
tag="$1"
dsh --profile web --dump-config > "/tmp/dsh-$tag-config.yml"
dsh --profile web --dump-config-schema > "/tmp/dsh-$tag-schema.json"
printf '%s\n' "$tag" > "/tmp/dsh-$tag-version.txt"
dsh -V >> "/tmp/dsh-$tag-version.txt"
Run it before and after the upgrade, then compare:
diff -u /tmp/dsh-before/config.yml /tmp/dsh-after/config.yml
jq -S . /tmp/dsh-before/schema.json > /tmp/before.sorted.json
jq -S . /tmp/dsh-after/schema.json > /tmp/after.sorted.json
diff -u /tmp/before.sorted.json /tmp/after.sorted.json
- Run the effective diff first — focus on value changes and ignore comments and path noise. Expected: added, removed, and changed rows are visible.
- Run the schema diff second — look for field additions, removals, default changes, and partial markers. Expected: explains why a field behaves differently.
- Check the default baseline last — if the effective tree did not change but schema did, compare
--dump-default-config. Expected: separates “my patch changed” from “the new default changed”.
Filter comments before comparing; source paths change and create noise.
DeepSeek Harness: Reading three kinds of diff
The same “difference” needs different handling: default changes need evaluation, overrides need correction, field removals need migration. Three kinds:(source)
- Default value change — your patch did not change, but the final value did. Expected: check release notes or the config catalog; pin the old value explicitly if needed.
- Override change — another layer now wins. Expected: use the source comment to find the patch and adjust order or remove duplication.
- Field addition, removal, or rename — schema shows new or missing fields, or a partial marker. Expected: rewrite the config against the new schema.
If the diff is mostly reordered rows, check whether bundle order changed; order affects which layer wins.
DeepSeek Harness: Three baseline strategies
One-off upgrades, CI pipelines, and multi-machine fleets store baselines differently. Compare:(source)
- One-off upgrade — export before and diff once. Expected: lowest cost for a personal machine.
- CI pipeline — export schema on every build and diff with the previous version. Expected: catch breaking field changes early.
- Multi-machine fleet — export effective config per machine and compare centrally. Expected: find “same version, different behavior” cases.
Multi-machine fleets need the effective tree, not only schema, because each machine may have a different home patch.
DeepSeek Harness: Limits and safety
Dump is an inspection tool; it does not execute plugins and does not prove startup will succeed. Four limits:(source)
- No application arguments —
--portand--hostare rejected because dump shows the tree before app argument parsing. - Sensitive output — defaults, paths, and plugin errors may contain sensitive data; redact before sharing.
- Partial schema — callback validation and unsupported regex cannot be fully projected.
- Profile initialization — the first dump for a profile may create missing base files; that is normal.
The three dump modes are mutually exclusive. Do not try to produce YAML and schema from one command.
DeepSeek Harness FAQ
There is no diff, but users report a behavior change. What next? Check runtime input, model routing, and session logs. A config baseline only rules out config drift; it cannot rule out model, network, or plugin changes.
Can I turn the diff into an alert? Yes, but filter comments and paths first and compare against a field whitelist; otherwise every upgrade produces noise.
A field still exists but behavior changed—why? The field can remain while its default or implementation changes. Compare default annotations and read the release notes; pin the value explicitly if needed.
The short version: save “values” and “fields” before upgrading, diff both afterward, then attribute the difference; without a baseline, every behavior change is a guess.
FAQ
DeepSeek Harness: save at least two: the effective tree from --dump-config and the field schema from --dump-config-schema. The first shows current values, the second shows fields, defaults, and constraints. One without the other cannot distinguish a value change from a field change.
DeepSeek Harness --dump-config stacks bundles, profile patch, home patch, and command-line patch. An upgrade can change bundle defaults or field projection, so the final value changes even when your patch did not.
DeepSeek Harness: do not commit it directly. Dump output may contain defaults, paths, and sensitive configuration. Redact it first and check for credential references; schema defaults and plugin errors can also contain sensitive data.
DeepSeek Harness: read stderr for missing patch targets or schema projection failures. --dump-config-schema may keep partial output and exit 1. Do not use incomplete output as a full baseline; fix the configuration layer and run again.
DeepSeek Harness: that shows the template baseline only. It does not apply profile, home, or command-line patches, so it can answer whether defaults changed but cannot replace the effective-value comparison.
Related Terms
- configuration drift
- Configuration drift is a difference between the effective configuration and a prior baseline, caused by default changes, field additions or removals, or a change in patch layer order.— DeepSeek Harness reference - dsh CLI behavior
- effective configuration tree
- The effective configuration tree is the result of stacking bundle layers, the profile patch, the home patch, and command-line patches. --dump-config prints it with source comments.— DeepSeek Harness reference - dsh CLI behavior
- schema projection
- Schema projection is the conversion of plugin Config declarations into JSON Schema by --dump-config-schema. Constraints that cannot be projected are marked partial.— DeepSeek Harness reference - dsh CLI behavior
- partial
- partial is a schema dump marker meaning some constraints were not fully projected. The output is still useful but is not a complete equivalent of runtime validation.— DeepSeek Harness reference - dsh CLI behavior
Sources
- DeepSeek Harness reference - dsh CLI behavior· deepseek-ai
- DeepSeek Harness reference - Plugin configuration catalog· deepseek-ai