Skip to content
Projects

Dicklesworthstone/doodlestein_self_releaser

View on GitHub

About

Local release tool that reuses your GitHub Actions workflow YAML to build via nektos/act when CI queues are throttled, then uploads artifacts to GitHub Releases

Developer Tools

How these counts are measured

What you can do

  • Zero config builds - Reuses your .github/workflows/release.yml — no parallel build system to maintain
  • Multi-platform - Builds on Linux (act), macOS (native), Windows (native) via SSH
  • Signed releases - Minisign signatures + SBOM generation built in
  • Queue detection - Monitors GH Actions queue time, triggers fallback automatically

Measured star growth

in 24h
0
in 7 days
+1
in 15 days
+2
in 1 month
+3

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

dsr — Doodlestein Self-Releaser

dsr - Fallback release infrastructure for when GitHub Actions is throttled

Fallback release infrastructure for when GitHub Actions is throttled.

License: MIT Bash 4.0+

Quick Install

curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/doodlestein_self_releaser/main/install.sh?$(date +%s)" | bash

When GitHub Actions queue times exceed 10 minutes, dsr takes over — reusing your existing workflow YAML to build locally via nektos/act, then uploads artifacts to GitHub Releases.


TL;DR

The Problem: GitHub Actions gets throttled during peak times. Your release sits in queue for 20+ minutes while users wait.

The Solution: dsr detects throttling, builds locally using your existing workflow files, and uploads to GitHub Releases — same artifacts, no queue.

Why Use dsr?

Feature What It Does
Zero config builds Reuses your .github/workflows/release.yml — no parallel build system to maintain
Multi-platform Builds on Linux (act), macOS (native), Windows (native) via SSH
Signed releases Minisign signatures + SBOM generation built in
Queue detection Monitors GH Actions queue time, triggers fallback automatically

Quick Example

# Check if any repos are throttled
$ dsr check --all
Checking ntm... queued 12m (threshold: 10m) ⚠️
Checking bv... ok ✓
Checking cass... ok ✓

# Build locally when throttled
$ dsr build --repo ntm --version v1.2.3
Building ntm v1.2.3 for linux/amd64, darwin/arm64, windows/amd64...
  linux/amd64   [act on linux-builder]     ✓ 45s
  darwin/arm64  [native on mac-builder] ✓ 32s
  windows/amd64 [native on win-builder]  ✓ 51s
Artifacts: /tmp/dsr/artifacts/ntm-v1.2.3/

# Upload to GitHub Release
$ dsr release --repo ntm --version v1.2.3
Uploading 6 assets to ntm v1.2.3...
  ntm-linux-amd64           ✓
  ntm-linux-amd64.minisig   ✓
  ntm-darwin-arm64          ✓
  ntm-darwin-arm64.minisig  ✓
  ntm-windows-amd64.exe     ✓
  ntm-windows-amd64.exe.minisig ✓
Release: https://github.com/Dicklesworthstone/ntm/releases/tag/v1.2.3

# Or do it all in one command
$ dsr fallback --repo ntm --version v1.2.3

Design Philosophy

  1. Reuse, don't reinvent — Your GitHub Actions workflow is the source of truth. dsr runs it locally via act, not a parallel build system.

  2. Detect, don't guess — Queue time monitoring tells you exactly when to fall back. No manual threshold tuning.

  3. Same artifacts, different path — Users get identical binaries whether built by GH Actions or dsr.

  4. Fail loudly, recover gracefully — Structured exit codes (0-8) and JSON output for scripting. Partial failures are reported, not hidden.

  5. Local-first, cloud-optional — Works offline. SSH to your Mac Mini and Windows laptop for native builds.


Comparison

Feature dsr Manual builds GoReleaser GitHub-hosted runners
Uses existing workflow ✅ ❌ ❌ Config needed ✅
Multi-platform builds ✅ Linux/macOS/Windows Manual ✅ ✅
Queue detection ✅ Automatic ❌ ❌ N/A
Signing ✅ Minisign Manual ✅ GPG/cosign ✅
SBOM generation ✅ syft Manual ✅ ✅
Cost Free Free Free $$/min

When to use dsr:

  • You have existing GH Actions release workflows
  • You want a fallback for throttled queues
  • You have SSH access to macOS/Windows machines for native builds

When dsr might not be ideal:

  • You don't use GitHub Actions
  • You need builds on platforms you don't have machines for
  • You want a full CI/CD replacement (dsr is a fallback, not a replacement)

Installation

From Source

git clone https://github.com/Dicklesworthstone/doodlestein_self_releaser.git
cd doodlestein_self_releaser
chmod +x dsr
sudo ln -s "$(pwd)/dsr" /usr/local/bin/dsr

Install a signed release

With a trusted copy of the current installer and an independently verified Minisign public key, install directly from the release assets:

bash ./install.sh --version v0.2.3 --release-pubkey /path/to/trusted/minisign.pub

The installer downloads the signature and source tarball for that tag over HTTPS, verifies the signature, and checks the version inside the archive before switching the launcher. Failure leaves the existing installation in place. Both downloads use the installer's per-request timeout.

Install a signed source archive offline

Use a trusted copy of install.sh whose help lists --offline-pubkey. Place the release tarball and its .minisig file together. Supply the release public key you have independently verified. For example, to install the v0.2.3 source archive using an installer that supports signed offline installation:

bash ./install.sh --help | grep -F -- '--offline-pubkey' >/dev/null &&
  bash ./install.sh --offline doodlestein_self_releaser-v0.2.3.tar.gz \
    --offline-pubkey /path/to/trusted/minisign.pub --version v0.2.3

The installer runs Minisign on the staged archive before listing or extracting it. A missing verifier, missing proof, or signature mismatch stops installation. --version also checks the version marker in the authenticated source.

Dependencies

Required:

  • Bash 4.0+ (macOS ships with 3.x — brew install bash)
  • git — Version control
  • gh — GitHub CLI for API access
  • jq — JSON parsing
  • yq (mikefarah v4) — Read and safely edit YAML configuration

For automatic Rust and Python version detection:

  • Python 3.11+ — Parse Cargo.toml and pyproject.toml with the standard TOML parser

For local builds:

  • docker — Required for nektos/act containers
  • act — brew install act or nektos/act releases

CRITICAL: act Configuration Required

The default act runner images (catthehacker/ubuntu) run as UID 1001. If you use --bind in your ~/.actrc without proper user mapping, files created by act will have wrong ownership, breaking access for other processes.

After installing act, copy the example config:

cp config/actrc.example ~/.actrc

Or add this line to your ~/.actrc (replace 1000:1000 with your UID:GID from id):

--container-options --user=1000:1000

Run dsr doctor to verify your configuration.

See docs/ACT_SETUP.md for complete setup instructions.

For multi-platform builds:

  • ssh — Access to macOS/Windows build machines

For signing:

  • minisign — brew install minisign
  • syft — For SBOM generation

Verify Installation

dsr doctor

Quick Start

1. Initialize Configuration

dsr config init

This creates ~/.config/dsr/config.yaml with defaults.

2. Add Repositories

dsr repos add Dicklesworthstone/ntm --local-path /data/projects/ntm --language go

3. Configure Build Hosts (Optional)

Edit ~/.config/dsr/hosts.yaml:

hosts:
  linux-builder:
    platform: linux/amd64
    connection: local
  mac-builder:
    platform: darwin/arm64
    connection: ssh
    ssh_host: mac-builder
  linux-builder-2:
    platform: linux/amd64
    connection: ssh
    ssh_host: linux-builder-2
    build_root: /var/tmp/dsr-builds   # optional: disk-backed staging root
  win-builder:
    platform: windows/amd64
    connection: ssh
    ssh_host: win-builder

Ensure hosts have required toolchains for your repos (rust/go/bun) and that linux-builder has Docker + act for Linux builds.

Native host selection checks the toolchain used by a plain cargo, go, bun, or node build command. Rust readiness requires both Cargo and rustc to run successfully. The same requirement applies before source transfer and again before compilation, including explicitly pinned hosts. Recipes that select an executable path, wrapper, or nondefault toolchain keep their existing build context checks instead of being judged against an unrelated ambient compiler.

Cancellation during readiness stops host selection and source/build admission. Interrupted connectivity, storage, compiler, Docker and clock probes retain their signal status, discard partial output and leave no completed health-cache entry. DSR does not try another host or start compilation after that cancellation. Ordinary SSH failures and owned deadlines retain their existing unhealthy-host handling.

Automatic native scheduling selects hosts with the requested operating system and architecture. A free x64 host cannot displace an ARM64 builder solely because both run Linux. When matching hosts are busy, the build waits for their capacity. Intentional cross builds remain available through per-repository cross_compile.<platform>.host or hosts pins, and explicit platform_mapping fallbacks. An unconfigured legacy host alias cannot supply a missing architecture; the build strategy and matrix report failure instead of emitting an empty route.

Unix source synchronization preserves file contents, permissions and links, while newly transferred files belong to the account receiving the build over SSH. This also applies to root workers and the tar fallback, so a macOS controller's numeric UID is not imported into a Linux checkout. An existing destination or .git entry owned by another account stops synchronization with the path and both UIDs in the error. Select a fresh build stage or repair that checkout's ownership before retrying; DSR does not add Git safe.directory exceptions or change ownership of existing projects.

Release snapshots and isolated Rust builds are staged under /var/tmp on Linux hosts and /private/tmp on macOS — never /tmp, which is frequently a RAM-backed tmpfs that a multi-GB source tree plus Cargo target will exhaust. Set build_root on a host to stage somewhere else (a bigger disk, or a host whose /var/tmp is also RAM-backed); DSR_STRICT_BUILD_ROOT still overrides it for strict release snapshots. Either way dsr refuses to stage onto a tmpfs/ramfs root and tells you to set build_root.

Every new Unix strict snapshot has a .sbh-protect marker in its private run directory before source extraction. The marker protects the source archives, private Cargo caches, and compiler outputs from SBH cleanup, including emergency cleanup. It sits outside the authenticated source tree and remains with the retained snapshot.

Strict snapshots must also live on a filesystem that preserves POSIX file modes. ExFAT, FAT and some FUSE/SMB mounts report every file as executable, so a tracked 100644 file can no longer be distinguished from a 100755 one. dsr verifies each extracted snapshot (bytes, modes, links and the exact node count) immediately after transfer, before any target compiles, and names the first offending path, its Git mode, the observed mode and the backing filesystem. On a Mac whose only large disk is an external ExFAT drive, create an APFS disk image on it (hdiutil create -size 200g -fs APFS -volname dsr-builds /Volumes/External/dsr-builds.sparseimage -type SPARSE), attach it, and point build_root at the mounted volume.

Set DSR_KEEP_BUILD_STAGES=1 to retain isolated Rust source and Cargo-home staging directories after a native build, including failed or cancelled builds. This is useful for inspecting a build or when automatic deletion is prohibited. Retained stages consume disk space; the build log records their paths. Source isolation, artifact collection, and verification run normally.

Native Unix builds require Python 3.9+ on the build host. A host-side supervisor owns a separate process group and enforces the build deadline, including when the SSH connection closes or the supervisor is killed or stopped. Completion also retires lingering children, with a short graceful shutdown before forced termination. Build output passes through unchanged. This contains normal child processes; trusted build commands that deliberately create a separate session can escape the group. Strict Rust builds retain their Python 3.11+ requirement.

Ordinary native Rust builds also give every attempt a fresh final output directory. A configured absolute CARGO_TARGET_DIR names the base directory; DSR builds and collects from a unique child beneath it. This applies to single targets as well as target matrices, so a successful command that produces no new binary cannot publish an older binary from a shared target directory. Dependency-cache reuse is unchanged, and prior attempt outputs are retained.

Strict native source snapshots include initialized project submodules and their nested submodules at the commits recorded by their parent Git trees. Initialize the checkout with git submodule update --init --recursive before building. DSR reads and authenticates the selected commit, tree and blob objects directly; submodule URLs and mutable child HEADs cannot select release bytes. Missing pinned objects, external Git object stores and unsafe administration pointers are refused without fetching. Ordinary absorbed submodules and self-contained child repositories are supported. The coordinator needs Python 3.9+ for these recursive exports.

Each native snapshot retains a deterministic archive and its complete Git manifest for independent staging, collection and recovery checks. Unix keeps safe tracked links; Windows materializes safe file links as regular copies. A link must stay inside its own repository, including during .. traversal. Both receivers reject changed submodule bytes and unlisted files. Each archive is bounded to 16 nested levels, 256 repositories and 100,000 Git tree entries.

Strict native Go builds preserve pinned sibling modules in each target's private output stage. Configure each sibling in sibling_crates with an exact revision and a unique relative_path; relative go.mod replacements and committed go.work entries then see the same layout as the source snapshot. DSR verifies the copied main and sibling trees against their independent Git manifests before running the build command, including file bytes, executable modes, links, and unexpected files. Final source checks still verify the original snapshots, and release manifests retain the sibling commit identities. On Windows, each attempt expands the authenticated Git archives into a fresh private stage on the source volume, including safe tracked-link materialization. The complete source tuple is checked before compilation and the original snapshots are checked again afterward. Collection reads the attempt's output, so in-tree executables do not alter the frozen release inputs or reuse an earlier attempt's binary.

With default in-tree Go outputs, multiple strict targets can build concurrently on the same Unix host using separate verified stages. Explicit GOBIN paths, external outputs, and Windows hosts retain serialization for conflicting files. Unix staging reserves the sibling names source and cargo-home, and verifies that every controller checkout still matches its pin before staging. Source-root verification is separate from Go compiler and module-cache isolation.

For native recipes that directly run go build or go install, DSR collects the output selected by that command. An explicit -o file is collected from that exact path; an output directory, default build name, or installation target is resolved with Go on the selected worker. The configured release binary name is preserved even when the compiler's output has a different name. An existing executable in GOBIN cannot substitute for go build -o tool .. Workspace recipes must identify one unambiguous producer for every requested executable; compiling library packages alone does not establish an output.

For strict releases, direct Go commands must use relative local source paths inside the pinned main, sibling or submodule graph. This includes .go files, local packages and directory changes through cd, env -C or go -C. Absolute source paths, untracked inputs and linked directories are refused; absolute output destinations remain supported. DSR disables inherited CDPATH and checks each directory change before normalization. Workfile selection belongs in the recipe's env; direct commands must preserve the managed GOENV and GOWORK policy. Resume and publication repeat these checks. Earlier strict Go receipts require a fresh build under DSR_GO_ENV_POLICY=4.

Use literal foreground commands for direct Go recipes. Conditional output selection, unmodelled shell state changes and ambiguous variable expansion are refused before dispatch. A final mkdir -p dist && go build -o dist/tool . chain is supported, including multiple executable producers joined with &&. A chain such as false && go build -o tool .; true is refused: its successful shell status cannot prove that the compiler ran. Unix standalone producers separated by ; retain the worker's error-stop behavior. Windows CMD recipes must keep their producers in the final && chain; a later & or newline can otherwise conceal a failed build. CMD directory changes across drives require an explicit cd /d. Shell expansions that can mutate compiler settings are also refused in surrounding commands and redirection paths.

Configure intentional GOFLAGS in the recipe's env entries: different inherited or persisted worker flags prevent collection, including flags that make a successful command produce no executable. Output metadata queries use the worker's Go context, disable dependency downloads, retain timeout supervision, and refuse changes to Go source control files. Recipes that invoke a separate build script keep their declared artifact convention.

Strict Go workers also clear inherited compiler and source selectors before applying the reviewed repository recipe. They use GOENV=off, empty GOFLAGS, GOTOOLCHAIN=local, and GO111MODULE=on by default. A committed root go.work is selected inside the private stage; otherwise GOWORK=off. An explicit GOWORK must identify a committed regular file in the admitted main or sibling repository and is rebased into that stage. Configure intentional compiler flags and toolchain selection in the recipe's env entries.

The manifest records those selectors and the selected workfile's commit and SHA-256 in build_influence_env. Strict resume and publication require complete, matching native Go receipts. Start a fresh release build for an older checkpoint without this policy evidence. Host caches and download policy remain available; these receipts describe source selection and configured compiler settings, not a complete compiler or dependency-cache attestation.

Strict native Rust builds seed private Cargo homes with downloads selected by the committed Cargo.lock: checksum-matching crate archives, their index records, and Git databases containing locked commits. Ambient extracted registry sources and ordinary Git checkouts are never copied; Cargo recreates them offline from the selected downloads. A locked Git commit containing submodules also retains its matching checkout and self-contained nested Git stores, so Cargo can resolve those submodules offline. The checkout must have the exact locked HEAD; each nested commit and its source bytes are then authenticated against the gitlink in its parent before the seed is admitted. Unrelated cached links, special files, and large archives do not enter the seed, and an unused Git cache on another volume is not opened. Selection covers the complete lockfile, including other targets and features; selected Git databases and legacy registry Git indexes retain their history. It is not a minimal target graph. Strict Unix hosts require Python 3.11+; strict Windows hosts require PowerShell 7.4+ and a local NTFS Cargo cache. Configuration, credentials, symlinks, Windows reparse points, and external Git storage pointers are excluded or refused. The first successful locked, offline metadata resolution publishes a retained seed alongside the source snapshot. If that first resolution lacks dependencies, no seed is published: refill the ambient cache and retry. Once admitted, the seed survives deletion or in-place changes to the ambient cache, and every metadata invocation and target attempt receives a fresh copy. Retained seeds contain the selected downloads and any required submodule checkouts; ordinary sources unpacked during metadata do not enter the seed. Retries must match the seed's original lockfile selection and inventory. The selected lockfile hash must agree with the lockfile used to authenticate dependency sources. Parallel targets therefore do not share writable dependency files.

Before a strict native seed is admitted, DSR authenticates the resolved dependency source files against the committed Cargo.lock. Registry archives must have their locked SHA-256 checksums, and their extracted files must match those archives. Git checkouts must match the locked commit's actual objects. This covers the all-features graph from every workspace member on both Unix and Windows. Nested Git submodules use the parent's authenticated gitlink as their commit authority, independently of a mutable child HEAD or URL. Missing, modified or substituted submodule sources and external Git administration pointers are refused. Windows dependency sources still refuse symlinks and reparse points. Vendored sources have a separate trust basis: they must be inside the primary workspace's independently verified source snapshot. The coordinator holds hashes of metadata and source evidence, verifies them before project compilation, and independently rechecks the source files before artifact collection. Editing a cached dependency, metadata, or a remote receipt refuses publication even when Cargo successfully compiles it. The compact evidence is retained as cargo_isolation.dependency_sources; full source inventories stay in each attempt's private Cargo home. Windows uses native handles and the .NET archive reader without extracting another untrusted archive, rejects ambiguous Windows paths and case collisions, and accepts Cargo-generated lockfile versions 3 and 4, including unused patch records without treating them as resolved pins. Guarded filesystem identities bind workspace and manifest selection, lockfile, cache and vendor boundaries, including on case-sensitive Windows directories.

Strict Windows Rust builds also use one Cargo command context for metadata and compilation. A literal cargo +nightly build --release, for example, resolves its dependencies with the selected nightly Cargo instead of the host's default. Both operations use the system CMD launcher with the same working directory, configured environment, compiler/SDK cleanup, and native-build RCH bypass. The admitted context includes the selected Cargo, rustc and linker paths, executable SHA-256 hashes, and reported versions. Rustup proxies also retain the resolved selected-toolchain executables. A proxy must match the bytes of a separately located Rustup manager; version responses alone cannot establish its identity. A matching host installation reference can recognize copied proxies when the configured build PATH hides their manager. This reference never replaces the Cargo or compiler selected for the build. An unrecognized program cannot claim Rustup resolution evidence; explicit +toolchain commands require that evidence. Before dependency metadata, DSR asks the selected rustc to perform a small link to identify its default linker, including Visual Studio discovery. These identities are checked around metadata and compilation and again in the independent collection step. Changing a tool, command, relevant environment, Cargo configuration, or toolchain selection file prevents artifact collection, even if compilation succeeds. Results, durable state and manifests retain the full identities under cargo_isolation.toolchain and the context digests under cargo_isolation.cargo_context. General environment values remain digest-only; the bounded Cargo [env] settings RUST_MIN_STACK, RUST_TEST_THREADS, and CARGO_INCREMENTAL retain their configured and effective values in toolchain evidence. The two RUST_* settings require positive-integer strings; CARGO_INCREMENTAL accepts only the string "0". These settings support literal strings and inline tables with Boolean force and absent or false relative. Cargo applies [env] to its children, so force=true cannot override Cargo's own incremental mode. An incoming CARGO_INCREMENTAL other than 0 therefore refuses this exemption even with force=true. Set CARGO_INCREMENTAL=0 in the build environment to force Cargo itself to disable incremental compilation; a tracked [env] value alone does not override the selected profile.

This Windows boundary accepts one literal cargo build or cargo rustc command, an optional first +toolchain, and ordinary Cargo build options. Quote whole arguments containing spaces, such as --features "feature_a feature_b". Shell chains, variable expansion, redirection, quote concatenation, --config/-C/-Z, alternate manifests, and compiler argument tails after -- are refused before dependency admission. Metadata intentionally retains the locked, offline, all-features source-closure policy; it does not claim an exact feature graph match.

Windows executable attestation accepts native executables and proven rustup dispatch. Cargo or compiler script wrappers and Cargo plugins are refused. Tracked Cargo configuration supports literal build/compiler settings, literal target linkers and Rust flags, and ordinary source/registry settings. Dynamic selectors, configuration includes, inline tables, general [env] injection, and Rust flags that change compiler or linker selection are refused. Configure an overridden compiler or linker with an absolute path, or a tracked configuration path relative to the project. A default Windows linker that rustc cannot identify with an absolute path also requires explicit configuration. Hosts using a nondefault rustup installation must configure RUSTUP_HOME explicitly. Toolchain probe files are retained beside the private Cargo home. These measurements cover native executable entry points and recognized Rustup dispatch. The host's native executables remain trusted to honor their arguments and selectors; DSR does not infer every subprocess inside a custom executable.

Resume verifies the retained seed inventory before copying it. Changes to seed bytes or unsafe cache entries are refused; a legacy snapshot whose cache roots are symlinks or Windows junctions requires a new strict run. Cargo may legitimately unpack archives or reconstruct Git checkouts in an attempt's private home. After a successful build, DSR checks that the attempt's seed receipt has its original digest and records the final inventory before collecting artifacts. Configuration, special files, symlinks, and hardlinks with owners outside the private cache trees block collection; hardlinks entirely within those trees are permitted. Build results record cargo_isolation.dependency_cache.seed and .final, with cargo_isolation.cache_reuse: []; failed targets retain their seed evidence without a final inventory. These are retained local integrity records; they do not protect against a build host rewriting all its evidence.

The copies retain the selected Git databases and registry index history, and each private attempt also stores Cargo's recreated source trees. They remain alongside the strict snapshot, so allow disk space for the retained seed and each metadata or target attempt.

Ordinary (non-strict) native Rust builds get the same protection. Each target's fresh stage root receives a private copy of the ambient registry and git caches (${CARGO_HOME:-~/.cargo}) before its build command starts, never the ambient configuration or credentials, so pruning or rewriting the host's Cargo cache cannot break a running build. Cargo may still download missing dependencies into the private home. After a successful build the private home's final inventory is checked like a strict one; configuration, links or special files added there refuse artifact collection. The result records cargo_isolation.dependency_cache.seed/.final with cache_reuse: []. This requires Python 3.9+ on Unix or PowerShell 7 on Windows, and the copy is removed with the stage root unless DSR_KEEP_BUILD_STAGES=1. Windows uses native file handles to refuse reparse points, concurrent file writes during copying and external hardlinks in private caches. The same seed/final inventory fields are retained for both host platforms; Windows receipt paths use C:/... form. The cargo-xwin backend already uses private dependency copies separately.

Strict native Unix Rust builds can opt into a host-local intermediate cache with strict_cargo_cache_root: /absolute/private/cache in the repository build config. The operator must create that canonical directory owned by the build user with mode 0700; symlink and writable ancestor paths are refused. This requires Python 3.11+ and nightly Cargo/rustc with build.build-dir and checksum-freshness support. Stable toolchains and graphs containing any build script are refused: Cargo still uses timestamps for rerun-if-changed inputs even in checksum mode. Admission uses frozen, offline dependency metadata and requires an existing lockfile and locally available dependencies. Windows and ordinary builds reject this option. No active build configuration is changed automatically. The configured recipe is trusted: every Cargo invocation must build the admitted workspace and preserve DSR's forced freshness environment. Recipes that change the Cargo workspace via cd or --manifest-path, or override freshness settings, are unsupported. DSR does not parse arbitrary shell recipes to prove this rule.

DSR still builds the immutable source snapshot with an isolated Cargo home and a fresh final target directory. A namespace includes the tool, target, configured command, profile, compiler identities, build environment, and macOS SDK settings. Cargo checks source/dependency contents across releases, including snapshots whose changed files have equal or older timestamps. This option cannot currently be enabled for projects with build scripts, including FrankenTerm. An exclusive lock covers the complete build command and detachment of hard-linked final outputs; contention fails explicitly. Artifact collection uses only the private run's outputs, never the shared intermediates, and requires a successful build/cache receipt. Existing source, family, signature, and test gates remain mandatory. The cache is trusted build-host state, not independent source provenance. Retain its directory between runs; DSR does not prune it. Benefit must be measured as dependency reuse: final linking and test execution are not skipped. The receipt hashes resolved Cargo/rustc executables separately from launch wrappers. SDK settings/Xcode identity and configured native tool hashes are namespace inputs; this is not a recursive digest of SDK headers or the Rust sysroot. Those installations must remain immutable during cache use; replace the private cache root when modifying their bytes in place without changing their recorded identities. Unknown Cargo/rustc launcher scripts are refused even if their version output matches. Explicit RUSTC_WRAPPER and RUSTC_WORKSPACE_WRAPPER are unsupported with caching; omit the cache option for recipes requiring those wrappers. The reviewed RCH shim v4/toolchain wrapper v3 bytes are accepted only with the native bypass and without real-executable overrides; upgrades require review. For default Apple C/C++ launchers, the receipt also hashes the actual clang selected by xcrun --find, rather than treating /usr/bin/cc as that compiler.

Windows Rust source staging uses Robocopy with eight copy threads to avoid the per-file PowerShell overhead on large dependency trees. It preserves empty directories, file attributes, timestamps, and links without following link targets. Copy failures, unexpected destination files, and mismatches stop the build; the copy never purges files. Compiler concurrency and build time limits are unchanged.

4. Set Up Signing (Recommended)

dsr signing init

This generates a minisign key pair at ~/.config/dsr/secrets/minisign.key and ~/.config/dsr/minisign.pub. For a fail-closed strict release, commit the public key into the tool's own repository and set release_contract.minisign_public_key_file to that safe repository-relative path. DSR pins the key bytes to the release tag, requires one <primary>.minisig per contracted primary, and verifies downloaded release bytes before publication and during dsr release verify. The private key stays outside the repository and may be selected with DSR_MINISIGN_KEY.

For unattended signing with a password-protected key, set DSR_MINISIGN_PASSWORD_FILE to a private password file supplied by your secret store. The variable contains a path, never the password itself:

DSR_MINISIGN_PASSWORD_FILE=/run/user/1000/dsr/minisign-password \
  dsr --non-interactive fallback mytool --version 1.2.3

The file must be owned by the current user, have no group/other permissions (normally 0600 or 0400), be a regular file rather than a symlink, and have one hard link. It contains one password line, with an optional final newline. DSR opens and validates it separately for each new signature and supplies the password through a private pipe; artifact inventories on stdin remain intact. Python 3 is required when this option is used. Keep the file outside source and artifact directories. Interactive signing uses a separate terminal when available; noninteractive signing never prompts. Verified existing signatures can be reused without the password file. This option applies to signing, while dsr signing init continues to ask for the new key's password interactively.

To rotate a signing identity, use dsr signing init --force. DSR preserves both old keys in adjacent *.bak.TIMESTAMP.SUFFIX files before generating the replacement in private staging. Each rotation retains a separate generation, even within the same second; private backups have mode 0600. Existing backup files are never overwritten. The replacement private key has mode 0600, and an unrelated hardlink to the original keeps its original contents.

dsr signing init --force --dry-run previews the operation without creating keys, directories, backups, locks or logs. Generation and handled publication failures preserve or restore the original pair. An interrupted initializer retains its KEY.init.lock directories, private staging and backup paths; inspect and recover that generation before retrying. The two key replacements are individually atomic, so readers must not sign concurrently with rotation. This does not promise an atomic pair swap or power-loss durability. See the signing initialization contract for recovery and JSON results.

An exact release contract may include SHA256SUMS, SHA256SUMS.txt, or the legacy checksums.txt in exact_additional_assets, together with each selected aggregate's .minisig signature. All three names use the same sorted checksum entries, derived from the manifest's primary and additional payloads after native collection; they do not belong to an individual build target. DSR verifies the downloaded aggregate and signature as well as every primary signature. An existing aggregate must already match those exact bytes and must be a regular file; retries refuse mismatched or linked aggregates. List primary signatures only through minisign_public_key_file; they are implicit assets and must not also appear in exact_additional_assets.

A strict release publishes its generated build manifest only when the contract names it. build_manifest_assets lists one or two literal .json basenames; the second is a byte-identical compatibility alias. This lets a tool whose repository key differs from its binary keep a historical manifest name:

tool_name: eidetic_engine_cli
binary_name: ee
release_contract:
  checksum_sidecar: sha256
  exact_primary_assets: {linux/amd64: ee-x86_64-unknown-linux-gnu.tar.xz}
  build_manifest_assets: [ee-v0.17.0-manifest.json]

Each name is bound to the frozen manifest's own SHA-256 and size in the upload plan (not by a self-referential manifest row), so no receipt is fabricated and the generated JSON is never edited. DSR writes the copy into the artifact directory without clobbering; an existing copy must already be an identical regular file. The copies join the closed upload set and are verified on GitHub with every other asset, including by dsr release verify --fix, which can restore a missing copy. Names must not collide (case-insensitively) with any other planned asset or a derived checksum aggregate.

Repositories that protect release tags can also pin release_contract.github_tag_ruleset.repository_id and ruleset_id. DSR then fails closed unless authenticated, no-cache GitHub reads prove that the exact repository owns an active refs/tags/v* ruleset with both update and deletion protection, no bypass actors, and an unambiguous current history version. It freezes that source-bound receipt during strict preflight, refreshes it before draft admission and immediately before publication, and reports the revalidated receipt from dsr release verify. Missing or redacted policy fields are not treated as evidence.

For an installer pinned by another repository, configure its public main pin separately from the release archive checksums:

release_contract:
  # Keep the existing exact asset, signature and source requirements.
  raw_installer_checksum:
    checker: acfs
    downstream_repo: Dicklesworthstone/agentic_coding_flywheel_setup
    checksum_path: checksums.yaml
    installer_key: mcp_agent_mail
    installer_path: install.sh

Strict dsr release TOOL VERSION and dsr release finalize TOOL VERSION hash the tracked installer at the frozen release commit, check the immutable public-main blob and canonical raw refs/heads/main URL, and require the same URL and SHA-256 in the downstream's committed public main checksum file. Both main refs are checked again before accepting the observation. Missing credentials, stale or ambiguous pins, failed downloads and moving refs block publication. A failed check after promotion attempts to restore the owned draft before returning an error. Offline plan mode only computes the expected digest and supplies no public verification.

With checker: acfs, DSR requires ACFS's existing security.sh --checksum command instead of its built-in URL hasher. This option trusts executable code from Dicklesworthstone/agentic_coding_flywheel_setup: DSR downloads the checker and logging library from the same immutable public commit as the checksum pin, verifies their Git blob identities, and runs them with a clean environment and private retained output. Checker errors or an invalid/different digest block publication; there is no fallback. Other downstreams omit this option.

Run the downstream's refresh mechanism and commit/push its reviewed pin before publication. This gate reads public state; it does not generate, commit or push downstream changes. It accepts the ACFS generator's canonical installers mapping with quoted URL and SHA-256 fields, rejects duplicates, and leaves archive checksum synchronization as a separate operation.

For release-artifact containers, use the existing container command with --published-release:

dsr docker build mcp_agent_mail_rust "$RELEASE_TAG" --published-release \
  --repo-path /data/projects/mcp_agent_mail_rust --output /private/results/am.oci.tar

This path requires Python 3.11+ on the controller, both Linux architectures, the configured release contract and tracked public key. It resolves the exact public tag, downloads immutable asset IDs, verifies the Minisign signature and its exact tool/tag comment, requires every published payload in the signed checksum inventory, and checks the signed build manifest's source revision. It extracts only regular am and mcp-agent-mail files from the GNU archives into a private context, then supplies AM_VERSION and AM_REVISION to the tracked Dockerfile.release. Existing runtime version checks run inside each architecture's image build.

Builds go through rch exec --job --require-remote with a required Docker capability and complete result collection. The worker checks all private input hashes before Docker runs, and the collected result must identify that same input manifest. Workers need Bash, jq, GNU sha256sum and Docker Buildx. An admission refusal or missing remote completion is an error, with no local Docker fallback. The private bundle preserves its required inputs under RCH's normal filters; its exact directory is the invocation's canonical root. Inherited Git selectors cannot redirect its source reads or staging into another repository or index. The context, transfer diagnostics and build results are retained. Read-only planning (--dry-run) does not fetch assets or contact Docker/RCH.

Declare the exact container_binaries (Agent Mail uses [mcp-agent-mail, am]). Set container_release_from_published_assets: true in the tool's profile to reserve stable image tags for this path. Source builds then use source-v... and refuse additional stable tags. The build command exports OCI only and rejects --push. Publish through the existing release command:

dsr docker release mcp_agent_mail_rust "$RELEASE_TAG" --published-release \
  --certificate-identity "$IMAGE_SIGNER_IDENTITY" \
  --certificate-oidc-issuer "$IMAGE_SIGNER_ISSUER"

This requires Skopeo plus the existing Cosign/Syft dependencies and an exact image-signing identity/issuer; published releases reject --skip-sign. The publisher checks every OCI blob, both platform configs, source/version labels, uncompressed layer hashes and the final packaged binary bytes against the authenticated archives. It stages a private OCI directory with caller ownership, uploads by immutable digest, verifies both platform SBOMs and image signatures, then promotes the selected tags. Skopeo's complete-image copy and digest preservation keep the verified index and its child images together.

The public Git tag and complete release inventory are rechecked before upload and each tag promotion. Each attempt retains its archive and publication evidence. Tag promotions are sequential; a late failure leaves prior successful effects recorded and returns failure. Native packaged execution and public image digest/platform proof remain required before release qualification.

5. Check System Health

dsr doctor

6. Check Status Summary

dsr status
dsr status --refresh   # refresh host health checks

Commands

Global Flags

--json, -j           # Machine-readable JSON output
--non-interactive, -y # Disable prompts (CI mode)
--dry-run, -n        # Show planned actions without executing
--verbose, -v        # Verbose logging
--quiet, -q          # Suppress non-error output
--no-color           # Disable ANSI colors

Stream separation: human-readable output goes to stderr, structured JSON goes to stdout. For scripting, use --json and capture stdout (or redirect stderr to /dev/null).

dsr check

Detect throttled GitHub Actions runs.

dsr check                           # Check all configured repos
dsr check --repos ntm,bv            # Check specific repos
dsr check --threshold 300           # Custom threshold (5 min)
dsr check --all                     # Check all workflows, not just releases
dsr check --json                    # JSON output for scripting

A configured tool's workflow is its release workflow; without --all only that workflow's runs count. When several tools share a repository, a tool name selects its own workflow. A repository name or the default check polls each distinct configured release workflow. Aliases using the same workflow share one poll. A per-tool opt-out still blocks automatic fallback across aliases of its workflow event and registry-only aliases of the repository. With --all, DSR polls the repository once and attributes runs to their configured workflows when it can identify the tool. Queued and in-progress runs are queried separately and paginated, so completed history cannot hide an older throttled release. For an older in-progress workflow, DSR also reads every job in the observed attempt. It reports throttling only when jobs are queued, none are executing or awaiting approval, and the latest available run/job activity is older than the threshold. A long compile alone does not trigger fallback. The default threshold is threshold_seconds from the config (or DSR_THRESHOLD), else 600s. Exit 0 means no throttling, 1 throttling (.details.throttled[] names repo, tool, workflow, run and its tag), and 8 an API or incomplete-listing error when no other repository is throttled. Failed pages, invalid timestamps, mismatched job source/attempts, and incomplete inventories cannot produce a healthy result; inspect .details.skipped for the affected repository. Throttled rows include queue_reason (workflow_queue or job_queue); job queues also include queued_job_ids so automation can explain the decision.

dsr build

Build artifacts locally.

dsr build --repo ntm                            # Build all targets
dsr build --repo ntm --targets linux/amd64      # Specific target
dsr build --repo ntm --version v1.2.3           # Specific version
dsr build --repo ntm --parallel                  # Bounded concurrency (2 targets)
dsr build --repo ntm --parallel=4                # Explicit concurrency bound
dsr build --repo ntm --resume                    # Resume latest interrupted run
dsr build --repo ntm --resume=<run-id>           # Resume a specific run

Parallel builds keep attempt-scoped logs and results per target. A partial run preserves verified completed artifacts; resume retries only incomplete targets. The authoritative manifest is withheld until every requested target, artifact collection, packaging, and completion-state write succeeds. Real builds mark their output directory non-publishable before starting work and hold the build lock through final publication. Failed or interrupted outputs remain blocked by release and release verify, including when --no-manifest is requested. Use --resume to retry packaging or finish interrupted publication from the verified target receipts without rebuilding completed targets.

Parallel native Go builds reserve the output destinations selected by the actual go build or go install command. Targets that write the same file or an overlapping output directory on one host wait for each other; independent hosts can continue. An absolute -o path remains shared even when it points inside the original source directory, because copying the source cannot relocate that argument. Relative outputs may use private source stages when replanning the command proves that their destinations move with the source. A go install without an explicit absolute GOBIN is serialized conservatively on its host, rather than guessing the worker's installation directory from the controller's environment. Deferred targets do not consume an attempt or acquire a build slot.

Every run retains the SHA-256 of its exact repos.d/<tool>.yaml bytes, including ordinary builds and platforms with only one target triple. Resume requires that saved recipe before preparing sources or reusing artifacts. Changing a command, environment, packaging setting, or even YAML formatting requires restoring the original file or starting a fresh run; DSR cannot combine a completed artifact from the old recipe with a new one from the edited recipe. A checkpoint created before this binding existed requires a fresh run. Changing --jobs is allowed because it changes scheduling, not the repository recipe. Explicit approved host relocation remains available and atomically records its permitted configuration change.

Keep the completed manifest with its artifact directory: the publication receipt binds its exact bytes, run ID, and source commit. Removing or modifying the manifest invalidates that receipt. Dry runs and --sync-only leave the existing publication state untouched.

Ordinary builds retain each host's source-sync result and build from the path that was successfully synced. Rsync compares file contents so equal sizes and timestamps cannot hide source edits. If a transfer fails, that host's unfinished native targets fail at the source_sync stage before acquiring a build slot or launching a compiler. Other synced hosts can continue. Repair the connection and use --resume to sync again and retry the blocked targets; verified completed artifacts remain reusable, and sync failures do not consume compiler retries. --sync-only exits 1 if any host fails. Use --no-sync when you manage the remote sources separately for a new run. A staged run cannot discard its source binding by adding --no-sync on resume.

Cancellation during source synchronization stops the remaining sibling and host transfers before compilation. build and build --sync-only return exit 5 when a source operation reports interruption (such as 130 or 143), retaining that original status and the attempted hosts in JSON when a receipt is available. An interrupted archive producer remains a cancellation even if its receiver also fails on the truncated stream. Completed source stages and artifacts stay available for an explicit retry. Relocation also stops before snapshot recovery or dispatch and preserves its original interruption status through the build coordinator; the watcher does not automatically replay it.

Normal native builds stage source in fresh directories under the host's configured build_root, or its default disk staging location. Each stage receives the controller's Git HEAD, branch, and tags through a verified bundle, so Git-based build scripts work on first-time hosts and linked worktrees. Dirty and untracked files included by ordinary sync retain their contents. The private Git repository preserves the controller's core.autocrlf and core.eol settings so line-ending normalization does not create false dirty version stamps. Existing host checkout metadata, other Git configuration, hooks, and credentials are not copied into the build repository. Git-backed sibling crates receive their own contexts, and a missing required sibling blocks sync.

The controller requires rsync and Python 3 for ordinary staging. It applies the configured sync selection once to a private source projection, then sends that same projection to every native host. The saved source-input fingerprint covers selected file paths, contents, permissions, symlink text, configured siblings, and the captured Git context. Ignored or otherwise excluded outputs do not change it. Symlink targets outside the selected namespace are not included. Resume requires this original fingerprint before reusing completed artifacts: changing tracked or selected untracked files at the same commit requires restoring the original inputs or starting a fresh run. A checkpoint without its original source binding also requires a fresh run. A refused resume preserves the checkpoint, completed artifacts, and publication receipt.

Ordinary native Go builds also preserve configured sibling modules in private parallel output stages. Relative go.mod replacements and go.work entries keep the selected sibling layout for every architecture. A missing or linked required sibling stops the attempt before its Go build command runs.

The source must be a complete, non-shallow SHA-1 repository worktree at its top-level directory. Sparse checkouts and files marked assume-unchanged or skip-worktree are refused because their dirty-state semantics cannot be reconstructed from the transferred files. Source directories and bundle receipts remain available for resume. --sync-only continues to synchronize the configured checkout paths; a fresh --no-sync run uses externally managed sources.

A failed strict native target can move to another configured host during an explicit resume, after the original controller has released its build lock:

dsr build ntm --version v1.2.3 --resume=<run-id> \
  --resume-target-host windows/amd64=windows-backup \
  --resume-target-host-approval /path/to/reviewed-relocation.json

The approval pins the prior and replacement configuration hashes; its fields are specified in CLI_CONTRACT.md. Only that failed target's host, command, or environment may change. Completed target settings, artifacts, and old attempt receipts are retained. DSR verifies the same frozen source and dependency archives on the replacement before updating run state. A retry may reuse an already staged canonical snapshot only after full byte verification and fresh host capability and writable-path admission; partial or mismatched staging is refused without overwriting it.

For a platform with multiple native variants, select the exact failed task:

dsr build example --version v1.2.3 --resume=<run-id> \
  --resume-target-host linux/amd64@x86_64-unknown-linux-musl=linux-backup \
  --resume-target-host-approval /path/to/reviewed-variant-relocation.json

Set the approval's target to the full linux/amd64@x86_64-unknown-linux-musl key. This route requires unchanged repository configuration and an enabled configured replacement host with the same platform. A completed GNU sibling keeps its original host and artifacts. Later ordinary resumes retain the approved task assignment, and further moves preserve the original retry budget and attempt history.

Preview that exact move with the same approval file:

dsr --json build example --version v1.2.3 --resume=<run-id> --dry-run \
  --resume-target-host linux/amd64@x86_64-unknown-linux-musl=linux-backup \
  --resume-target-host-approval /path/to/reviewed-variant-relocation.json

The preview validates local approval, configuration, task history and retained artifact evidence. JSON includes details.relocation with the old and proposed hosts and validation: "local"; details.targets shows every task, including unchanged siblings. It creates no build lock, source snapshot or worker attempt and preserves the checkpoint, artifacts and Git index. Host probes and dynamic selection are disabled. Remote source/Cargo admission and capacity checks happen during execution, which rereads the checkpoint under its lock. A plan does not reserve a host or reset an exhausted retry budget.

An ordinary strict --resume --dry-run also lists every native task in its retained order, including both GNU and musl before the first relocation. It uses the saved task assignments directly and refuses changes to the source tag, ordered task inventory, matrix recipe, or previously reviewed configuration.

For native performance measurements of a tool with a strict release contract, use an explicit diagnostic build:

dsr build frankenterm --version 0.15.6-rc.13 --diagnostic-native --target darwin/arm64

This builds only the requested native targets while retaining the clean tagged source, pinned dependency, immutable host snapshot, and application family checks. It requires explicit targets and writes to $DSR_STATE_DIR/diagnostics/<tool>-<tag>/<run-id>; --output-dir, --no-sync, and --sync-only are unavailable in this mode. Additional assets must have exact target ownership in workspace_additional_artifacts.

Diagnostic run state, target receipts, and manifests record build_purpose: "diagnostic-native" and publishable: false. Resume requires the same purpose and source bindings. Release, release verification, and release artifact reuse reject diagnostic outputs, even if the tool's strict contract is subsequently removed. Strict release manifests require explicit build_purpose: "release" and publishable: true on the manifest and its artifacts; older unclassified strict manifests must be rebuilt. An ordinary release build still requires the complete configured strict target set. Diagnostic completion proves only the selected build, not release readiness or a performance improvement.

For Rust workspaces that ship more than one executable, list each name under workspace_binaries. DSR packages them together and also includes every regular companion file named by include_files; every path component must be free of symlinks. Unsafe paths, missing files, and collisions with a binary fail the target instead of silently producing an incomplete release archive.

Ordinary (non-strict) builds apply the same rule to archives a build lane already produced: an act or prebuilt archive in the configured format is checked for its include_files members rather than trusted because the format matches. If it lacks some of them, DSR rebuilds it from its own payload plus the missing companions, refreshes the manifest digest, and updates a compat alias that was a byte copy of it. When a lane .sha256, .minisig or SHA256SUMS entry already attests the thin bytes, the build ends partial (exit 1) naming the archive rather than ship a stale attestation or an incomplete archive. flat_archive: true opts out as before.

Use workspace_binaries_by_target when executable families differ by platform. Each target entry replaces the complete workspace_binaries list for that target, including collection and archive verification. For example:

workspace_binaries: [ft, frankenterm-mux-server, frankenterm-pty-guardian]
workspace_binaries_by_target:
  windows/amd64: [ft, frankenterm-mux-server, frankenterm-pty-guardian, frankenterm-gui]

Unlisted targets retain the default list. Invalid lists and colliding Windows executable names fail before collection; native binaries do not belong in workspace_archive_files, which is reserved for companion files.

Pinned Windows builds from Linux

Linux release coordinators can build Windows x64 and ARM64 through scripts/xwin-build.sh. A pinned toolchain manifest selects x86_64-pc-windows-msvc or aarch64-pc-windows-msvc, including the matching MSVC libraries, LLVM headers and executable machine check. Source-pinned release mode authenticates the committed workspace and locked dependencies and emits the existing DSR build manifest with explicit target-triple evidence.

Project submodules, including nested modules inside pinned sibling repositories, are staged from their parent gitlinks and locally available Git objects. The saved source receipt retains the commit/tree evidence needed to reverify the complete snapshot after the original checkouts are gone. Initialize submodules before building; missing commits, external Git storage and file links crossing repository boundaries are refused. See the source admission contract for supported storage layouts and limits.

Select this backend with the pinned build command or an xwin job in a release build plan. Each job selects one Windows architecture; a plan can build both concurrently, retain a successful architecture when the other fails, and collect the complete matrix before packaging or publication. Toolchain manifests and selected outputs must agree with the job's architecture. See toolchain preparation for the required archive and executable pins.

dsr release

Upload artifacts to GitHub Release.

dsr release --repo ntm --version v1.2.3         # Upload to release
dsr release --repo ntm --version v1.2.3 --draft # Keep the verified release private
dsr release ntm v1.2.3 --resume --publish-draft # Explicitly publish an owned ordinary draft
dsr release --repo ntm --version v1.2.3 --dispatch # Trigger repository dispatch hooks
dsr release dispatch --outbox /absolute/path/state.json --status # Inspect saved deliveries
dsr release dispatch --outbox /absolute/path/state.json          # Recover unfinished deliveries
dsr --dry-run release --repo ntm --version v1.2.3   # Show the exact upload plan, change nothing

To build a matrix across machines before publication, run dsr release build-plan --plan /srv/release-plan.json --output-dir /srv/release-run --jobs 2. The plan can combine native builds, pinned Windows cross-builds and existing manifests. Add --dry-run to inspect the matrix. Rerun the same command to reuse verified jobs and collect the complete bundle. See the build-plan format and recovery examples.

When native workers completed but the coordinator failed during packaging, use dsr release recover-native to verify the saved checkpoint and reconstruct a local release manifest and artifact directory. --resume rechecks those inputs and continues an interrupted copy. See the native recovery command and required pins.

New ordinary releases stay private until every selected artifact, checksum, and metadata sidecar matches the complete remote inventory. DSR then publishes the original release ID and verifies it again before running post-release hooks. The build manifest's source.git_sha pins publication even when the publishing machine has no source checkout. Declared source commits must be nonzero 40-character lowercase Git SHAs and agree with any available local tag. DSR checks the actual remote tag before creation, each upload, and final publication; this also applies to --resume of an existing release. A tag proved absent on GitHub is created at the pinned commit when publishing an owned draft and verified afterward. Malformed or conflicting source evidence blocks publication. Legacy inputs without a source pin remain supported; --verify-tag requires the remote tag to exist already and resolves its commit when no local or manifest pin is available.

Downstream dispatch retains each destination's acknowledgement in a persistent outbox bound to the GitHub release ID. Retrying skips accepted destinations and keeps uncertain requests for an explicit --retry-uncertain decision. Recover a saved handoff with the outbox_file path from release JSON, without uploading or publishing again; DSR rechecks the public release, source tag, and complete asset inventory before sending. See dispatch and recovery.

Add --update-formulas to deliver verified Homebrew and Scoop recipes after public publication:

dsr release ntm v1.2.3 --update-formulas
dsr fallback ntm --version v1.2.3 --update-formulas
dsr --dry-run release ntm v1.2.3 --update-formulas

This flag explicitly authorizes commits and pushes to the selected package repositories. Existing release commands keep their current behavior without the flag. Select destinations and, optionally, a default manager set in the selected global configuration file (--config is respected):

formulas:
  homebrew_tap: owner/homebrew-tap
  scoop_bucket: owner/scoop-bucket
  managers: [homebrew, scoop]

The manager set defaults to both. A tool can override it in repos.d/<tool>.yaml, along with the existing package basename and Homebrew recipe selection:

formulas:
  managers: [homebrew]       # Or [scoop], or [homebrew, scoop]
  package_name: ntm         # Defaults to the tool key
  homebrew_kind: formula   # formula, cask, or both

DSR freezes these selections before uploading or building. It verifies every selected recipe's release download, including architecture variants and same-release companion resources, against the actual asset bytes and checksums. Homebrew parsing requires Ruby and does not evaluate recipe code. Drafts and failed publications skip delivery; dry runs show the intended managers without cloning, committing, or pushing package repositories. fallback --build-only cannot be combined with --update-formulas.

Package delivery has its own details.formulas result. A failed or interrupted manager leaves the successful release published, and the release/fallback exit status continues to describe publication. Inspect details.formulas.status for completed, partial, failed, or interrupted. Its recovery_command runs dsr release formulas with the frozen destinations and the original repository, release ID, and source commit. Use that command to retry delivery without rebuilding or uploading the release. Accepted Git updates remain unchanged; a retry completes the remaining manager. An interrupted push stops before later managers and optional upgrade checks. A moved tag or replacement release blocks the bound retry.

Delivery requires the source commit originally bound to publication, normally from the build manifest, strict plan, or tagged checkout. Legacy --no-manifest inputs without a source pin can still publish, but formula delivery reports a separate failure and makes no package changes. DSR does not resolve a new tag afterward and present it as the original source evidence.

Retry interrupted uploads or publication with the same artifact directory:

dsr release ntm v1.2.3 --artifacts /path/to/artifacts --resume

Keep $DSR_STATE_DIR/releases between attempts: DSR uses its private original POST response and frozen publication intent to recheck existing uploads and complete its own interrupted draft. Changed inputs or missing creation custody block recovery. DSR keeps explicitly requested drafts and unrelated existing drafts private. If you publish an explicit draft on GitHub yourself, resume verifies its contents without changing its visibility. Watcher fallback requires a public release by default. With watch --draft, it checks that GitHub retained the release as a draft. Ordinary creation and recovery require Python 3.

Publish a draft created by DSR after reviewing it:

dsr release ntm v1.2.3 --artifacts /path/to/artifacts --resume --publish-draft

DSR reuses verified uploads, finishes any missing uploads, and checks the original release ID, metadata, source pin, complete asset list and bytes before publication. It preserves the original private receipt files. If a promotion fails, repeat --resume --publish-draft; a plain --resume keeps the original draft intent. Repeating a successful promotion verifies the public release without publishing again. The flag requires --resume, conflicts with --draft, and refuses drafts without their original creation custody. Strict contracts use dsr release finalize instead.

Generate SBOMs for every payload selected by the build manifest before release:

dsr release ntm v1.2.3 --sbom
dsr fallback ntm --version v1.2.3 --sbom-format cyclonedx

--sbom-format enables generation; configuration can also set sbom.enabled and sbom.format. DSR verifies complete coverage before creating or changing a release, publishes the individual documents and their aggregate inventory, and keeps scanner receipts private. Interrupted scans reuse verified completed documents. --no-sbom disables generation while preserving metadata already bound to a retained publication plan. Automatic SBOMs require a build manifest and are refused for strict contracts, which own their exact asset set. See SBOM generation for formats, retry behavior, and evidence limits.

The dry-run plan lists every name each artifact will be published under (its manifest name, versioned name, installer-compatible name and x86_64/aarch64 aliases), the build manifest, the generated SHA256SUMS and per-name .sha256 sidecars, and existing signatures/SBOMs; with --json the same plan is in details.plan. It uses the same naming code as the real upload.

A release publishes what the build manifest lists, and only from the commit the version's tag names. dsr build writes no manifest after a partial build, so release refuses a directory without one (pass --no-manifest to upload a hand-assembled directory as-is). It also refuses artifacts built from a different commit than the local tag, and a tag that origin holds at another commit. A tag not yet on GitHub is created at the tagged commit. dsr build --version X stops before building when tag X exists and the checkout is elsewhere.

Both the dry-run and the real release check the project's own curl|bash installer (install_script_path, else install.sh in the checkout): for each non-Windows target dsr computes the asset name the installer downloads, including an archive extension the script hardcodes, and confirms the release publishes it. A miss is reported as a warning with the missing name (and in details.installer_check), never as a release failure, so you learn about a broken curl | bash before your users do. Fix install.sh or set install_script_compat, then run dsr repos validate.

For repositories whose existing release venue contains source only, use an explicit repos.d/<tool>.yaml configuration with these four fields:

tool_name: example
repo: owner/example
local_path: /absolute/path/to/example
publication_mode: source-only

An optional boolean enabled: false excludes the tool from automation and preserves explicitly requested source-only releases, including after dsr repos remove example. The setting remains bound to the exact configuration recorded in publication and recovery receipts.

dsr release source-only example 1.2.3 --notes-file release-notes.md --no-dispatch
dsr release source-only example --tag example-v1.2.3 --notes-file release-notes.md --no-dispatch
# Or notify explicitly selected downstream repositories after publication:
dsr release source-only example 1.2.3 --notes-file release-notes.md --dispatch \
  --dispatch-event source_release --dispatch-repos owner/installers,owner/docs

Every invocation requires exactly one --dispatch or --no-dispatch. --dispatch-event and --dispatch-repos require --dispatch; omitted values use the existing environment and global dispatch configuration. DSR validates and freezes the event and complete destination set before publication. Keep the source-only recipe limited to the fields above; downstream configuration does not add build fields or a dispatch section to that recipe.

This mode requires a clean checkout whose HEAD and local tag match the remote tag. It creates and verifies its own draft before publishing, verifies an empty asset inventory, and retains a separate publication receipt. Existing releases, legacy registry entries for the same tool, and build configuration are refused. Use --draft to retain the verified draft, or global --dry-run to inspect the admission result without creating a release, recovery receipt or dispatch outbox. Retained drafts never send dispatch requests. Source-only configuration cannot be used by the normal binary publication command.

Use exactly one positional version or --tag. The explicit tag form preserves the exact crate or workspace tag; it accepts only a single Git ref component starting with a letter or digit, using letters, digits, ., _, +, or -. Both forms require the same clean checkout and local/remote peeled tag identity.

If publication is interrupted, retry with the same inputs and --resume-receipt /absolute/path/to/the/receipt. DSR accepts its private pending or completed receipt, verifies the original release ID and nonce, and creates no new release. An already-public release is verified without another publish request. The original receipt remains unchanged; each recovery records a separate receipt. DSR saves the release ID before requesting publication, so recovery also works when GitHub accepted the request but the controller stopped before recording success. A legacy pending receipt without an ID can recover its owned draft, but cannot adopt a public release by tag alone.

An explicitly requested draft stays private on ordinary receipt recovery. Promote it through DSR with the additional explicit option:

dsr release source-only example 1.2.3 --notes-file release-notes.md --no-dispatch \
  --resume-receipt /absolute/path/to/the/receipt --publish-draft

--publish-draft requires --resume-receipt and conflicts with --draft. Recovery still requires the same source commit, tag, reviewed notes, configuration and prerelease selection, and exactly zero release assets. Receipt paths are printed before remote mutation and returned as details.receipt on JSON success. Ordinary --resume remains a binary publication option and is refused in source-only mode.

With --dispatch, downstream delivery starts after all publication checks and the private success receipt have completed. The durable outbox binds the exact public release ID, tag, source commit and private creation lineage; delivery and recovery recheck that the release remains public with zero assets. The JSON result adds details.dispatch, including delivery status, per-repository results and outbox_file when one exists. HTTP 204 means GitHub accepted the event; it does not establish that the receiver's workflow completed.

A delivery failure keeps the publication successful and preserves its receipt. Retry an existing outbox with dsr release dispatch --outbox /absolute/path. An uncertain response requires checking the receiver before opting into --retry-uncertain. You can also resume the publication receipt with the same explicit dispatch selection: accepted destinations are not sent again, and changed events or destinations conflict with the saved plan instead of starting a second delivery. Without configured destinations, --dispatch reports a skipped delivery and a warning.

If strict binary creation succeeded but its controller stopped before publication, use the original private dsr-api-response.* POST response. Strict creation retains that file in an owner-only directory. With --json, the draft result supplies details.create_response, details.finalization_tmpdir, and the physical details.artifacts_dir; human output prints the complete finalization command. Recovery cannot reconstruct creation custody from public release metadata. A lost or unsuccessful POST response may leave an observable draft, but does not supply finalization custody. Use dsr release verify TOOL VERSION --fix to repair missing draft assets (add --dry-run to list the uploads without performing them). For custom build output, pass --artifacts "/path/to/signed artifacts" using the creation result's details.artifacts_dir. Verification, repair, and complete checksum audits use that directory and its own build manifest; an explicit selection never falls back to artifacts in the default state directory. Once all signed assets verify, finalize through DSR:

TMPDIR=/private/scratch dsr release finalize TOOL VERSION --create-response /private/scratch/dsr-api-response.ABCDEF12 --no-dispatch

Use the same --artifacts selection for finalization. Without this option, finalization uses $DSR_STATE_DIR/artifacts/<tool>-<tag>. The selected directory must already exist; directory symlinks resolve to their physical path before the same signed asset, source, and custody checks run.

The response must remain a single-link, owner-only regular file in the same canonical private TMPDIR used by the GitHub adapter. Finalization verifies its original creation nonce, release ID and metadata against the current exact source and complete signed asset inventory. It freezes explicit configuration and registry inputs, writes private recovery evidence before publishing, and rechecks all evidence afterward. It never creates or uploads assets, accepts a tag lookup as custody, or dispatches workflows. Inventories of 100 or more assets are refused. Global dry-run performs verification without publication. Recovery requires Python 3 for bounded, no-follow descriptor validation of the private receipt and its directory; device, inode, and byte identity remain fixed through publication.

Interrupting strict finalization stops its owned local verification and promotion processes before the command returns. Build custody remains held through cleanup. The command returns exit code 5 and, with --json, one interruption error. If the CLI itself is killed, its independent supervisors still drain the work before releasing custody. Keep the original creation response and retry the same finalization command to reconcile the release against fresh evidence. A request already accepted by GitHub may have completed even when its local transport was interrupted.

Strict release and release finalize also stop on terminal interruption during inventory reads, signed-byte downloads, tag and ruleset verification, raw-installer checks, or draft restoration. They return exit 5, retain the original terminal status in the JSON interruption details, and perform no later remote operation in that invocation. Only a completed observation matching the owned release can establish its last known visibility. Ordinary transient failures still use bounded reconciliation; an explicit retry revalidates the retained creation and publication evidence.

Ordinary dsr release verify TOOL VERSION --fix also stops immediately when release discovery, source verification, asset inspection, or an upload is interrupted. It returns exit 5 and retains the original adapter status in details.interruption. An upload may already have reached GitHub; rerunning the same repair command verifies the existing release and uploads only missing assets. Selected local artifacts and their manifest remain unchanged.

dsr installer

Generate the curl | bash installer for a tool from its repos.d/<tool>.yaml:

dsr installer generate ntm                 # writes installers/ntm/install.sh
dsr installer generate tool --shell powershell  # requires declared Windows targets
dsr installer generate --all --dry-run     # list what would be generated
dsr installer validate ntm                 # syntax, ShellCheck, safety checks
dsr installer validate tool --shell powershell  # PowerShell syntax validation

The default output directory is installers/ beside dsr. Set DSR_INSTALLER_DIR to select another directory for both generation and later canary runs. A generation-only --output-dir override is not remembered by later commands; set DSR_INSTALLER_DIR to that path when testing it. Commit each generated install.sh or install.ps1 to its tool's repository. Regenerate after changing a tool's naming, targets, workspace executables, or signing key, since these are embedded at generation (see "Installers and Verification").

For native Windows, --shell powershell generates a standalone PowerShell 7.4+ installer from the same repository configuration. It supports declared x64, ARM64 and x86 Windows targets, ZIP or tar.gz archives or raw PE executables, exact strict asset names, and the complete platform-specific workspace executable family. Generation requires yq, jq, Python 3 and pwsh on the DSR coordinator; the generated installer needs PowerShell and, when a signing key is configured, Minisign on Windows. This release-asset path supports public and private GitHub releases. Private downloads select DSR_GH_TOKEN, then GITHUB_TOKEN, then GH_TOKEN, with Contents read access to the configured repository.

.\install.ps1 -Version v1.2.3 -Yes
.\install.ps1 -Version v1.2.3 -Offline -Yes -Prefix C:\Tools\tool\bin

The Windows installer requires an exact checksum and verifies every payload against any configured Minisign key. Offline mode requires an explicit version and uses only cached payloads and verification evidence. It checks every selected executable's PE architecture and stages the complete family before replacing an existing installation. -Json emits a structured result; -Verbose writes diagnostics to stderr. See native Windows installers for cache, upgrade and supported-format behavior.

For a configured Rust, Go, Bun or TypeScript project, explicit -FromSource -SourceRef refs/tags/v1.2.3 builds the complete Windows executable family with existing Git and compiler tools. It pins the fetched commit, checks every output's PE architecture and byte evidence, and uses the same journaled update and recovery transaction. Source builds require separate consent and return local-build receipts; they never substitute for a failed release signature. Rust requires a committed workspace Cargo.lock, resolves each selected binary's package before compilation, and builds with --locked for the configured Windows target using an existing standard library and linker. Bun and TypeScript require committed package.json and bun.lock or bun.lockb, resolve each selected executable's entry, and compile Windows x64 or ARM64 payloads with the installed Bun compiler. A source_subdir inside a Bun workspace uses that workspace's committed root lock after Bun confirms the package's membership. Both installer shells install workspace dependencies once with --frozen-lockfile, then compile the selected package's executable entries. Source receipts record the root and member paths, both manifest hashes, and the selected lock evidence. See Windows source installation for source selectors, tool requirements and retained diagnostics.

For Rust, Go, Bun and TypeScript projects, add -InstallToolchain to -FromSource or -AllowSourceBuild to permit a private compiler when the installed compiler cannot satisfy the committed project's requirements. Rust reads the nearest committed Rustup selector and the selected executable packages' declared rust-version; it also checks the requested target's standard library. Go reads go.work or go.mod; Bun reads the dependency root's package.json, honoring an exact packageManager pin and the declared engines.bun range. Suitable installed compilers stay in use. Explicit Rust component/target lists select a private toolchain.

Private provisioning verifies official Windows compiler distributions and records their identities in the source receipt. Rust uses a verified manager under private Cargo/Rustup homes without invoking Windows installer mode. Go and Bun use verified compiler ZIPs. Git and project-specific native dependencies, including Rust's linker/SDK, must already be installed; provisioning does not install Visual Studio or change shell profiles, the caller's environment or global compiler installations.

.\install.ps1 -FromSource -SourceRef refs/tags/v1.2.3 -InstallToolchain -Yes
.\install.ps1 -AllowSourceBuild -InstallToolchain -Yes

The installer accepts the build's scalar archive_format: tar.xz or a mapping such as archive_format: {linux: tar.xz, darwin: tar.gz, windows: zip}. Omitted OS entries keep their defaults (tar.gz on Unix, zip on Windows). A binary format selects a raw executable with no Unix asset suffix or .exe on Windows. Configured formats require yq and jq during generation; unsupported formats fail before replacing an existing installer.

For a release_contract, the installer embeds the validated exact_primary_assets mapping and resolves the literal asset name for the selected platform and compiler triple. GNU and musl can have arbitrary names and different formats, including an archive for one and a raw executable for the other. Each candidate's exact name selects its download, checksum, signature, extraction format and separate variant cache. The installer does not infer libc from a contracted filename or invent compatibility aliases. Configured libc selection and explicit fallback policy still apply; an integrity failure never triggers a different variant.

Declare target_triples explicitly when a singleton Rust build overrides CARGO_BUILD_TARGET. Generation refuses a conflicting compiler identity instead of emitting an installer for a different ABI.

For a workspace release, the installer installs the complete configured executable set into the selected --dir:

binary_name: tool
workspace_binaries: [tool, tool-daemon, tool-worker]
workspace_binaries_by_target:
  windows/amd64: [tool]

A target override replaces the global list. An empty list ([]) selects only binary_name; every nonempty list must include that primary executable. Before replacing any executable, the installer requires exactly one nonempty archive member for each selected name and stages the complete set. A failed replacement restores the previous executables and leaves unrelated files alone. Successful --json output includes each installed executable's name, path, SHA-256 and byte size in binaries, alongside the primary path.

Source fallback builds the same selected set from one pinned commit. Rust includes binaries in other workspace packages and rejects ambiguous Cargo output providers. Go companions use their own cmd/<name> packages; Bun and TypeScript companions use their exact package.json bin entries. An explicit source_entry selects only the primary. Every selected member must build and verify before the family is installed. Source installation still requires --from-source or --allow-source-build; see the source family contract for entry selection, dependency locking and failure behavior.

Rust source installers can select features required by their executable family:

language: rust
source_features: [cli, worker/service]
source_no_default_features: true

These recipe settings apply to both Bash and Windows source builds. Omit them to keep Cargo's normal defaults. Each feature is passed as a literal Cargo argument, and the source receipt records the exact selection. The installer still requires every selected executable to compile before replacing the installed family. See Rust source features for validation rules and package-qualified selectors.

dsr verify upgrade TOOL --build-from-source uses the same source layout and feature selection when compiling the primary updater locally. source_subdir selects a nested Go or Rust project, source_entry selects a Go main package, and source_package selects a Rust workspace package. Rust builds honor source_features and source_no_default_features, including member-specific features, and use Cargo's actual executable record from a private target directory. Local Go and Rust projects can be checked before committing them or creating a lockfile. The configured updater check then runs on the freshly compiled executable.

Private GitHub source builds use the same account as release downloads and freshness checks: DSR_GH_TOKEN, then GITHUB_TOKEN, then GH_TOKEN, then the stored GitHub.com login. Authenticated source fetches require Git 2.31 or newer and keep tokens out of URLs, command arguments and saved Git configuration. They do not switch to another credential helper or .netrc account when the selected token fails. With no selected GitHub credential, ordinary anonymous Git access and custom credential helpers remain available.

Add --install-toolchain to either source option when the required Rust, Go, or Bun compiler is missing or incompatible. For Rust, the installer checks the selected executable packages' declared rust-version, including workspace inheritance, and the committed Rust toolchain selector. An unrelated workspace package does not raise the selected family's compiler requirement. Exact Rust pins require that released version; a private replacement must pass the same checks before compilation. The installer verifies the upstream distribution and prepares a private toolchain for that source build without changing shell profiles or the global compiler installation. Existing usable compilers are preserved. The Bash opt-in supports Linux and macOS on x64 and ARM64; the Windows equivalent, -InstallToolchain, supports Rust, Go, Bun and TypeScript. Both keep their existing safe/offline policy checks. See source installer options for version selection and download verification.

dsr canary

Run a repository's installer in a clean Linux container or on a native macOS host over SSH, then require its installed executable's --version and --help probes to succeed:

dsr canary run ntm --os ubuntu:24.04 --mode safe
dsr canary run ntm --host mmini --mode safe
dsr --json canary matrix --tools ntm,cass --modes safe,vibe
dsr canary results

--host selects a single native test and needs no Docker. The SSH host must already have Bash, curl, and any installer prerequisites; DSR uses batch-mode SSH and bounds connectivity and execution time. A native canary installs on that host, so choose a host intended for installer testing. --host cannot be combined with --os or --all.

The repository key, GitHub repository, and installed executable may differ. Canary runs prefer the selected local generated installer. When there is no local installer, repo selects the GitHub repository to download from and install_script_path selects the script within it (default: install.sh). An explicit repository override must match the local installer's declared repository; otherwise DSR downloads the configured repository's installer. binary_name selects the executable to probe. Generated DSR installers receive --mode <mode> --non-interactive by default; an owned installer can declare its exact argv in repos.d/<tool>.yaml (including an empty array):

tool_name: frankenterm
repo: Dicklesworthstone/frankenterm
binary_name: ft
canary_installer_args: []
canary_packages: [python3, minisign]

Installer failure, a missing configured executable, or a failed probe makes the canary fail; none of those conditions are informational successes.

The matrix uses the selected tools across the configured Linux images and modes. Without --tools, it discovers installers under DSR_INSTALLER_DIR (or the default generated directory) and rejects an empty selection. It saves successful, failed, and interrupted reports for dsr canary results. JSON output includes each image/mode result, every completed tool's status, duration and exit code, actual pass/fail totals, the expected test count, execution errors, and whether coverage is complete. Missing or malformed child results remain explicit errors; they cannot produce a successful matrix. Single-tool container and SSH runs also save their results, including the selected backend and host or image. The CLI returns 5 for interrupted or timed-out canaries and 8 for native SSH connection failures. Reports retain the original aggregate status in raw_exit_code and each child's status in its own exit_code, so automation can follow the CLI contract without losing the underlying failure evidence.

dsr fallback

Full pipeline: check → build → release.

dsr fallback --repo ntm --version v1.2.3        # One command does it all
dsr fallback --repo ntm --version v1.2.3 --jobs 3  # Build up to three targets concurrently
dsr fallback --repo ntm --version v1.3.0-rc.1 --prerelease
dsr fallback --repo ntm --version v1.3.0 --draft
dsr fallback --repo ntm --version v1.2.3 --update-formulas

Target builds run serially by default. --parallel (or -p) selects two targets, or the value of DSR_BUILD_PARALLELISM when set; --parallel=N and --jobs N select an explicit limit from 1 through 32. The existing scheduler also respects host capacity and shared output paths. Resume may select a new concurrency bound while retaining verified completed targets. The complete configured target set, quality checks and publication requirements still apply. JSON results and dry-run plans report the selected bound in details.parallel_jobs.

Use --draft to upload the verified assets for review before they become public. A successful fallback reports the release ID and observed visibility in details.release. Combine --draft --prerelease to stage a prerelease. Repeat both choices when resuming a strict build. Its recovery record retains the original creation response for a later explicit dsr release finalize. To publish an ordinary draft that DSR created, use dsr release TOOL VERSION --artifacts DIR --resume --publish-draft with its original artifact directory.

Add --prerelease to require prerelease publication. A version suffix such as -rc.1 does not select this mode automatically. Both fallback and release refuse an explicit prerelease request against an existing stable release before uploading assets. Ordinary retries without the flag preserve an existing release's mode. JSON plans and results report details.prerelease_requested; details.prerelease records the selected mode, or the observed mode after successful publication. --build-only --prerelease records the selection without publishing.

Automation can add --expected-sha <full-commit> to bind the operation to the workflow run's source. The clean checkout, local version tag and build manifest must all match; changes during checks, compilation or signing block publication. The GitHub tag is checked again immediately before release. An explicit version is required, and dsr leaves checkout selection to you; --build-only needs no remote tag lookup.

Interrupted release lookups and publication return exit 5, retain the original stage and status in JSON, and require an explicit retry. The watcher does not automatically replay them. Existing completed builds and release evidence stay available for recovery; ordinary unavailable lookups and lock conflicts keep their existing error behavior.

Retry an interrupted strict publication with --resume=RUN_UUID, the original version, and the same --output-dir. Fallback retains private creation custody, verifies existing remote bytes, uploads only missing assets, and invokes the strict finalizer before reporting public success. It refuses changed inputs, unrelated drafts, or a lost original creation response. Preserve $DSR_STATE_DIR/releases and the artifacts. The strict recovery guide describes the supported configuration and recovery evidence.

Strict retry also requires the original prerelease selection: repeat --prerelease when the interrupted attempt used it. Adding or omitting it on retry cannot change that attempt's release mode. Strict fallback custody created before the prerelease choice was recorded is refused by automatic recovery; use the existing explicit dsr release finalize command with its original --create-response file to verify and finalize that older draft.

--update-formulas runs once after confirmed public publication, including strict recovery. --resume=RUN_UUID --update-formulas reuses the verified completed build and reconciles package recipes after release verification. For a delivery-only retry, use details.formulas.recovery_command; this calls the standalone updater without compiling, uploading, or publishing again.

dsr watch

Continuous monitoring daemon.

dsr watch                                       # Default: check every 60s
dsr watch --interval 30 --auto-fallback         # Auto-trigger on throttle
dsr watch --tool ntm --auto-fallback              # Monitor and recover ntm only
dsr watch --auto-fallback --confirm-polls 3     # Require three consecutive stalled polls
dsr watch --auto-fallback --max-concurrent 4    # Admit up to four fallback pipelines
dsr watch --auto-fallback --max-concurrent 2 --jobs 4  # Four target builds per release
dsr watch --auto-fallback --prerelease         # Publish automatic fallbacks as prereleases
dsr watch --auto-fallback --draft              # Stage verified releases for review
dsr watch --auto-fallback --update-formulas    # Deliver Homebrew/Scoop updates after release
dsr watch --auto-fallback --verify-upgrade-all-hosts  # Check updaters on configured hosts
dsr watch --notify desktop                      # Desktop notifications
dsr watch --daemon --auto-fallback               # Start an admitted background watcher
dsr watch --status                              # Inspect the background watcher
dsr watch --stop                                # Stop monitoring; let release workers finish

--daemon returns after the background watcher passes its normal startup checks and holds the exclusive watcher lock. It detaches from terminal input and sends ongoing output to DSR_STATE_DIR/watch-daemon/watch.log (under ~/.local/state/dsr by default). Use --status to inspect that watcher and --stop to stop further monitoring and recovery admission. Already started fallback workers retain their independent ownership and continue running. Daemon startup and controls require Python 3 on Unix; ordinary foreground and --once operation retain their existing dependencies. --daemon cannot be combined with --once or --dry-run; status and stop accept global output/path options but no monitoring options.

Without --auto-fallback the watcher only reports (and notifies) each throttled release run once. With it, each run starts one dsr fallback for the repo's configured tool at the run's version tag; repos with no dsr tool are reported, never guessed. dsr --dry-run watch --auto-fallback shows which fallbacks would start.

Pass --tool NAME to monitor one configured tool, or repeat it to select several. Each poll queries the selected release workflows. When a workflow serves several tools, only events attributed to a selected tool can advance confirmation, notify or launch a fallback. A scoped poll preserves confirmation history and pending or failed work for other tools. Active workers across all tools still count toward --max-concurrent. Watch JSON lists the scope in details.selected_tools; an empty list covers the full configuration. For a one-time inspection, dsr check --tool NAME queries that tool's workflow and shows its observed runs.

When several tools in a repository share a release workflow file, set workflow_event in each tool's recipe to its GitHub trigger (push by default, release, or workflow_dispatch). The observed file and event must identify one recipe. Runs with competing or unconfigured events appear in dsr check without a tool and the watcher withholds their fallback.

Use --confirm-polls N (1–32, default 1) to wait for the same upstream workflow attempt, source commit and queue threshold to appear stalled in N consecutive polls before reporting it, notifying, or scheduling a fallback. Timer-driven --once invocations share confirmation history with continuous watchers. A missing run, unreadable poll or interrupted check breaks the streak. Previews can use prior evidence without advancing the saved count. JSON reports the number of runs still waiting in details.awaiting_confirmation. Recovery from a confirmed terminal upstream failure uses its own exact-run check.

Before monitoring, the complete doctor --quick preflight has one GH_API_TIMEOUT deadline (60 seconds by default), including dependency version probes and credential lookups. A stalled preflight stops with exit 8 before queue discovery, notification initialization or automatic fallback. Invalid deadlines stop with exit 4 before launching any probe.

Set enabled: false in repos.d/<tool>.yaml to suspend automatic fallback for that tool. A per-tool enabled value overrides repos.yaml; when it is absent, the registry value applies, and when both are absent automation is enabled. Only YAML booleans are accepted: quoted strings, nulls and other types cause a configuration error and cannot authorize a release. dsr repos list --json shows the effective boolean, including per-tool files and overrides.

The watcher rereads this policy before a new launch and before admitting pending or failed work. Disabling a tool preserves its pending source identity, attempt count, cooldown and build checkpoints, so re-enabling it resumes through the same checks. It does not cancel an already running worker. In a shared repository, tools with their own per-tool recipes and distinct release workflow files or supported workflow events can remain enabled independently. For example, disabling a push recipe does not disable the sole release recipe in the same workflow file. A second name for the disabled file and event, a registry-only alias, or an ambiguous workflow or event cannot override the opt-out. Explicit dsr check, build, release and fallback commands remain available for manual diagnosis and recovery; enabled controls watcher automation.

The watcher admits at most two fallback pipelines at once by default; --prerelease selects the publication channel explicitly; a tag such as v1.2.3-rc.1 does not select it automatically. The watcher passes that choice to fallback and records prerelease_requested in its JSON results, deferred work and attempt journal. Restart with the same choice to recover a retained run: changing the channel withholds that run without spending its retry budget. Report-only and dry-run modes show the selection without launching a worker.

Use --draft to keep automatic releases private for review. It can be combined with --prerelease. Each deferred run and attempt keeps its original visibility choice across restarts. The watcher verifies the release ID, repository, tag and visibility in the fallback result before marking the attempt successful. To publish a reviewed ordinary draft, use the retained watcher artifact directory with dsr release TOOL VERSION --artifacts DIR --resume --publish-draft.

Use --update-formulas to run the fallback pipeline's configured Homebrew and Scoop delivery after verified public publication. Use --verify-upgrade for the local updater check, or select configured hosts with --verify-upgrade-host, --verify-upgrade-platform, or --verify-upgrade-all-hosts. Host and platform options accept comma-separated selections and imply verification. These steps are opt-in; they do not enable automatic fallback on their own, and draft releases skip them.

The watcher retains the requested delivery and verification policy with pending runs and started attempts. Restart with the same policy to recover retained work; a changed selection withholds the run without consuming another attempt. After publication, package-update and updater-check outcomes remain advisory and separate from release success. A failed downstream step does not cause the watcher to rebuild or republish a successful release. Use the fallback report's standalone recovery information to retry the affected step.

--max-concurrent accepts 1–32. Target builds within each fallback remain serial unless --parallel / -p, --parallel=N, or --jobs N is selected. Bare --parallel uses DSR_BUILD_PARALLELISM, defaulting to 2; explicit counts accept 1–32. The two limits are independent: --max-concurrent 2 --jobs 4 permits at most two release pipelines with up to four target workers each, subject to the existing build-host capacity limits. Plans and results report parallel_jobs, and every started attempt records its selected bound. New attempts and retries use the current watcher setting; running workers keep their original bound. A retry can change concurrency while retaining its exact source and build checkpoint. Report-only and dry-run modes still start no workers.

Excess runs wait for a later poll without creating a build or consuming a retry attempt. Their repository, tag and source SHA are retained across restarts, and older waiting releases take priority over new arrivals. Active workers retain their slots across --once calls and watcher restarts, until their descendants exit and the completion receipt is verified. Lowering the limit lets existing work finish before admitting more. Each admitted build still follows the configured per-host concurrency limits. Deferred runs require a fresh upstream observation when a slot becomes available; retries must keep their original source identity. A pending release may start, or a failed fallback may retry, after its original workflow leaves the queue and an uncached lookup confirms failure, timed_out, or startup_failure. Pending runs are refreshed once capacity is available; an exact success or cancellation removes a never-started candidate without an attempt. Active or unverified upstream runs remain pending. Existing attempts keep their source, cooldown, attempt budget, and exact checkpoint requirements.

Automatic fallback builds a private copy of the workflow's exact tagged commit. Your checkout can be on a newer commit, contain staged or untracked work, or be absent: available Git objects are copied locally; otherwise DSR fetches and verifies the exact GitHub tag. Quality checks, compilation and publication all use the private source. The developer checkout is preserved. Pinned sibling dependencies use the same isolated-source rules as dsr fallback --isolate-source; initialized project and sibling submodules are copied at their parent-pinned commits, including nested modules. Their Git objects must be locally available: DSR does not fetch submodule URLs or change developer child checkouts. Private copies retain child Git metadata for native builds, and child source changes or absolute Cargo paths block publication. Unavailable or changed identities block the release. Each retry gets a fresh source copy while retaining its verified build checkpoint and output directory. Attempts started before this source-isolation behavior retain their original checkout mode on retry, including its clean, matching-checkout requirement.

--notify takes a comma-separated list of terminal, slack, discord, desktop, agent_mail (or all/none). Fallbacks started by the watcher report their outcome through the same channels. Each external channel has a DSR_NOTIFY_TIMEOUT deadline (20 seconds by default), including desktop commands and Agent Mail hooks. Failed or timed-out delivery leaves the event retryable and allows the fallback pipeline to continue. Slack and Discord webhooks come from DSR_SLACK_WEBHOOK / DSR_DISCORD_WEBHOOK, or from config.yaml:

notifications:
  slack_webhook: "https://hooks.slack.com/services/..."
  discord_webhook: "https://discord.com/api/webhooks/..."

dsr repos

Manage repository registry.

dsr repos list                                  # List registered repos
dsr repos add owner/repo --local-path /path     # Add a repo
dsr repos add owner/repo --source-config ./source.yaml  # Import a source-only recipe
dsr repos remove repo-name                      # Remove a repo
dsr repos validate                              # Validate all configs

Repository commands keep progress and errors on stderr and suppress persistent session logging. A DSR_LOG_FILE path that points at repos.yaml or a per-tool configuration therefore cannot corrupt it during reads, previews, edits or argument errors.

For a source-only release, --source-config FILE imports the reviewed tool_name, repo, absolute existing local_path, and publication_mode: source-only mapping into repos.d. An optional enabled value must be a boolean. The importer adds no language, binary targets or legacy repos.yaml row; an existing same-tool registry row is a conflict. Use --dry-run --json to inspect the exact recipe and paths before writing. Removal retains the recipe with enabled: false, and an explicit dsr release source-only remains available. Matching reimports preserve that opt-out; a different recipe is refused.

dsr config

Configuration management.

dsr config init --dry-run                       # Preview without changing files
dsr config init --force --dry-run               # Preview a reset
dsr config init --force                         # Preserve originals, then reset
dsr config show                                 # Show current config
dsr config get threshold_seconds                # Get specific value
dsr config set threshold_seconds=300 --dry-run  # Preview a value change
dsr config set threshold_seconds=300            # Preserve original, then set value
dsr config migrate --dry-run                    # Preview schema migration
dsr config edit --dry-run                       # Preview without launching editor
dsr config validate                             # Validate config files

Initialization keeps existing files unless --force is selected. A forced reset preserves every original in a unique adjacent *.bak.* file before publishing any defaults. Default files are staged first and replaced atomically; handled publication failures restore unchanged outputs from the backups. --dry-run and --json --dry-run create no files, directories, backups or logs.

If initialization is killed, the preserved originals and *.init.lock directories remain available for recovery. A later run refuses to steal those locks. See the configuration initialization contract for JSON recovery fields, backup restoration, and interruption limits.

config set and config migrate share those backups, locks and atomic replacement rules. They require yq and jq and refuse an interrupted initialization until its retained state has been inspected. Their previews leave files and configuration memory unchanged; JSON reports persisted: false. All configuration commands suppress persistent session logging so a log path that points at a configuration file cannot corrupt it. config edit --dry-run never launches the editor.

Reading a nonempty config.yaml requires yq and jq. Loading rejects malformed YAML, duplicate keys, multiple documents, unsupported schema versions and ambiguous dotted paths before replacing the resolved configuration. A failed read leaves the previous in-memory settings intact and returns an error; config show and config get do not report defaults as a successful read of an invalid file. Literal values, including empty strings, backslashes and trailing newlines, survive retrieval unchanged.

An absent or zero-byte file still loads defaults for initial setup, but config validate checks the physical file and requires an explicit schema_version: 1.0.0. Legacy mappings without a version remain readable so they can be migrated. Only DSR_NO_SIGN=1 or DSR_NO_SIGN=true explicitly disable signing; false and 0 preserve the configured signing policy.

dsr doctor

System diagnostics.

dsr doctor                                      # Check all dependencies
dsr doctor --fix                                # Fix config/actrc; list the rest

dsr status

System + last run summary.

dsr status                                      # Show cached summary
dsr status --refresh                            # Refresh host health checks
dsr status --compact                            # One line (prompts, tmux)
dsr status --watch                              # Redraw until interrupted
dsr status --json                               # JSON output

Exit 0 is healthy, 1 degraded (an unhealthy host, or the last command — status/help/version/report aside — failed), 3 unhealthy (no configuration). The summary includes the last command's outcome and the last dsr check result.

dsr report

Recent activity from the run logs every command writes.

dsr report                                      # Last 24h: runs, failures, throttling
dsr report --since 7d --limit 50                # A longer window
dsr report --repo ntm --json                    # One tool, machine-readable

Each run lists its command, tool, outcome and duration; failed runs (usage errors and interrupts aside) also appear as alerts with their error codes.

dsr prune

Remove old artifacts, logs and ordinary cache entries, or explicitly retire finished strict build snapshots and their private Cargo caches:

dsr prune --dry-run --max-age 30 --keep-last 5
dsr prune --snapshots --dry-run --max-age 30 --keep-last 5
dsr prune --snapshots --max-age 30 --keep-last 5 --force

--snapshots considers only source snapshots; it preserves release output, logs, ordinary caches, checkpoints and source/relocation history. A run must have completed every native task, retain its exact successful artifacts, and have completed publication into its local artifact set. Running, failed, unfinished and diagnostic runs remain available for recovery. The latest run is retained by default; age and the configured --keep-last always apply. Recorded published releases are also retained by default; add --no-keep-releases to permit their otherwise eligible snapshots to be retired.

A normal release can have only one build, which remains latest within its version. Explicitly include those completed runs when retiring old release sources:

dsr --json prune --snapshots --include-latest --max-age 30 \
  --keep-last 0 --no-keep-releases --dry-run
# Remove --dry-run and add --force after reviewing the result.

--include-latest is accepted only with --snapshots. It retains the checkpoint, latest link and collected output; active runs and busy build leases remain protected. An included latest run counts toward --keep-last, so use zero when retiring a version's only completed snapshot. A fresh build is required to regenerate retired source snapshots for further compilation.

New strict Unix snapshots carry private ownership receipts created before any source is copied. Cleanup verifies the original directory and marker identities, the configured host route, and both build leases before removing a snapshot. It includes retired hosts from synchronization and relocation history. Legacy snapshots without those original receipts and native Windows snapshots are retained. Snapshot paths alone never authorize deletion.

Cleanup records successful hosts individually. If one SSH host is unavailable, the command reports a partial result; retrying resumes the remaining hosts without double-counting earlier removals. --dry-run and the global -n inspect the same evidence without creating leases, modifying snapshots or writing cleanup records. Use --json for per-host results and retention reasons.

dsr version

Detect a repository's authoritative version and create an annotated release tag. Rust and Python metadata use Python 3.11+ to parse TOML, including quoted keys, literal strings and workspace inheritance; duplicate keys and malformed documents are refused before tagging. Python uses project.version when present, otherwise the Poetry base version at tool.poetry.version. Dependency versions and version-like text in descriptions are never release versions. For Rust virtual workspaces, set main_package in the tool's repos.d/<tool>.yaml; without it, all publishable workspace members must have one common version. A root package with an inherited version uses that package's resolved version unless main_package selects another member. Ambiguous or unreadable workspaces fail closed and never fall through to an unrelated ecosystem manifest. Workspace resolution is read-only (cargo metadata --locked --offline), so it requires cargo, jq, and a current Cargo.lock.

dsr version detect frankensqlite                 # Inspect version and tag state
dsr --json version detect /path/to/repo           # Machine-readable inspection
dsr --dry-run version tag frankensqlite           # Preview the exact tag
dsr version tag frankensqlite --push              # Create and push annotated tag

Exit Codes

Code Name Meaning
0 SUCCESS Operation completed successfully
1 PARTIAL_FAILURE Some targets/repos failed
2 CONFLICT Blocked by pending run/lock
3 DEPENDENCY_ERROR Missing gh auth, docker, ssh, etc.
4 INVALID_ARGS Bad CLI options or config
5 INTERRUPTED User abort (Ctrl+C) or timeout
6 BUILD_FAILED Build/compilation error
7 RELEASE_FAILED Upload/signing failed
8 NETWORK_ERROR Network connectivity issue

Configuration

Main Config (~/.config/dsr/config.yaml)

schema_version: "1.0.0"

# Queue time threshold before triggering fallback (seconds)
threshold_seconds: 600

# Default build targets
default_targets:
  - linux/amd64
  - darwin/arm64
  - windows/amd64

# Artifact signing
signing:
  enabled: true
  key_path: ~/.config/dsr/secrets/minisign.key

# SBOM generation
sbom:
  enabled: true
  format: spdx-json

# Logging
log_level: info  # debug|info|warn|error

Repository Config (~/.config/dsr/repos.d/ntm.yaml)

repo: Dicklesworthstone/ntm
local_path: /data/projects/ntm
language: go

targets:
  - linux/amd64
  - darwin/arm64
  - windows/amd64

workflow: .github/workflows/release.yml

# Pin this repo's build host per platform (cross_compile.<platform>.host,
# if set, takes precedence; unlisted platforms use hosts.yaml)
hosts:
  linux/amd64: linux-builder
  darwin/arm64: mac-builder
  windows/amd64: win-builder

Workflow events

DSR runs act with a push event by default. For workflows triggered by a published release, select that event explicitly in repos.d/<tool>.yaml:

workflow: .github/workflows/release.yml
workflow_event: release
workflow_event_payload:
  action: published

For a dispatch workflow, put its inputs in the payload. Strings and numbers retain their JSON types, including numeric zero. Boolean values become "true" or "false" in the event payload, matching GitHub's event format; act restores booleans in the workflow's typed inputs context:

workflow_event: workflow_dispatch
workflow_event_payload:
  inputs:
    channel: stable
    run_tests: true

The selected build version owns ref: refs/tags/v<VERSION> and, for a release event, release.tag_name. Release events default to action: published. An explicitly matching release.target_commitish is normalized to the full tag ref so it cannot select an identically named branch. Conflicting source selectors, invalid payload objects, and extra act options that replace the event file or inputs are refused before execution. Payloads are limited to 64 KiB of canonical JSON. DSR writes a private event file outside the upload inventory and retains its canonical SHA-256 with the task and build result. Resume requires the same event, payload, and original result evidence; changing the recipe requires a new build.

watch --auto-fallback requires the observed workflow event to match this configuration as well as the exact repository, tag, source, workflow file and ID, run, and attempt. Deferred work and retries retain that original workflow identity and configured payload. A changed workflow, attempt, or payload withholds automatic fallback. Configure the actual repository-relative workflow path, such as .github/workflows/release.yml; a bare release.yml is ambiguous for automatic admission because the local runner treats it as a root-level file. Existing recovery journals without the original workflow and event custody require an explicit manual fallback.

GitHub's workflow-run API does not provide the original dispatch inputs or release action. Automatic fallback replays the reviewed configuration above; it does not recover the original webhook body. Use it for workflows whose release inputs are fixed by that configuration. Publication still uses DSR's normal signing, release-contract, and explicit --prerelease policies.

Config precedence: repos.yaml vs repos.d/

Tool configuration lives in two places with distinct roles:

  • repos.d/<tool>.yaml is the build authority. dsr build and dsr release read it exclusively for build-affecting keys (local_path, targets, build_cmd, target_triples, cross_compile, host_paths, artifact_naming, archive_format, release_contract, ...). The file must be named after its own tool_name — the runner loads repos.d/<tool_name>.yaml by filename.
  • repos.yaml is the registry. Native-tool dsr repos info and the quality gates (checks:) read it. dsr repos list and dsr check use per-tool entries first, then registry-only tools; listing retains distinct tools sharing a repository. Their effective automation policy inherits registry enabled only when the per-tool key is absent. A per-tool repository opt-out also disables duplicate registry aliases for that repository.
  • Native build keys must match except the boolean enabled override. dsr repos validate fails on divergence: mismatched values, build keys present only in repos.yaml (the runner would ignore them), repos.d files missing from the registry, and repos.d files whose name does not match their tool_name. A tool with no repos.d file validates with a warning — it is registry-only and cannot build.

Source-only recipes are intentionally absent from the legacy registry. dsr repos info TOOL reads their complete source recipe, and dsr repos validate checks their source metadata and the absence of conflicting registry authority. They need no binary targets or artifact-naming settings. Disabled source recipes remain inspectable; missing local checkouts produce validation warnings.

Quality checks in repos.yaml may use YAML block strings for complete shell programs, including heredocs, functions and conditional statements:

tools:
  my-tool:
    required_checks:
      - |
        if [[ -f Cargo.lock ]]; then
          cargo test --locked
        else
          exit 1
        fi

Each array entry runs as one check with its own shell state, exit status and complete log. A check receives no input unless it redirects its own stdin. Required checks still run with --skip-checks; --dry-run records the exact programs without executing them. Each invocation retains a separate receipt and logs, including when several checks run within the same second.

Build target derivation and the Linux glibc floor

DSR uses one supported platform contract across configuration, build manifests, packaging, installers, release bundles and SLSA provenance:

Operating system Canonical architectures
Linux amd64, arm64, 386, armv7
macOS (darwin) amd64, arm64
Windows amd64, arm64, 386
FreeBSD amd64

These are exact pairs, not an arbitrary combination of OS and architecture. For example, linux/armv7 and freebsd/amd64 are supported, while darwin/386, windows/armv7, and freebsd/arm64 are rejected with exit 4 during configuration validation, before source synchronization or compilation. The error names the rejected target and lists supported replacements. Compiler availability and native/cross-build host configuration remain prerequisites; support in this contract does not provision a compiler or host automatically.

Native Go builds derive GOOS and GOARCH from the requested platform, so a generic go build recipe produces the requested architecture. The armv7 alias resolves to GOARCH=arm, GOARM=7. Platform env values override global env values; effective selectors that conflict with the requested platform stop dispatch with exit 4. Launchers clear inherited target selectors before applying the resolved pair. The repository still controls CGO_ENABLED and any C cross-compilation toolchain.

For Rust tools the runner derives CARGO_BUILD_TARGET from target_triples.<platform> (or the standard triple for the platform) whenever the platform's cross_compile env does not set one, so every build is explicit about its target and the artifact collector always looks where cargo wrote. Collected binaries are validated against the requested platform's executable format (ELF/Mach-O/PE + machine type, with Linux/FreeBSD ELF OS ABI) before packaging — a wrong-architecture artifact fails the build instead of shipping. Build commands can branch on DSR_TARGET_OS / DSR_TARGET_ARCH / DSR_TARGET_PLATFORM / DSR_TARGET_TRIPLE without parsing paths. Opt out of the derivation with derive_cargo_build_target: false.

Native Rust collection also follows an explicit literal Cargo profile in the build command:

build_cmd: cargo build --locked --profile ship

For a custom [profile.ship], artifacts come from target/<triple>/ship/, even when that profile inherits from release. Cargo's built-in dev and test profiles use debug/; release and bench use release/. The same selection applies to the primary executable, executable families, companions and strict cache identity. If a command has multiple executable-producing Cargo invocations, their profiles must agree. With the default dev profile, one command may omit the selector while another uses --profile dev. For direct cargo build, cargo rustc, cargo zigbuild, cargo xwin build, cargo xwin rustc, cross build and cross rustc, collection uses the explicit selector first, then the configured build_profile. With neither set, it collects Cargo's dev output from debug/. Opaque build scripts keep the release default. Set build_profile when a script chooses another profile internally.

On Unix native hosts, direct Cargo recipes may also set an explicit output directory:

build_cmd: cargo build --locked --profile ship --target-dir build/output

DSR redirects this option to the fresh private directory for the current attempt, then collects the selected target and profile there. The directory named in the command is never used as a source of previously compiled binaries. Set env.CARGO_TARGET_DIR to choose the parent of these private directories. This applies to direct cargo build, cargo rustc, cargo zigbuild, cargo xwin build and cargo xwin rustc, including literal +toolchain selection and multiple direct Cargo producers joined by &&. Their target and profile selections must agree. The same rewritten command is used for strict source admission, compiler observation and cache identity; the original recipe remains bound by the configuration hash. A recipe with an explicit directory and additional shell commands, pipelines, redirections or dynamic arguments is refused because its output use cannot be redirected safely. Opaque build scripts retain their declared output convention.

Native Windows Cargo recipes also support explicit --target-dir values for one literal cargo build or cargo rustc invocation, including +toolchain, target, feature and profile selectors. Both --target-dir PATH and --target-dir=PATH select the current attempt's private output directory; DSR never compiles into or collects from the path written in the recipe. The same policy applies to ordinary and strict Windows builds. Strict context receipts bind the original command and its effective private-output command, so metadata admission, compilation and collection agree on that selection. Repeated output selectors and commands whose output use cannot be safely redirected are refused before compilation. This does not broaden the strict Windows literal-command grammar described in the CLI contract.

Linux Rust builds targeting *-linux-gnu — ordinary and strict release-contract builds alike — default to a portable glibc floor of 2.28: a cargo shim (staged with the isolated source, or beside a strict snapshot so the snapshot stays byte-identical) routes cargo build through cargo zigbuild --target <triple>.<floor> (cargo-zigbuild >= 0.23.0 and zig must be on the build host), and the collected binary's versioned glibc symbols are asserted against the floor; a binary above it fails the target. Without this, natively built amd64 binaries inherit the build host's glibc and stop starting on Debian 12 / Ubuntu 22.04 / RHEL 9-class systems the moment the build fleet upgrades. Configure per tool with linux_glibc_floor: "2.28" (or another MAJOR.MINOR), opt out with linux_glibc_floor: native; the floor is skipped automatically for musl triples, and dsr applies no shim for platforms whose env carries an operator cross toolchain (CARGO_TARGET_<T>_LINKER / CC_<t>) or build commands that already invoke zigbuild, xwin, or cross — but an explicitly configured linux_glibc_floor is still enforced on those binaries.

The automatic exemption requires an actual cargo zigbuild, cargo xwin, or cross build command. Package names, feature names, comments, and printed messages mentioning those tools retain the default floor. A command sequence that also runs ordinary cargo build retains the floor as well; commands whose compiler routing cannot be determined safely keep the default protection.

Strict Unix builds attest the generated Cargo shim separately from the actual Cargo, rustc and rustup executables it delegates to. The expected shim hash is derived from DSR's generator; changed bytes, links or unexpected files in its directory stop admission before a toolchain probe can use them. The original receipt binds the target and glibc floor and is checked again before and after compilation. The build still runs through cargo-zigbuild and Zig, whose executable identities are also retained. strict_cargo_cache_root uses this same verified dispatch and separates cache entries by target and floor, while allowing identical generated shims in fresh source stages to reuse eligible intermediates.

The generated shim pins cargo-zigbuild to the Zig executable on its delegated PATH, including with plugin versions that otherwise prefer Python's ziglang package. It rejects externally supplied CARGO_ZIGBUILD_ZIG_COMMAND, CARGO_ZIGBUILD_ZIG_COMMAND_ARGS, CARGO_ZIGBUILD_PYTHON_PATH, CARGO_ZIGBUILD_ZIG_PATH, and CARGO_ZIGBUILD_ZIG_VERSION, including empty values. Put the intended Zig executable on PATH; use an explicit cargo zigbuild build command when the repository owns Zig dispatch. Interpreter aliases back to the staged Cargo shim are rejected before the identity observer starts, including symlinks and hard links outside its directory.

gnu and musl variants of one platform

A platform may list several target triples when a release ships, for example, both a glibc and a static musl build of linux/amd64:

artifact_naming: "${name}-${version}-${target_triple}"
install_script_compat: "${name}-${target_triple}"
target_triples:
  linux/amd64:
    - x86_64-unknown-linux-gnu    # primary
    - x86_64-unknown-linux-musl
linux_libc_fallback: none

The first entry is the primary variant. Native Rust builds compile every configured GNU/musl variant as an independent task, with its own CARGO_BUILD_TARGET, source stage, Cargo home, output directory and resume receipt. A workflow artifact whose name identifies no variant is named as the primary. A workflow run through act can also build both variants; dsr build collects them under the platform, gives each variant it produced its own installer-compatible alias and configured include_files, and names any configured variant the build did not produce. dsr release publishes each artifact only under its own variant's names (an artifact names its variant by the full triple or by a separate gnu/musl word). When the naming pattern cannot tell variants apart (no ${target_triple}), a name several variants derive goes to the artifact it already names, else to the primary variant, and the release says so instead of failing on a same-name collision. Manifests retain each artifact's target_triple, so packaging and release do not infer a different variant later. Native results retain the selected triple and its build environment, and generic raw executable names are qualified by triple during collection; the archives still contain the configured executable name. Contradictory full triples or libc markers fail collection. This is declared naming metadata, not ABI proof. Generated installers detect GNU or musl (including musl ldd --version output on stderr with a nonzero status), and --libc gnu|musl selects an exact variant. An unavailable or unknown libc fails. The default linux_libc_fallback: none can be changed to musl to allow automatic GNU-to-musl fallback when the GNU payload is unavailable; it never permits musl-to-GNU fallback, overrides an explicit --libc, or retries after integrity failure. Each configured triple gets an independent archive/checksum/signature cache, including offline use. To install both variants, use target-qualified names: a nonprimary variant cannot be downloaded through a shared alias owned by the primary. dsr config validate rejects empty, duplicate or malformed triple lists.

Generic native Go releases configured with env.CGO_ENABLED: "0" also install on musl systems and systems where libc detection is unavailable. The installer uses the effective setting after applying cross_compile.<platform>.env, so a platform can enable or disable this behavior independently. This requires native routing: an absent, empty, or null act_job_map.<platform> entry. An act workflow controls its own environment, so its mapped targets retain libc selection even when the native configuration disables CGO. Explicit target triples, strict release contracts, --libc, and build commands or Go flags that override the declared CGO policy retain their existing variant selection. These Go releases use separate verified cache entries, so an older platform cache cannot supply a potentially libc-dependent executable. Checksums and configured signatures remain required on every installation path.

Strict native Rust releases can also build the complete GNU/musl matrix. Their contract names one exact primary for each configured triple, using the same platform@triple identity as the native task:

targets: [linux/amd64]
target_triples:
  linux/amd64: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
release_contract:
  checksum_sidecar: sha256
  exact_primary_assets:
    linux/amd64@x86_64-unknown-linux-gnu: example-standard.tar.gz
    linux/amd64@x86_64-unknown-linux-musl: example-static.tar.xz

Each exact name selects its own archive format and remains unchanged through collection and publication. Names can be arbitrary; the manifest binds the physical platform and selected triple explicitly. Every configured variant needs its own primary and checksum sidecar, with signatures when configured. A singleton platform keeps its existing unqualified contract key. Missing, mixed or unconfigured variant keys fail before compilation.

Platform-level workspace_additional_artifacts belong to the first configured triple and are collected once. Companion files inside a workspace archive can appear in each variant's archive. A diagnostic selection of a physical platform includes all its configured variants. Strict releases continue to use native execution with authenticated source and compiler contexts.

Resume reuses each completed variant only when its recorded files still match, and refuses a changed matrix configuration; a failed variant does not force its successful sibling to compile again. All variants must succeed before the build produces a publishable manifest. Same-host selective resume is supported for the matrix. An exact platform@triple selector can relocate one failed variant without changing the platform-wide recipe or rebuilding its completed siblings; a bare platform relocation requires a singleton platform. A failed singleton can use approved host relocation in a run that also contains GNU/musl variants. The completed variants keep their original receipts and artifacts. The approval binds the original matrix configuration, and the new configuration digest is saved atomically with the replacement host and source bindings; subsequent unapproved configuration changes still prevent resume.

With --parallel, two targets on one host whose build writes the same in-tree file (for example go build -o tool ./cmd/tool) no longer overwrite each other: the later target builds in a private copy of the source under /var/tmp (or the host's build_root), which is removed after collection. Where a private copy cannot help (strict snapshots, Windows hosts, outputs outside the tree such as a shared absolute GOBIN), the colliding targets run one after the other.

A target whose host is at its concurrency limit waits for a slot for up to one build timeout (DSR_BUILD_TIMEOUT, default 3600s) instead of failing after five minutes; set DSR_SELECTOR_WAIT_TIMEOUT to choose another bound.

Native disk admission budgets 20 GiB of available capacity per configured host build slot: two slots require 40 GiB and four require 80 GiB. Shared filesystems and APFS containers count their capacity once, while each volume's quota still limits usable space. A large volume above 90% usage can proceed with a warning when its byte requirement is met. Missing concurrency defaults to two; invalid counts refuse admission. This check observes capacity without reserving it. See disk admission for split-storage contracts, effective native paths, and the deterministic regression commands.


Logging and State

dsr stores run logs and build artifacts under XDG state/cache directories:

~/.local/state/dsr/
  logs/YYYY-MM-DD/run.log
  logs/YYYY-MM-DD/builds/*.log
  artifacts/
  manifests/

~/.cache/dsr/
  act/
  builds/

When a command fails, start with the latest run.log, then per-build logs under logs/YYYY-MM-DD/builds/.


Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        dsr CLI                                   │
│   check │ build │ release │ fallback │ watch │ doctor           │
└─────────────────────────────────────────────────────────────────┘
                            │
        ┌───────────────────┼───────────────────┐
        ▼                   ▼                   ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ GitHub API       │ │ Build Dispatch   │ │ Release Upload   │
│ - Queue monitor  │ │ - act (Linux)    │ │ - gh release     │
│ - Workflow runs  │ │ - SSH (macOS)    │ │ - Checksums      │
│                  │ │ - SSH (Windows)  │ │ - Signatures     │
└──────────────────┘ └──────────────────┘ └──────────────────┘
                            │
        ┌───────────────────┼───────────────────┐
        ▼                   ▼                   ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ linux-builder (Linux)      │ │ mac-builder (macOS)    │ │ win-builder (Windows)   │
│ - Docker + act   │ │ - Native build   │ │ - Native build   │
│ - x86_64         │ │ - arm64          │ │ - x86_64         │
└──────────────────┘ └──────────────────┘ └──────────────────┘

Troubleshooting

"gh: command not found"

# macOS
brew install gh

# Linux
sudo apt install gh  # Debian/Ubuntu
sudo dnf install gh  # Fedora

# Then authenticate
gh auth login

"act: command not found"

brew install act
# or download from https://github.com/nektos/act/releases

"Error: Bash 4.0+ required"

macOS ships with Bash 3.x. Install newer Bash:

brew install bash
# Add to shells
sudo bash -c 'echo /opt/homebrew/bin/bash >> /etc/shells'
# Change default (optional)
chsh -s /opt/homebrew/bin/bash
# Or run dsr explicitly
/opt/homebrew/bin/bash dsr check

"SSH connection to mac-builder failed"

  1. Verify SSH access: ssh mac-builder echo ok
  2. Check Tailscale is running: tailscale status
  3. Verify host is in ~/.config/dsr/hosts.yaml

"Docker is not running"

# Start Docker Desktop, or:
sudo systemctl start docker  # Linux

Files owned by wrong user (UID 1001) after running act

This happens when ~/.actrc has --bind but is missing the --user flag. The catthehacker runner images run as UID 1001 (user "runner"), so files they create get that ownership.

Fix:

# Add user mapping to actrc
echo '--container-options --user=$(id -u):$(id -g)' >> ~/.actrc

# Fix existing files
sudo chown -R $(id -un):$(id -gn) /path/to/affected/repo

Prevention:

# Copy the example config (already has the fix)
cp /path/to/dsr/config/actrc.example ~/.actrc

# Verify configuration
dsr doctor

See docs/ACT_SETUP.md for complete act setup instructions.


Installers and Verification

Installers generated by dsr always verify SHA256 checksums, and verify minisign signatures whenever a public key is embedded. Use dsr signing init to generate signing keys. The generator embeds the first key it finds: minisign_pubkey in repos.d/<tool>.yaml, the tool's release_contract.minisign_public_key_file, signing.minisign_pubkey in config.yaml, then the minisign.pub written by dsr signing init. It warns when there is none (that installer then skips signature checks) and refuses a value that is not a minisign public key. Installers take --version 1.2.3 or v1.2.3, --mode vibe|safe (safe installs only the verified release binary: no agent skills, no source builds), and --yes to replace an existing binary. Without --yes they ask on the terminal even under curl | bash. Strict release contracts opt into fail-closed signatures with a tag-tracked release_contract.minisign_public_key_file; DSR then derives the exact .minisig inventory and cryptographically verifies the served primary and signature bytes, rather than relying only on GitHub asset metadata. When release_contract.github_tag_ruleset pins numeric repository and ruleset IDs, strict release and verification also require a live source-bound GitHub receipt for immutable refs/tags/v* governance. A changed history version, weakened rule, bypass actor, repository mismatch, or redacted field invalidates the frozen receipt and blocks publication or verification.

Check the updater on release hosts

Verify the release from the machines that will run its binaries:

dsr verify upgrade ntm --host linux-builder,mac-builder --version 1.2.3
dsr verify upgrade ntm --host win-builder --version 1.2.3
dsr verify upgrade ntm --all-hosts --version 1.2.3 --dry-run
dsr --json verify upgrade --all-tools --platform linux/amd64

--host selects configured names from hosts.yaml; repeat it or pass a comma-separated list. --platform selects enabled hosts for that platform and filters an explicit host list when both are present. --all-hosts selects every enabled host. The existing --all option, also spelled --all-tools, still selects tools; it can be combined with host selection.

DSR sends a self-contained verification runner over SSH and uses the host's installed updater by default. The host does not need DSR installed. Linux and macOS workers need Bash 4+, jq, mikefarah yq v4, and standard process utilities. Windows workers need PowerShell 7.4+ on their SSH command PATH; they receive a standalone PowerShell worker and do not need Bash, jq, yq, or an installed DSR. The runner checks the observed OS/architecture against the selected host before running the updater. An unavailable host never falls back to checking locally.

With --build-from-source, the worker compiles the configured primary executable in a temporary output directory. It uses that host's checkout and compiler, including the configured source subdirectory, entry, Cargo package and features. Map different checkout locations in the tool recipe:

upgrade_source_paths:
  linux-builder: /data/projects/ntm
  mac-builder: /Users/builder/projects/ntm
  win-builder: C:/projects/ntm

Without a mapping, local_path is interpreted on the selected host. Paths must be absolute. This command does not transfer source trees, install compilers, or replace installed tools. It checks the updater in the selected checkout; it does not attest that checkout as the source of a published asset. Windows source checks support Go, Rust, Bun and TypeScript. Bun checks require installed Bun and Git, committed unchanged manifests/entry files, and a committed bun.lock or bun.lockb. The worker checks workspace membership, installs frozen dependencies, compiles the configured primary entry into fresh output, and rechecks its selected source inputs. Native Windows commands run inside a JobObject so completion, deadlines, and worker exit retire their remaining child processes.

JSON reports each selected host, its observed platform and hostname, the expected and reported release versions, updater output and exit status. --version requires an exact reported latest version. Dry runs describe the matrix without contacting hosts. Ordinary host failures retain the remaining results; interruption stops before the next tool or host.


Further Reading

  • docs/CLI_CONTRACT.md — authoritative CLI spec, JSON envelope, and exit codes
  • docs/ACT_SETUP.md — nektos/act installation and setup guidance

Limitations

What dsr Doesn't Do

  • Not a CI/CD replacement — It's a fallback for when GH Actions is slow, not a complete build system
  • No hosted runners — You need your own machines for macOS/Windows builds
  • Caching is opt-in — Strict Unix Rust builds may reuse intermediates as described above; other builds start fresh (act has some layer caching).

Known Limitations

Capability Current State Notes
Linux builds ✅ Full support Via act in Docker
macOS builds ✅ Full support Requires SSH access to Mac
Windows builds ✅ Full support Requires SSH access to Windows
ARM Linux ⚠️ Experimental QEMU emulation via act
Container caching ⚠️ Basic Docker layer cache only

FAQ

Why "Doodlestein Self-Releaser"?

It's part of the Dicklesworthstone tool ecosystem. The name is intentionally whimsical.

Does it work with private repos?

Yes, as long as gh is authenticated with access to the repo.

Can I use it without nektos/act?

Yes, for macOS and Windows targets that build natively via SSH. Linux builds currently require act.

How does it compare to self-hosted runners?

Self-hosted runners require always-on infrastructure. dsr uses your existing machines on-demand when GH Actions is slow.

Can I use it in CI?

Yes. Use --json --non-interactive for scripted usage:

if dsr check --json | jq -e '.details.throttled | length > 0'; then
  dsr fallback --repo $REPO --non-interactive
fi

About Contributions

Please don't take this the wrong way, but I do not accept outside contributions for any of my projects. I simply don't have the mental bandwidth to review anything, and it's my name on the thing, so I'm responsible for any problems it causes; thus, the risk-reward is highly asymmetric from my perspective. I'd also have to worry about other "stakeholders," which seems unwise for tools I mostly make for myself for free. Feel free to submit issues, and even PRs if you want to illustrate a proposed fix, but know I won't merge them directly. Instead, I'll have Claude or Codex review submissions via gh and independently decide whether and how to address them. Bug reports in particular are welcome. Sorry if this offends, but I want to avoid wasted time and hurt feelings. I understand this isn't in sync with the prevailing open-source ethos that seeks community contributions, but it's the only way I can move at this velocity and keep my sanity.


License

MIT License (with OpenAI/Anthropic Rider). See LICENSE.

Explore related projects

Loading…