{"record":{"id":"0a64de43df073edb","repo":"astrid-runtime/astrid","slug":"capsule-archive-entry-requested-is-not-a-regul","errorCode":null,"errorMessage":"capsule archive entry '{requested}' is not a regular file","messagePattern":"capsule archive entry '(.+?)' is not a regular file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-build/src/artifact.rs","lineNumber":227,"sourceCode":"pub fn read_archive_text(archive_path: &Path, requested: &str) -> anyhow::Result<String> {\n    let file = File::open(archive_path)\n        .with_context(|| format!(\"failed to open {}\", archive_path.display()))?;\n    let mut archive = tar::Archive::new(GzDecoder::new(file));\n    let mut found = None;\n    for entry in archive\n        .entries()\n        .context(\"failed to read capsule archive\")?\n    {\n        let mut entry = entry.context(\"failed to read capsule archive entry\")?;\n        let path = normalized_entry_path(&entry)?;\n        if path != requested {\n            continue;\n        }\n        if found.is_some() {\n            bail!(\"capsule archive contains duplicate entry '{requested}'\");\n        }\n        if !entry.header().entry_type().is_file() {\n            bail!(\"capsule archive entry '{requested}' is not a regular file\");\n        }\n        let mut bytes = Vec::new();\n        entry.read_to_end(&mut bytes)?;\n        found =\n            Some(String::from_utf8(bytes).with_context(|| {\n                format!(\"capsule archive entry '{requested}' is not valid UTF-8\")\n            })?);\n    }\n    found.with_context(|| format!(\"capsule archive is missing '{requested}'\"))\n}\n\nfn read_archive(archive_path: &Path) -> anyhow::Result<(Vec<ContentRecord>, Option<Vec<u8>>)> {\n    let file = File::open(archive_path)\n        .with_context(|| format!(\"failed to open {}\", archive_path.display()))?;\n    read_archive_reader(GzDecoder::new(file))\n}\n\nfn read_archive_reader<R: Read>(","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-build/src/artifact.rs#L209-L245","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before (fork manifest)\nkind = \"astrid-release-fork\"\nrepository = \"github.com/someone/fork\"\n# after\nschema_version = 1\nkind = \"astrid-release\"\nproduct = \"astrid\"\nrepository = \"acme/astrid\"","handlingStrategy":"validation","validationCode":"fn manifest_identity_ok(text: &str) -> bool {\n    text.contains(\"schema_version = 1\")\n        && text.contains(\"kind = \\\"astrid-release\\\"\")\n}","typeGuard":null,"tryCatchPattern":"match verify_release_manifest(&bytes, &pointer) {\n    Err(e) if e.to_string().contains(\"manifest identity is invalid\") => eprintln!(\"wrong manifest fetched; check URL/cache\"),\n    other => other,\n}","preventionTips":["Verify manifest BLAKE3 against the pointer before parsing","Serve manifests from immutable versioned URLs","Coordinate schema_version bumps with CLI releases"],"tags":["manifest","validation","toml"],"backgroundTag":"schema-validation-failed","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"}