{"record":{"id":"b9b43be441dd6792","repo":"astrid-runtime/astrid","slug":"capsule-content-contains-a-special-file","errorCode":null,"errorMessage":"capsule content contains a special file: {}","messagePattern":"capsule content contains a special file: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-build/src/artifact.rs","lineNumber":490,"sourceCode":"            let metadata = std::fs::metadata(&resolved)?;\n            if !metadata.is_file() {\n                bail!(\n                    \"capsule content cannot contain a directory symlink: {}\",\n                    path.display()\n                );\n            }\n            let relative = path.strip_prefix(root)?;\n            let normalized = normalize_relative_path(relative)?;\n            let mut file = File::open(&resolved)?;\n            records.push(hash_reader(normalized, metadata.len(), &mut file)?);\n            continue;\n        }\n        if file_type.is_dir() {\n            collect_directory_records(root, canonical_root, &path, records, envelope)?;\n            continue;\n        }\n        if !file_type.is_file() {\n            bail!(\n                \"capsule content contains a special file: {}\",\n                path.display()\n            );\n        }\n        let relative = path.strip_prefix(root)?;\n        let normalized = normalize_relative_path(relative)?;\n        if normalized == PROVENANCE_FILE {\n            if envelope.is_some() {\n                bail!(\"capsule directory contains duplicate provenance\");\n            }\n            *envelope = Some(std::fs::read(&path)?);\n            continue;\n        }\n        let mut file = File::open(&path)?;\n        let size = file.metadata()?.len();\n        records.push(hash_reader(normalized, size, &mut file)?);\n    }\n    Ok(())","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-build/src/artifact.rs#L472-L508","documentation":"Fired by collect_directory_records when the capsule tree contains a file system entry that is not a regular file, directory, or allowed symlink (e.g. FIFO, socket, device node). Such entries cannot be hashed or verified.","triggerScenarios":"Thrown at crates/astrid-build/src/artifact.rs:490 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the special file (FIFO/socket/device) from the capsule content directory","Rebuild the capsule from a clean source tree","Exclude non-regular files from packaging"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}