{"record":{"id":"28ec79c4df508364","repo":"astrid-runtime/astrid","slug":"release-resolved-ref-of-org-repo-ships-no-c","errorCode":null,"errorMessage":"release {resolved_ref} of {org}/{repo} ships no .capsule asset","messagePattern":"release (.+?) of (.+?)/(.+?) ships no \\.capsule asset","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/capsule/install.rs","lineNumber":375,"sourceCode":"                            .expect(\"non-empty candidates always select an index\");\n                        let (name, download_url) = &candidates[idx];\n                        let id = download_and_unpack(&client, name, download_url, context).await?;\n                        vec![id]\n                    },\n                    // Manual install with no `--capsule`: install EVERY capsule\n                    // the release ships. Best-effort — report which assets fail\n                    // but keep going, then fail if any did.\n                    None => install_all_capsules(&client, &candidates, context).await?,\n                };\n                return Ok((ids, Some(resolved_ref)));\n            }\n\n            // The ref resolved, but the release ships no `.capsule` asset. A\n            // pin must NOT silently fall through to building HEAD — fail with\n            // the real, actionable cause. Unpinned, fall through to\n            // clone-and-build.\n            if pinned {\n                bail!(\"release {resolved_ref} of {org}/{repo} ships no .capsule asset\");\n            }\n        },\n        // A pinned ref that could not be resolved is a hard error: surface\n        // the real cause (a bad version/tag, a network failure) and never\n        // build HEAD for a pin.\n        Err(e) if pinned => {\n            return Err(e).context(format!(\n                \"failed to resolve pinned version/tag for {org}/{repo}\"\n            ));\n        },\n        // Unpinned resolution failure (e.g. no `latest` release): fall\n        // through to clone-and-build.\n        Err(_) => {},\n    }\n\n    // Priority 2: clone + build from source via astrid-build — reached only\n    // when nothing was pinned (a pin would have bailed above).\n    let id = clone_and_build(url, repo, name_hint, context).await?;","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/capsule/install.rs#L357-L393","documentation":"When installing a capsule from a GitHub release with a pinned ref, the code first tries to download a prebuilt `.capsule` asset. If the ref resolved but the release ships no such asset, and the ref was pinned, it deliberately fails instead of silently falling back to building from HEAD — a pin must give you exactly that release, so the error is surfaced as actionable.","triggerScenarios":"`install_from_github` with a pinned `org/repo@ref` where the GitHub release exists but has no attached asset ending in `.capsule` (unpinned installs fall through to clone-and-build instead of erroring).","commonSituations":"Pinning a tag whose release was cut without the CI-generated `.capsule` artifact; CI asset upload failing or renamed; older releases predating the asset packaging step; pinning a source-only release.","solutions":["Check the release page for `org/repo` at `resolved_ref` — if assets were lost, re-run the release CI or upload the `.capsule` manually.","Pin a different tag/ref that does ship a `.capsule` asset.","If you accept building from source, install unpinned (or from the repo) instead of a pinned ref.","Verify the project's release workflow still uploads `*.capsule` assets."],"exampleFix":"// before\nastrid capsule install gh:org/repo@v0.1.0   // release has no .capsule asset\n// after\nastrid capsule install gh:org/repo@v0.2.0   // pin a release that ships the asset","handlingStrategy":"validation","validationCode":"// check the release ships a .capsule asset before pinning an install\n// curl -s https://api.github.com/repos/ORG/REPO/releases/tags/TAG \\\n//   | jq -e '.assets[] | select(.name | endswith(\".capsule\"))' >/dev/null \\\n//   || echo \"refusing to pin: no .capsule asset on this release\"","typeGuard":null,"tryCatchPattern":"match install_from_github(pin) {\n    Err(e) if e.to_string().contains(\"ships no .capsule asset\") => {\n        eprintln!(\"Pinned release has no prebuilt capsule.\");\n        eprintln!(\"Pick another tag or install unpinned to build from source.\");\n    }\n    other => other.expect(\"install failed\"),\n}","preventionTips":["Before pinning, verify the release page lists a *.capsule asset.","Ensure the project's release CI uploads the .capsule artifact for every tag.","Prefer recent tags — older releases may predate asset packaging.","Decide explicitly between pinned prebuilt vs unpinned source builds; never assume silent fallback."],"tags":["github","release-assets","install","pinned-ref"],"backgroundTag":"resource-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"}