{"record":{"id":"1d60e8724c0a145a","repo":"astrid-runtime/astrid","slug":"runtime-projection-contains-a-special-entry","errorCode":null,"errorMessage":"runtime projection contains a special entry: {}","messagePattern":"runtime projection contains a special entry: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-core/src/dirs_projection_retirement.rs","lineNumber":57,"sourceCode":"}\n\nfn preflight_projection_entry(path: &Path) -> io::Result<()> {\n    let metadata = std::fs::symlink_metadata(path)?;\n    if metadata.file_type().is_symlink() {\n        return Err(io::Error::new(\n            io::ErrorKind::InvalidData,\n            format!(\"runtime projection is redirected: {}\", path.display()),\n        ));\n    }\n    if metadata.is_dir() {\n        for entry in std::fs::read_dir(path)? {\n            let child = entry?.path();\n            preflight_projection_entry(&child)?;\n        }\n        return Ok(());\n    }\n    if !metadata.is_file() {\n        return Err(io::Error::new(\n            io::ErrorKind::InvalidData,\n            format!(\n                \"runtime projection contains a special entry: {}\",\n                path.display()\n            ),\n        ));\n    }\n    Ok(())\n}\n","sourceCodeStart":39,"sourceCodeEnd":67,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-core/src/dirs_projection_retirement.rs#L39-L67","documentation":"preflight_projection_entry only permits regular files and directories in the runtime projection tree; anything else (sockets, fifos, devices) triggers InvalidData naming the path. The preflight exists so retirement removes only well-understood content.","triggerScenarios":"A special file exists in the projection root (at any depth) when retire_projection_root performs its preflight pass.","commonSituations":"A long-running process left a unix socket in the projection dir; dev nodes or fifos appeared via mounted volumes or debug tooling.","solutions":["Stop the process owning the special file and remove it, then retry retirement.","List offenders with: find <projection-root> ! -type f ! -type d and clean each.","Exclude such outputs from the projection directory (configure the producer to place sockets elsewhere)."],"exampleFix":"// before\nprojection/run.sock = unix socket\n// after\nkill <owner-pid>; rm projection/run.sock","handlingStrategy":"validation","validationCode":"fn assert_no_special(root: &Path) -> io::Result<()> {\n    for e in walkdir_like(root) {\n        let m = std::fs::symlink_metadata(&e)?;\n        if !m.is_file() && !m.is_dir() {\n            return Err(io::Error::new(io::ErrorKind::InvalidData, format!(\"special: {}\", e.display())));\n        }\n    }\n    Ok(())\n}","typeGuard":"fn is_plain_entry(p: &Path) -> bool {\n    std::fs::symlink_metadata(p).map(|m| m.is_file() || m.is_dir()).unwrap_or(false)\n}","tryCatchPattern":"match retire_projection_root(&path) {\n    Err(e) if e.to_string().contains(\"special entry\") => { /* stop owner process, delete entry, retry */ }\n    other => other?,\n}","preventionTips":["Point runtime sockets/fifos at a dedicated runtime dir (e.g. /run)","Clean stale sockets after abnormal shutdowns","Scan `find . ! -type f ! -type d` as part of pre-retirement checks"],"tags":["rust","filesystem","special-file"],"backgroundTag":"unexpected-file-type","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"}