{"record":{"id":"1acca5396468981c","repo":"astrid-runtime/astrid","slug":"seal-requires-a-local-distro-toml-path-or-its-dire","errorCode":null,"errorMessage":"seal requires a local Distro.toml path or its directory; {distro:?} is not a file or directory","messagePattern":"seal requires a local Distro\\.toml path or its directory; (.+?) is not a file or directory","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/distro/seal.rs","lineNumber":188,"sourceCode":"    )\n    .await\n    .map(Some)\n}\n\n/// Resolve a seal `distro` argument to a `Distro.toml` path.\nfn resolve_manifest_path(distro: &str) -> anyhow::Result<PathBuf> {\n    let p = Path::new(distro);\n    if p.is_dir() {\n        let candidate = p.join(\"Distro.toml\");\n        if candidate.is_file() {\n            return Ok(candidate);\n        }\n        bail!(\"{} contains no Distro.toml\", p.display());\n    }\n    if p.is_file() {\n        return Ok(p.to_path_buf());\n    }\n    bail!(\n        \"seal requires a local Distro.toml path or its directory; {distro:?} is not a file or directory\"\n    )\n}\n\n/// Load a 32-byte raw ed25519 secret key from `path`. Never logged.\nfn load_signing_key(path: &Path) -> anyhow::Result<astrid_crypto::KeyPair> {\n    let bytes = std::fs::read(path)\n        .with_context(|| format!(\"failed to read signing key {}\", path.display()))?;\n    if bytes.len() != 32 {\n        bail!(\n            \"signing key {} must be exactly 32 raw bytes (got {})\",\n            path.display(),\n            bytes.len()\n        );\n    }\n    astrid_crypto::KeyPair::from_secret_key(&bytes)\n        .map_err(|e| anyhow::anyhow!(\"invalid ed25519 secret key: {e}\"))\n}","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/distro/seal.rs#L170-L206","documentation":"resolve_manifest_path's final guard: after the directory and file cases fail, the given distro argument is neither an existing directory nor an existing file, so sealing cannot proceed and it bails explaining what seal requires.","triggerScenarios":"`astrid seal some/path` where some/path does not exist (typo, wrong cwd, not yet generated); passing a glob or a registry name where a local path is required.","commonSituations":"Running seal before cloning/creating the project; shell expansion quirks leaving a literal glob; running from a different working directory than expected; deleted manifest after a clean.","solutions":["Check the path exists with `ls <path>` and correct the typo or cd to the right directory","Pass an explicit path to Distro.toml or its containing directory","Create/restore the Distro.toml if the project was cleaned or not yet initialized"],"exampleFix":"// before\nastrid seal ./distro.toml     # file doesn't exist (wrong name)\n// after\nastrid seal ./Distro.toml","handlingStrategy":"validation","validationCode":"let p = std::path::Path::new(distro);\nif !p.exists() {\n    anyhow::bail!(\"seal target {:?} does not exist\", distro);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify the path exists before invoking seal","Use absolute paths or set cwd explicitly in automation","Avoid passing globs or registry names where a local filesystem path is required"],"tags":["cli","manifest","path"],"backgroundTag":"file-not-found","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}