{"record":{"id":"bd1ec8241e89ba2f","repo":"astrid-runtime/astrid","slug":"installation-incomplete-succeeded-total-capsu","errorCode":null,"errorMessage":"Installation incomplete: {succeeded}/{total} capsule(s) installed — re-run `astrid init` to retry the rest.","messagePattern":"Installation incomplete: (.+?)/(.+?) capsule\\(s\\) installed — re-run `astrid init` to retry the rest\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/init.rs","lineNumber":257,"sourceCode":"        eprintln!(\"{}\", Theme::success(\"Installation complete.\"));\n        // Apply capsule grants (opt-in) or print the discoverability hint.\n        // On a grant failure the capsules are already installed and the lock\n        // is written; this returns Err so init exits non-zero with the exact\n        // manual command to finish.\n        let grant_names = grant::completed_grant_names(\n            opts.grant_capsules,\n            &lock.capsules,\n            &newly_installed_names,\n        );\n        grant::apply_or_hint_grants(&operator, &target, &grant_names, opts.grant_capsules).await?;\n        eprintln!(\"  Run {} to start.\", Theme::prompt(\"astrid\"));\n        Ok(())\n    } else {\n        // Partial provision (0 < succeeded < total): no lock was written, so\n        // a re-run retries the rest. Exit NON-ZERO so automation and the\n        // in-conversation flow don't read a partial install as success —\n        // `astrid init` exits 0 IFF the distro is fully provisioned.\n        bail!(\n            \"Installation incomplete: {succeeded}/{total} capsule(s) installed — \\\n             re-run `astrid init` to retry the rest.\"\n        )\n    }\n}\n\n/// Install a distro from a signed, self-contained `.shuttle` archive.\n///\n/// Implemented in [`super::distro::shuttle_install`] (Part C/D): unpack\n/// to a mirror, verify the signature against the trust store, then\n/// install each capsule offline from the mirror.\nasync fn run_init_from_shuttle(source: &str, opts: &InitOpts) -> anyhow::Result<()> {\n    super::distro::shuttle_install::install_from_shuttle(std::path::Path::new(source), opts).await\n}\n\nfn ensure_init_workspace(\n    home: &AstridHome,\n    target: &astrid_core::PrincipalId,","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/init.rs#L239-L275","documentation":"run_init treats a partially provisioned distro (some but not all capsules installed) as a failure and exits non-zero. No Distro.lock is written on partial installs, so re-running `astrid init` retries the remaining capsules. This prevents automation from mistaking a partial install for success.","triggerScenarios":"run_init installs capsules where 0 < succeeded < total — e.g. some capsule installs failed (network errors, bad capsule source) while others succeeded.","commonSituations":"Flaky network or GitHub outage during a multi-capsule install; one capsule's version pinned in the distro no longer exists, while the others install fine.","solutions":["Re-run `astrid init` to retry the capsules that didn't install.","Read the per-capsule errors printed above the message and fix the failing capsule (bad source, missing version, network).","Fix connectivity or pin a resolvable capsule version in the distro, then retry."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"let status = Command::new(\"astrid\").args([\"init\"]).status()?;\nif !status.success() {\n    eprintln!(\"partial install; retrying...\");\n    // re-run astrid init up to N times\n}","preventionTips":["Treat any non-zero exit from `astrid init` as 'not fully provisioned'.","Ensure Distro.lock exists before assuming the install succeeded.","Retry init automatically on failure; it resumes the missing capsules.","Check network/GitHub access before large multi-capsule installs."],"tags":["install","capsules","partial-failure","cli"],"backgroundTag":"incomplete-installation","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"}