astrid-runtime/astrid · error
capsule archive entry '{requested}' is not a regular file
Error message
capsule archive entry '{requested}' is not a regular file What it means
verify_release_manifest parses the fetched release manifest TOML and checks its identity fields: schema_version must be 1, kind 'astrid-release', and product/repository must match the CLI's PRODUCT and REPOSITORY constants. This ensure! fails when the manifest is structurally parseable but is not an astrid release manifest for this product/repo — usually the wrong file was fetched or served.
Source
Thrown at crates/astrid-build/src/artifact.rs:227
pub fn read_archive_text(archive_path: &Path, requested: &str) -> anyhow::Result<String> {
let file = File::open(archive_path)
.with_context(|| format!("failed to open {}", archive_path.display()))?;
let mut archive = tar::Archive::new(GzDecoder::new(file));
let mut found = None;
for entry in archive
.entries()
.context("failed to read capsule archive")?
{
let mut entry = entry.context("failed to read capsule archive entry")?;
let path = normalized_entry_path(&entry)?;
if path != requested {
continue;
}
if found.is_some() {
bail!("capsule archive contains duplicate entry '{requested}'");
}
if !entry.header().entry_type().is_file() {
bail!("capsule archive entry '{requested}' is not a regular file");
}
let mut bytes = Vec::new();
entry.read_to_end(&mut bytes)?;
found =
Some(String::from_utf8(bytes).with_context(|| {
format!("capsule archive entry '{requested}' is not valid UTF-8")
})?);
}
found.with_context(|| format!("capsule archive is missing '{requested}'"))
}
fn read_archive(archive_path: &Path) -> anyhow::Result<(Vec<ContentRecord>, Option<Vec<u8>>)> {
let file = File::open(archive_path)
.with_context(|| format!("failed to open {}", archive_path.display()))?;
read_archive_reader(GzDecoder::new(file))
}
fn read_archive_reader<R: Read>(View on GitHub (pinned to affd8760f4)
Solutions
- Check schema_version, kind, product and repository fields in the fetched manifest and correct the published file to schema_version=1, kind="astrid-release" and the official PRODUCT/REPOSITORY values.
- Purge the CDN/proxy cache or fix the metadata_asset URL so the correct astrid-<version>-release.toml is served.
- Upgrade the CLI if the manifest format was intentionally migrated (schema_version bump) and the publisher no longer emits v1.
Example fix
# before (fork manifest) kind = "astrid-release-fork" repository = "github.com/someone/fork" # after schema_version = 1 kind = "astrid-release" product = "astrid" repository = "acme/astrid"
Defensive patterns
Strategy: validation
Validate before calling
fn manifest_identity_ok(text: &str) -> bool {
text.contains("schema_version = 1")
&& text.contains("kind = \"astrid-release\"")
} Try / catch
match verify_release_manifest(&bytes, &pointer) {
Err(e) if e.to_string().contains("manifest identity is invalid") => eprintln!("wrong manifest fetched; check URL/cache"),
other => other,
} Prevention
- Verify manifest BLAKE3 against the pointer before parsing
- Serve manifests from immutable versioned URLs
- Coordinate schema_version bumps with CLI releases
When it happens
Trigger: resolve_signed_channel (or workflow_identity_and_metadata_digest_are_exact) calls verify_release_manifest with bytes whose parsed ReleaseManifest has schema_version != 1, kind != "astrid-release", product != PRODUCT, or repository != REPOSITORY.
Common situations: CDN/cache serving an older or foreign manifest; a manifest from a fork with a different repository value; schema_version bumped in a newer manifest format that an older CLI fetches; asset path misconfiguration returning an HTML error page that coincidentally parses (rare) or another TOML file.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- capsule archive contains duplicate entry '{path}'
- capsule archive contains unsupported entry '{path}'
- capsule provenance envelope exceeds 64 KiB
- unsupported schema-version {} (expected {SCHEMA_VERSION})
- distro.id '{}' is invalid (must match ^[a-z][a-z0-9-]*$)
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/0a64de43df073edb.
Report an issue: GitHub.