{"record":{"id":"a347283c55b95bb1","repo":"astrid-runtime/astrid","slug":"unsupported-storage-filesystem-protocol","errorCode":null,"errorMessage":"unsupported storage filesystem protocol","messagePattern":"unsupported storage filesystem protocol","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-kernel/src/storage_mount.rs","lineNumber":607,"sourceCode":"        let operation = decode_operation_v2(request.operation)?;\n        Ok(Some(CallbackRequest {\n            request: StorageFilesystemRequestV1 {\n                protocol_version: STORAGE_FILESYSTEM_PROTOCOL_V1,\n                request_id: request.request_id,\n                lease_token: request.lease_token,\n                operation,\n            },\n            response_version: STORAGE_FILESYSTEM_PROTOCOL_V2,\n        }))\n    } else if protocol == STORAGE_FILESYSTEM_PROTOCOL_V1 {\n        let request = serde_json::from_slice::<StorageFilesystemRequestV1>(&bytes)\n            .map_err(io::Error::other)?;\n        Ok(Some(CallbackRequest {\n            request,\n            response_version: STORAGE_FILESYSTEM_PROTOCOL_V1,\n        }))\n    } else {\n        Err(io::Error::new(\n            io::ErrorKind::InvalidData,\n            \"unsupported storage filesystem protocol\",\n        ))\n    }\n}\n\nfn decode_operation_v2(\n    operation: StorageFilesystemOperationV2,\n) -> io::Result<StorageFilesystemOperationV1> {\n    Ok(match operation {\n        StorageFilesystemOperationV2::VolumeInfo => StorageFilesystemOperationV1::VolumeInfo,\n        StorageFilesystemOperationV2::Stat { path } => StorageFilesystemOperationV1::Stat { path },\n        StorageFilesystemOperationV2::ReadDirectory { path } => {\n            StorageFilesystemOperationV1::ReadDirectory { path }\n        },\n        StorageFilesystemOperationV2::Read {\n            path,\n            offset,","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-kernel/src/storage_mount.rs#L589-L625","documentation":"The kernel's storage-mount callback handshake reads a request from the mount provider and checks that it advertises STORAGE_FILESYSTEM_PROTOCOL_V1. Any request framed with a different (or unrecognized) protocol version byte is rejected as InvalidData with this message. It exists so the kernel never misparses frames from an incompatible provider build.","triggerScenarios":"A storage provider (e.g. an old or third-party FUSE provider) connects to the kernel's callback socket but writes a handshake whose protocol version is not STORAGE_FILESYSTEM_PROTOCOL_V1; read_request, called from handle_connection, fails immediately before any operation is decoded.","commonSituations":"Version skew: kernel and storage-provider binaries built from different commits; a hand-rolled client poking the callback socket; a provider upgraded to a newer protocol the kernel does not know.","solutions":["Rebuild/reinstall the storage provider and kernel from the same version so both speak STORAGE_FILESYSTEM_PROTOCOL_V1","Check the provider's protocol constant and align it with STORAGE_FILESYSTEM_PROTOCOL_V1 in the kernel","Inspect the bytes the provider writes on connect and fix the client's framing/version field","If you intentionally added a protocol version, add explicit support for it in read_request instead of falling through to the else branch"],"exampleFix":"// before (provider)\nstream.write_all(&[0x02, version_byte]).await?;\n// after\nstream.write_all(&STORAGE_FILESYSTEM_PROTOCOL_V1).await?;","handlingStrategy":"validation","validationCode":"fn is_supported_protocol(version: &[u8]) -> bool {\n    version == STORAGE_FILESYSTEM_PROTOCOL_V1\n}\n// call before sending/accepting a callback request\nassert!(is_supported_protocol(&handshake_bytes), \"provider must speak STORAGE_FILESYSTEM_PROTOCOL_V1\");","typeGuard":"fn as_supported_version(v: u8) -> Option<u8> {\n    (v == STORAGE_FILESYSTEM_PROTOCOL_V1[0]).then_some(v)\n}","tryCatchPattern":"match kernel.connect_mount(provider) {\n    Ok(mount) => mount,\n    Err(e) if e.to_string().contains(\"unsupported storage filesystem protocol\") => {\n        eprintln!(\"provider/kernel version mismatch: rebuild both from the same release\");\n        std::process::exit(1);\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Pin kernel and storage-provider to the same release version","Add a startup version handshake check on the provider side too","Log the advertised protocol version on both ends at connection time"],"tags":["protocol","ipc","version-mismatch"],"backgroundTag":"unsupported-operation","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}