{"record":{"id":"b278e7fd14640700","repo":"astrid-runtime/astrid","slug":"shuttle-archive-not-found","errorCode":null,"errorMessage":"shuttle archive not found: {}","messagePattern":"shuttle archive not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/distro/shuttle_install.rs","lineNumber":51,"sourceCode":"\n/// Install a distro from a `.shuttle` archive.\n///\n/// Archive verification remains offline and local; package publication is\n/// delegated to the authenticated daemon for the explicit target principal.\n#[allow(\n    clippy::too_many_lines,\n    reason = \"intentional linear unpack→verify→install→lock pipeline; \\\n              the security ordering is clearer kept in one place\"\n)]\npub(crate) async fn install_from_shuttle(\n    shuttle_path: &Path,\n    opts: &InitOpts,\n) -> anyhow::Result<()> {\n    let home = AstridHome::resolve()?;\n    home.ensure()?;\n\n    if !shuttle_path.is_file() {\n        bail!(\"shuttle archive not found: {}\", shuttle_path.display());\n    }\n\n    // 1. Unpack to a temporary mirror (no install yet).\n    let mirror_tmp = tempfile::tempdir().context(\"failed to create shuttle mirror dir\")?;\n    let mirror = mirror_tmp.path();\n    shuttle::unpack(shuttle_path, mirror)?;\n\n    // 2. Load manifest / lock / sig from the mirror.\n    let manifest_bytes = std::fs::read(mirror.join(shuttle::MANIFEST_NAME))\n        .context(\"shuttle is missing Distro.toml\")?;\n    let manifest_text =\n        std::str::from_utf8(&manifest_bytes).context(\"Distro.toml is not valid UTF-8\")?;\n    let manifest = parse_manifest(manifest_text)?;\n\n    let lock_text = std::fs::read_to_string(mirror.join(shuttle::LOCK_NAME))\n        .context(\"shuttle is missing Distro.lock\")?;\n    let lock: DistroLock =\n        toml::from_str(&lock_text).context(\"failed to parse Distro.lock from shuttle\")?;","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/distro/shuttle_install.rs#L33-L69","documentation":"`install_from_shuttle` checks that the given `.shuttle` file exists and is a regular file before doing any work (resolving the home, unpacking, verifying). If the path is missing (or a directory), installation aborts early with this error.","triggerScenarios":"Calling `install_from_shuttle` (or the install CLI) with a `shuttle_path` that does not exist, was deleted/moved, is mis-typed, or points at a directory.","commonSituations":"Typo in the filename; running install before `pack` produced the capsule; shell glob that matched nothing; stale script referencing an old build artifact.","solutions":["Check the path with `ls -l <path>`; confirm the `.shuttle` file exists and is a regular file.","Run the pack step first so the capsule is produced, then install from its printed path.","Fix typos or stale variables in the command/script; re-download the capsule if it was never fetched."],"exampleFix":"// before\n$ astrid init --shuttle distro/app.shutle   # typo\n// after\n$ ls distro/*.shuttle && astrid init --shuttle distro/app.shuttle","handlingStrategy":"validation","validationCode":"use std::path::Path;\nif !shuttle_path.is_file() {\n    eprintln!(\"shuttle archive missing: {}\", shuttle_path.display());\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = install_from_shuttle(&path, &opts) {\n    if e.to_string().contains(\"not found\") {\n        eprintln!(\"run the pack step first; path was {}\", path.display());\n    }\n}","preventionTips":["Run pack before install and use the path it prints","Glob-check the capsule exists (`ls distro/*.shuttle`) in scripts","Quote paths and check spelling; avoid stale hardcoded paths"],"tags":["file-not-found","install","cli","archive"],"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-14T11:17:12.474Z"}