{"record":{"id":"983d544f8c295b7e","repo":"astrid-runtime/astrid","slug":"fskit-callback-probe-failed-code-message","errorCode":null,"errorMessage":"FSKit callback probe failed [{code}]: {message}","messagePattern":"FSKit callback probe failed \\[(.+?)\\]: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fskit/src/service.rs","lineNumber":237,"sourceCode":"        request_id: format!(\"fskit-service-{}\", launch.lease.mount_id),\n        lease_token: launch.lease.lease_token.clone(),\n        operation: StorageFilesystemOperationV2::Stat {\n            path: String::new(),\n        },\n    };\n    let bytes = serde_json::to_vec(&request).context(\"encode FSKit callback probe\")?;\n    let length = u32::try_from(bytes.len()).context(\"FSKit callback probe is too large\")?;\n    stream.write_all(&length.to_be_bytes()).await?;\n    stream.write_all(&bytes).await?;\n    stream.flush().await?;\n    let response = read_callback_response(&mut stream).await?;\n    if response.request_id != request.request_id {\n        bail!(\"FSKit callback probe correlation mismatch\");\n    }\n    match response.outcome {\n        StorageFilesystemOutcomeV2::Success(_) => Ok(()),\n        StorageFilesystemOutcomeV2::Failure(StorageFilesystemFailureV1 { code, message }) => {\n            bail!(\"FSKit callback probe failed [{code}]: {message}\")\n        },\n    }\n}\n\nasync fn read_callback_response(stream: &mut LocalStream) -> Result<StorageFilesystemResponseV2> {\n    let mut length = [0_u8; 4];\n    stream.read_exact(&mut length).await?;\n    let length = u32::from_be_bytes(length) as usize;\n    if length == 0 || length > MAX_CALLBACK_BYTES {\n        bail!(\"FSKit callback response exceeds the bounded frame size\");\n    }\n    let mut bytes = vec![0_u8; length];\n    stream.read_exact(&mut bytes).await?;\n    let response: StorageFilesystemResponseV2 =\n        serde_json::from_slice(&bytes).context(\"decode FSKit callback probe\")?;\n    if response.protocol_version != STORAGE_FILESYSTEM_PROTOCOL_V2 {\n        bail!(\"FSKit callback probe protocol mismatch\");\n    }","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fskit/src/service.rs#L219-L255","documentation":"After verifying correlation, probe_callback inspects the FSKit responder's outcome. If the extension reported a Failure (StorageFilesystemFailureV1), the provider surfaces its code and message wrapped in this error. This is the propagation path for a callback probe that the FSKit side explicitly rejected.","triggerScenarios":"probe_callback (called from run) receives StorageFilesystemOutcomeV2::Failure{code,message} for a probe whose request_id matched — the FSKit extension's callback handler returned a failure code for the probed operation.","commonSituations":"The extension doesn't support the probed callback method; the extension hit an internal error (e.g. missing mount metadata); a version skew where the extension expects different probe payloads.","solutions":["Read the embedded [code] and message in the error text to identify the extension-side failure and fix the root cause there","Confirm the extension supports the probe operation and protocol V2 payloads","Upgrade the FSKit extension/provider so both sides agree on the callback contract","Re-run the probe after fixing; if persistent, capture extension logs alongside the code"],"exampleFix":"// on the extension side\n// before\nreturn .failure(code: .unsupported, message: \"\")\n// after\nreturn .success(StorageFilesystemSuccessV1(...))","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = probe_callback(&req).await { if let Some((code, msg)) = parse_probe_failure(&e) { log::error!(\"extension failure {code}: {msg}\"); handle_extension_failure(code); } }","preventionTips":["Surface the embedded code/message instead of only the wrapper error","Keep provider and extension versions aligned","Test the extension's callback handlers against the current probe payloads","Monitor failure codes for recurring extension-side issues"],"tags":["ipc","protocol","remote-error"],"backgroundTag":"api-error-response","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}