astrid-runtime/astrid · error

{} contains no Distro.toml

Error message

{} contains no Distro.toml

What it means

resolve_manifest_path accepts either a direct path to a Distro.toml file or a directory containing one. When given a directory that does not contain a Distro.toml file, it bails with this message naming the directory.

Source

Thrown at crates/astrid-cli/src/commands/distro/seal.rs:183

        &capsule.source,
        (!capsule.version.is_empty()).then_some(capsule.version.as_str()),
        capsule.tag.as_deref(),
        Some(&capsule.name),
        dest,
    )
    .await
    .map(Some)
}

/// Resolve a seal `distro` argument to a `Distro.toml` path.
fn resolve_manifest_path(distro: &str) -> anyhow::Result<PathBuf> {
    let p = Path::new(distro);
    if p.is_dir() {
        let candidate = p.join("Distro.toml");
        if candidate.is_file() {
            return Ok(candidate);
        }
        bail!("{} contains no Distro.toml", p.display());
    }
    if p.is_file() {
        return Ok(p.to_path_buf());
    }
    bail!(
        "seal requires a local Distro.toml path or its directory; {distro:?} is not a file or directory"
    )
}

/// Load a 32-byte raw ed25519 secret key from `path`. Never logged.
fn load_signing_key(path: &Path) -> anyhow::Result<astrid_crypto::KeyPair> {
    let bytes = std::fs::read(path)
        .with_context(|| format!("failed to read signing key {}", path.display()))?;
    if bytes.len() != 32 {
        bail!(
            "signing key {} must be exactly 32 raw bytes (got {})",
            path.display(),
            bytes.len()

View on GitHub (pinned to affd8760f4)

Solutions

  1. Pass the directory that actually contains Distro.toml, or the Distro.toml path itself
  2. `cd` into the project root (where Distro.toml lives) before running seal
  3. Create the Distro.toml in the directory if this is a new project, or fix the manifest name

Example fix

// before
astrid seal ./src
// after
astrid seal .   # directory containing Distro.toml
Defensive patterns

Strategy: validation

Validate before calling

let p = std::path::Path::new(distro);
let ok = p.is_file() || (p.is_dir() && p.join("Distro.toml").is_file());
if !ok { anyhow::bail!("{} is not a Distro.toml or a directory containing one", distro); }

Prevention

When it happens

Trigger: `astrid seal <dir>` where <dir> exists but has no Distro.toml inside; passing the wrong project directory (e.g. a parent or a src/ subdirectory).

Common situations: Running seal from the wrong checkout or a subdirectory; a project whose manifest was renamed (e.g. Astrid.toml) or not yet created; typo'd path to a directory that exists but isn't a project root.

Understand the failure class

Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.

Related errors


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