{"record":{"id":"351c11531c4d6321","repo":"Hmbown/CodeWhale","slug":"confined-fleet-artifact-i-o-is-unavailable-on-this-platform","errorCode":null,"errorMessage":"Confined Fleet artifact I/O is unavailable on this platform","messagePattern":"Confined Fleet artifact I/O is unavailable on this platform","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/files.rs","lineNumber":506,"sourceCode":"\n    #[test]\n    fn artifact_paths_cannot_name_windows_alternate_data_streams() {\n        for path in [\"receipt.json:private\", \"dir/receipt:private\", \":stream\"] {\n            assert!(\n                !path_is_confined(Path::new(path)),\n                \"accepted stream path {path}\"\n            );\n        }\n    }\n}\n\n#[cfg(all(not(unix), not(windows)))]\n#[derive(Debug)]\npub(crate) struct WorkspaceFile;\n#[cfg(all(not(unix), not(windows)))]\nimpl WorkspaceFile {\n    pub(crate) fn open(_: &Path, _: &Path, _: bool) -> io::Result<Self> {\n        Err(io::Error::new(\n            io::ErrorKind::Unsupported,\n            \"Confined Fleet artifact I/O is unavailable on this platform\",\n        ))\n    }\n    pub(crate) fn sibling(&self, _: &str) -> io::Result<Self> {\n        unreachable!()\n    }\n    pub(crate) fn open_update(&self, _: bool, _: bool) -> io::Result<File> {\n        unreachable!()\n    }\n    pub(crate) fn replace(&self, _: &[u8]) -> io::Result<()> {\n        unreachable!()\n    }\n    pub(crate) fn open_file(&self) -> io::Result<File> {\n        unreachable!()\n    }\n    pub(crate) fn publish(&self, _: &[u8]) -> io::Result<()> {\n        unreachable!()","sourceCodeStart":488,"sourceCodeEnd":524,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/files.rs#L488-L524","documentation":"This error means confined Fleet artifact I/O is only implemented for Unix and Windows; on other targets the WorkspaceFile stub always fails. The library throws it from WorkspaceFile::open on cfg(all(not(unix), not(windows))) builds.","triggerScenarios":"Calling WorkspaceFile::open on a platform that is neither unix nor windows (e.g. wasm, embedded, exotic OS targets).","commonSituations":"Cross-compiling the TUI crate for an unsupported target; running Codewhale inside a wasm host.","solutions":["Run on a supported platform (Linux/macOS or Windows)","Implement WorkspaceFile for the target platform if you own the build","Avoid Fleet artifact features on unsupported targets"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// compile-time guard\n#[cfg(all(not(unix), not(windows)))]\ncompile_error!(\"Fleet artifact I/O requires unix or windows\");","typeGuard":null,"tryCatchPattern":"match WorkspaceFile::open(dir, name, write) {\n    Ok(f) => use_file(f),\n    Err(e) if e.kind() == std::io::ErrorKind::Unsupported => {\n        eprintln!(\"Fleet artifact I/O unsupported on this target\");\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Target only unix or windows for Fleet features","Gate Fleet-dependent functionality behind platform checks at startup"],"tags":["platform","unsupported","fleet"],"backgroundTag":"unsupported-platform","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}