{"record":{"id":"b9c41babc83829f6","repo":"astrid-runtime/astrid","slug":"kernel-returned-an-unexpected-storage-lifecycle-re-b9c41b","errorCode":null,"errorMessage":"kernel returned an unexpected storage lifecycle response","messagePattern":"kernel returned an unexpected storage lifecycle response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-winfsp/src/main.rs","lineNumber":317,"sourceCode":"        mount_id: record.mount_id,\n    })\n}\n\nfn lease_from_response(body: AdminResponseBody) -> Result<StorageMountLeaseV1> {\n    match body {\n        AdminResponseBody::StorageMountLease(lease) => Ok(*lease),\n        AdminResponseBody::Error(error) => bail!(\"kernel refused storage mount: {error}\"),\n        _ => bail!(\"kernel returned an unexpected storage mount response\"),\n    }\n}\n\nfn into_success(body: AdminResponseBody) -> Result<serde_json::Value> {\n    match body {\n        AdminResponseBody::Success(value) => Ok(value),\n        AdminResponseBody::Error(error) => {\n            bail!(\"kernel refused storage lifecycle request: {error}\")\n        },\n        _ => bail!(\"kernel returned an unexpected storage lifecycle response\"),\n    }\n}\n\nfn unmount_status(body: AdminResponseBody) -> Result<bool> {\n    match body {\n        AdminResponseBody::Success(_) => Ok(true),\n        AdminResponseBody::Error(error)\n            if error.contains(\"was not found\") || error.contains(\"expired or revoked\") =>\n        {\n            Ok(false)\n        },\n        AdminResponseBody::Error(error) => {\n            bail!(\"kernel refused storage unmount authorization: {error}\")\n        },\n        _ => bail!(\"kernel returned an unexpected storage unmount response\"),\n    }\n}\n","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-winfsp/src/main.rs#L299-L335","documentation":"Thrown by `into_success` when the kernel's reply to a storage lifecycle request is neither `Success` nor `Error`. Like its mount counterpart, it indicates the provider received an unrecognized response variant and cannot interpret the outcome of the operation, so it fails fast rather than guessing success.","triggerScenarios":"`execute` or `unmount` issue a lifecycle admin request and the kernel answers with any `AdminResponseBody` variant other than `Success` or `Error` (e.g. a `StorageMountLease` payload or an unknown new variant).","commonSituations":"Kernel/provider version skew where the endpoint now returns a richer response type; calling a lifecycle endpoint that returns operation-specific payloads rather than generic success; misrouted requests hitting the mount-lease endpoint instead of the generic lifecycle one.","solutions":["Align provider and kernel versions so the expected `AdminResponseBody` variants match","Inspect kernel logs/protocol traces to identify which response variant was actually returned","Update the provider's match arms to deserialize the new response variant"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn is_interpretable(body: &AdminResponseBody) -> bool {\n    matches!(body, AdminResponseBody::Success(_) | AdminResponseBody::Error(_))\n}","tryCatchPattern":"match provider.execute(action).await {\n    Ok(value) => handle(value),\n    Err(e) if e.to_string().contains(\"unexpected storage lifecycle response\") => {\n        // treat as version-skew incident: alert and skip state mutation\n    },\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Keep provider and kernel builds in lockstep","Test lifecycle flows against every kernel release before rollout","Handle unknown AdminResponseBody variants explicitly in downstream tooling"],"tags":["ipc","protocol-mismatch","storage","winfsp"],"backgroundTag":"unexpected-api-response-shape","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"}