{"record":{"id":"86fddce18f6eee6b","repo":"astrid-runtime/astrid","slug":"kernel-returned-an-unexpected-storage-unmount-resp","errorCode":null,"errorMessage":"kernel returned an unexpected storage unmount response","messagePattern":"kernel returned an unexpected storage unmount response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fskit/src/main.rs","lineNumber":318,"sourceCode":"        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\nasync fn revoke_after_registry_failure(client: &mut AdminClient, mount_id: StorageMountId) {\n    let _ = client\n        .request(AdminRequestKind::StorageMountRevoke { mount_id })\n        .await;\n}\n\nfn with_native_rollback(\n    error: anyhow::Error,\n    rollback: Result<()>,\n) -> Result<StorageProviderSuccessV1> {\n    match rollback {\n        Ok(()) => Err(error),\n        Err(rollback) => Err(error).context(rollback),\n    }\n}","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fskit/src/main.rs#L300-L336","documentation":"unmount_status() only accepts Success(_) or the two recognized Error texts from a StorageMountStatus request; any other AdminResponseBody variant bails here. Like error 601, it signals a response-shape/protocol mismatch, not a refused operation.","triggerScenarios":"unmount() calls unmount_status() on the kernel's reply to StorageMountStatus and the body is neither Success nor Error — e.g. the kernel returned a StorageMountLease payload or another variant after a schema change.","commonSituations":"Version-skewed kernel/provider builds; custom kernel forks returning extra payload variants; corrupted IPC framing that deserializes into an unexpected variant.","solutions":["Rebuild kernel and provider together so the AdminResponseBody schema matches.","Add the newly observed variant to unmount_status() if it is a legitimate response for status requests.","Capture and inspect the raw response to confirm which variant arrived."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"// ensure schema match: kernel and provider built from same source revision","typeGuard":"fn is_status_response(body: &AdminResponseBody) -> bool {\n    matches!(body, AdminResponseBody::Success(_) | AdminResponseBody::Error(_))\n}","tryCatchPattern":"match unmount_status(body) {\n    Err(e) if e.to_string().contains(\"unexpected storage unmount response\") => Err(e),\n    other => other,\n}","preventionTips":["Ship kernel and provider binaries from matched versions.","Test StorageMountStatus round trips in CI for every response variant.","Deserialize responses strictly and log unknown variants at the boundary."],"tags":["protocol-mismatch","unmount","version-skew"],"backgroundTag":"unexpected-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"}