Run one reversible loop.
- 01Record
Path, version, integrity or commit, Node, package manager.
- 02Stop
Dispose Web, workers, supervisors, and Session writers.
- 03Capture
Manifest, lockfile, patches, resolved graph, required Sessions.
- 04Isolate
Boot the exact target in a new home and workspace.
- 05Gate
Add pinned plugins one by one and test the full boundary.
- 06Decide
Promote exact evidence or restore and cold-boot known good.
Capture more than the version.
Path, exact version, integrity, remote, commit, and dirty diff.
Manifest, lockfile, build allowances, patches, and dump-config.
Stopped-writer backup using the active persistence contract.
Test the target without touching known good.
upgrade_home=$(mktemp -d)
upgrade_workspace=$(mktemp -d)
cd "$upgrade_workspace"
DSH_HOME="$upgrade_home" \
npx @deepseek-ai/dsh@<target-version> \
--profile web --dump-config > target-clean.yml
Pass ten compatibility gates.
Exact expected bytes
No stale state
Understood row diff
Expected credential
Denial still holds
One registration
Fresh + resume
Pinned compatibility
Writers dispose
Same cold result
Promote or restore exact state.
Use the same exact version and integrity, plus the reviewed profile graph.
Stop writers, restore executable and captured state, compare the dump, and cold boot.
If the target changed profile files or durable Session state, the old executable can still fail. Restore every boundary the target mutated, then prove the previous behavior.
Primary evidence.
- Official CLI and shutdown contract
- Official CLI package manifest
- Official Session persistence contract
Keep the complete upgrade record.
The canonical guide covers artifact identity, stopped-writer capture, isolated homes, plugin compatibility, failure routing, promotion, rollback, and a reusable evidence template.
Read the complete guide on GitHub