astrid-runtime/astrid · error · anyhow::Error

astrid distro apply requires an explicit distro source: @own

Error message

astrid distro apply requires an explicit distro source: @owner/repo, URL, local Distro.toml, or .shuttle; Astrid Runtime does not choose a product distro

What it means

`astrid distro apply` was invoked without any explicit source for the distro. The Astrid Runtime intentionally never picks a default/product distro on the user's behalf, so the command requires one of the accepted source forms: `@owner/repo`, a URL, a local `Distro.toml`, or a `.shuttle` path. dispatch_distro bails with this message after checking that neither `--allow-unsigned` nor any distro source argument was provided.

Source

Thrown at crates/astrid-cli/src/dispatch.rs:515

            yes,
            offline,
            allow_unsigned,
            accept_new_key,
            vars,
        } => {
            if agent.is_some() {
                return Ok(commands::stub::deferred(
                    "distro apply -a <agent>",
                    &[tracker_657()],
                ));
            }
            if allow_unsigned {
                anyhow::bail!(
                    "astrid distro apply requires a signed Distro; --allow-unsigned is not acceptance"
                );
            }
            let distro = non_empty_distro_source(name).ok_or_else(|| {
                anyhow::anyhow!(
                    "astrid distro apply requires an explicit distro source: @owner/repo, URL, local Distro.toml, or .shuttle; Astrid Runtime does not choose a product distro"
                )
            })?;
            let opts = commands::init::InitOpts {
                yes,
                offline,
                allow_unsigned,
                accept_new_key,
                vars: commands::init::parse_cli_vars(&vars)?,
                target_principal: crate::principal::current(),
                // `distro apply` has no `--grant-capsules` surface; granting
                grant_capsules: false,
                require_signed: true,
            };
            commands::init::run_init(&distro, &opts).await?;
            if apply_self_grant_required(&distro) {
                commands::init::apply_self_grant(&opts.target_principal).await?;
            }

View on GitHub (pinned to affd8760f4)

Solutions

  1. Pass an explicit distro source, e.g. `astrid distro apply @owner/repo`.
  2. Alternatively point at a URL, a local `Distro.toml`, or a `.shuttle` file.
  3. If you also intended to skip signature verification, note that `--allow-unsigned` is not acceptance and is rejected separately; supply a signed Distro.

Example fix

// before
astrid distro apply
// after
astrid distro apply @acme/standard-distro
Defensive patterns

Strategy: validation

Validate before calling

// shell
if [ -z "$DISTRO_SRC" ]; then echo "distro source required (@owner/repo, URL, Distro.toml, or .shuttle)" >&2; exit 2; fi
astrid distro apply "$DISTRO_SRC"

Prevention

When it happens

Trigger: Running `astrid distro apply` (via dispatch_subcommand -> dispatch_distro) with `name` empty/None so `non_empty_distro_source(name)` returns None. E.g. `astrid distro apply` with no positional source, or with a whitespace-only value.

Common situations: Copying an install command but omitting the `@owner/repo` argument; scripts parameterized with an empty DISTRO variable; users expecting the CLI to auto-select a bundled distro as with some other runtimes.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/5c1ce00d7563e823. Report an issue: GitHub.