Skip to content
Back to Learn
11Operations10 min readIntermediate

GUIDE 07 · OPERATIONS

Switch and Roll Back Precisely

A safe switch is two prepared installations: the target you intend to activate and the previous exact state you are ready to restore.

Last verified
Aug 15, 2026
Runtime
0.1.0-rc.8
Verified scope
  • Single active direct dependency
  • Exact rollback artifact record
  • CLI and real-runtime postflight checks
On this page
  1. Prepare both sides of the switch
  2. Roll back only from a matching state

Prepare both sides of the switch

The supported web-profile model keeps one direct @dsh-themes/* package active. Switching removes the previous package before adding the target, so recovery must be prepared before the first mutation.

  1. 01

    Inspect and identify the current state

    Read the direct package name and exact version from the web profile. Stop if dependencies are ambiguous or version ranges are present.

  2. 02

    Verify the target artifact

    Match the controlled download to its complete artifact SHA-256, manifest identity, exact compatibility, slug, and version.

  3. 03

    Verify the previous artifact

    Prepare the exact old tgz and digest, or record that the previous state is the built-in palette with no @dsh-themes/* package.

  4. 04

    Write the rollback record

    Record previous and target identities plus absolute verified artifact paths and complete-artifact digests. Do not include profile contents or credentials.

  5. 05

    Confirm the mutation

    Review current, target, compatibility, and prepared rollback information before removing anything.

bash
node /absolute/path/to/dsh-theme-manager/scripts/run-dsh.mjs plugin --profile web remove @dsh-themes/current-theme
node /absolute/path/to/dsh-theme-manager/scripts/run-dsh.mjs plugin --profile web add /absolute/path/to/verified-target.tgz --save-exact
node /absolute/path/to/dsh-theme-manager/scripts/run-dsh.mjs plugin --profile web list --json
node /absolute/path/to/dsh-theme-manager/scripts/run-dsh.mjs --profile web --dump-config
Command shape only. Use exact package identities and previously verified absolute artifact paths.

Roll back only from a matching state

  1. 01

    Validate the record

    Reject malformed, incomplete, moved, or mismatched artifact references before changing the profile.

  2. 02

    Confirm the current target still matches

    Do not consume a rollback record against a profile that has changed independently since the switch.

  3. 03

    Re-verify the previous artifact

    Check the complete bytes again immediately before installation. Payload hashes are not substitutes.

  4. 04

    Remove the target and restore the exact prior state

    Install the prior exact package, or leave no @dsh-themes/* package when returning to the built-in palette.

  5. 05

    Restart and verify

    Confirm one expected direct dependency, inspect the dumped configuration, restart DSH, and verify the real runtime identity.

Operate from verified inputs

Common questions

Before you make a change

Answers about formats, compatibility, evidence, and rollback.

What does this guide verify?

This guide covers: Single active direct dependency; Exact rollback artifact record; CLI and real-runtime postflight checks

What should I do first?

A safe switch is two prepared installations: the target you intend to activate and the previous exact state you are ready to restore.

Which boundary matters most?

If a switch partially fails, remove a partial target and reinstall the already prepared previous artifact. The intended steady state is one direct @dsh-themes/* package or the built-in palette.

Continue learning

Continue from the verified evidence

Compare published artifacts or return to the installation documentation.