{"record":{"id":"9bcf4bf7677efc7a","repo":"Hmbown/CodeWhale","slug":"built-in-plugin-path-may-not-be-a-symbolic-link-or-reparse","errorCode":null,"errorMessage":"built-in plugin path may not be a symbolic link or reparse point: {}","messagePattern":"built-in plugin path may not be a symbolic link or reparse point: (.+?)","errorType":"validation","errorClass":"io::Error (InvalidInput)","httpStatus":null,"severity":"error","filePath":"crates/tui/src/plugins/builtin.rs","lineNumber":402,"sourceCode":"            MOVEFILE_WRITE_THROUGH,\n        )\n    }\n    .map_err(|_| io::Error::last_os_error())\n}\n\n#[cfg(not(any(target_os = \"macos\", target_os = \"linux\", windows)))]\nfn publish_snapshot(_source: &Path, _destination: &Path) -> io::Result<()> {\n    Err(io::Error::new(\n        io::ErrorKind::Unsupported,\n        \"atomic built-in snapshot publication is unsupported on this platform\",\n    ))\n}\n\n/// Refuse to write through a symbolic link or reparse point, the same rule\n/// [`super::discovery`] applies when it scans a plugin root.\nfn reject_symlink(path: &Path) -> io::Result<()> {\n    match fs::symlink_metadata(path) {\n        Ok(metadata) if metadata_is_link_or_reparse(&metadata) => Err(io::Error::new(\n            io::ErrorKind::InvalidInput,\n            format!(\n                \"built-in plugin path may not be a symbolic link or reparse point: {}\",\n                path.display()\n            ),\n        )),\n        Ok(_) => Ok(()),\n        Err(error) if error.kind() == io::ErrorKind::NotFound => Ok(()),\n        Err(error) => Err(error),\n    }\n}\n\n#[cfg(test)]\n#[path = \"builtin_tests.rs\"]\nmod snapshot_tests;\n\n#[cfg(test)]\nmod tests {","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/crates/tui/src/plugins/builtin.rs#L384-L420","documentation":"Generic guard reject_symlink in the built-in plugin writer, called by materialize_at_home and write_bundle. It symlinks-checks (symlink_metadata/reparse detection) any path it is about to create or write and refuses symbolic links or reparse points, mirroring the rule super::discovery applies when scanning a plugin root. Fires when something in the built-in plugin destination (e.g. ~/.local share plugin dir or a bundle path) is a link, which would redirect plugin writes outside the managed root; the path is shown in the message.","triggerScenarios":"Thrown at crates/tui/src/plugins/builtin.rs:402 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the symlink/reparse point so the bundle can be materialized as real files","Reinstall or repair the built-in plugin to recreate genuine directories","Ensure installers and sync tools do not place junctions in the plugin root"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-22T11:17:16.035Z"}