{"record":{"id":"01c1aa096cf5f8b7","repo":"Hmbown/CodeWhale","slug":"plugin-file-is-a-reparse-point-hard-link-or-non","errorCode":null,"errorMessage":"plugin file is a reparse point, hard link, or non-regular file","messagePattern":"plugin file is a reparse point, hard link, or non-regular file","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/plugins/manifest.rs","lineNumber":1546,"sourceCode":"}\n\n#[cfg(windows)]\npub(crate) fn open_bundle_file(path: &Path) -> std::io::Result<fs::File> {\n    use std::os::windows::fs::OpenOptionsExt as _;\n\n    const FILE_ATTRIBUTE_REPARSE_POINT: u32 = 0x0000_0400;\n    let file = fs::OpenOptions::new()\n        .read(true)\n        .share_mode(0x0000_0001) // deny concurrent writes and replacement\n        .custom_flags(0x0020_0000) // FILE_FLAG_OPEN_REPARSE_POINT\n        .open(path)?;\n    let metadata = file.metadata()?;\n    let identity = windows_file_identity(&file)?;\n    if !metadata.is_file()\n        || identity.attributes & FILE_ATTRIBUTE_REPARSE_POINT != 0\n        || identity.links != 1\n    {\n        return Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidData,\n            \"plugin file is a reparse point, hard link, or non-regular file\",\n        ));\n    }\n    Ok(file)\n}\n\n#[cfg(all(not(unix), not(windows)))]\npub(crate) fn open_bundle_file(path: &Path) -> std::io::Result<fs::File> {\n    fs::File::open(path)\n}\n\n#[cfg(windows)]\nfn open_bundle_directory(path: &Path) -> std::io::Result<fs::File> {\n    use std::os::windows::fs::OpenOptionsExt as _;\n\n    const FILE_ATTRIBUTE_REPARSE_POINT: u32 = 0x0000_0400;\n    let file = fs::OpenOptions::new()","sourceCodeStart":1528,"sourceCodeEnd":1564,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/plugins/manifest.rs#L1528-L1564","documentation":"Hardening guard in open_bundle_file (Windows): the opened bundle file failed the regular-file check — it has the reparse-point attribute, has multiple hard links, or is not a regular file. Plugin bundles must be plain, singly-linked files to prevent link-based substitution.","triggerScenarios":"Thrown at crates/tui/src/plugins/manifest.rs:1546 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace the symlink/hard-linked plugin path with the real regular file.","Re-install the plugin so the bundle is materialized as a normal file in the plugin directory.","Check the plugin directory for junctions or externally linked content."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}