{"record":{"id":"2f486922c1981ea6","repo":"astrid-runtime/astrid","slug":"provider-name-does-not-advertise-required-capabi","errorCode":null,"errorMessage":"{provider_name} does not advertise required capability {capability:?}","messagePattern":"(.+?) does not advertise required capability (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/storage.rs","lineNumber":236,"sourceCode":"            STORAGE_PROVIDER_PROTOCOL_V1,\n            response.protocol_version\n        );\n    }\n    if response.request_id != request.request_id {\n        bail!(\"{provider_name} returned a response for a different request\");\n    }\n    if response.provider.name != provider_name\n        || response.provider.version.is_empty()\n        || response.provider.version.len() > 128\n        || response.provider.version.chars().any(char::is_control)\n        || response.provider.capabilities.len() > 16\n        || !capabilities_are_unique(&response.provider.capabilities)\n    {\n        bail!(\"native provider identity does not match the co-installed executable\");\n    }\n    for capability in required_capabilities {\n        if !response.provider.capabilities.contains(capability) {\n            bail!(\"{provider_name} does not advertise required capability {capability:?}\");\n        }\n    }\n    let operation_matches = matches!(\n        (&request.operation, &response.outcome),\n        (\n            StorageProviderOperationV1::Mount { .. },\n            StorageProviderOutcomeV1::Success(StorageProviderSuccessV1::Mounted { .. })\n        ) | (\n            StorageProviderOperationV1::Sync { .. },\n            StorageProviderOutcomeV1::Success(StorageProviderSuccessV1::Synced { .. })\n        ) | (\n            StorageProviderOperationV1::Status { .. },\n            StorageProviderOutcomeV1::Success(StorageProviderSuccessV1::Status { .. })\n        ) | (\n            StorageProviderOperationV1::Unmount { .. },\n            StorageProviderOutcomeV1::Success(StorageProviderSuccessV1::Unmounted { .. })\n        ) | (_, StorageProviderOutcomeV1::Failure(_))\n    );","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/storage.rs#L218-L254","documentation":"validate_response checks that the provider's advertised capability list contains every capability the operation requires. If a required capability is missing from response.provider.capabilities, the CLI bails because the provider has told us it cannot perform (parts of) the requested work.","triggerScenarios":"A request carrying required_capabilities (e.g. [\"mount\"]) gets a response whose provider.capabilities array omits one of those strings — checked in the for-loop in validate_response.","commonSituations":"The provider was built with a feature disabled so it no longer advertises a capability; provider version drift after an update silently dropped a capability; the CLI passes capabilities in a different spelling/case than the provider advertises.","solutions":["Rebuild/install a provider build that supports and advertises the required capabilities","Compare the exact capability strings expected by the CLI with those advertised (case, spelling) and align them","Check the provider's feature flags/build configuration to ensure the capability is compiled in","Gate the CLI operation on capability discovery first and surface a clear 'unsupported' message before invoking"],"exampleFix":"// before (provider)\ncapabilities: vec![\"unmount\".into()],\n// after\ncapabilities: vec![\"mount\".into(), \"unmount\".into(), \"status\".into()],","handlingStrategy":"validation","validationCode":"fn supports(caps: &[String], required: &[&str]) -> bool { required.iter().all(|r| caps.contains(&r.to_string())) }","typeGuard":"fn advertises(p: &StorageProviderIdentityV1, cap: &str) -> bool { p.capabilities.iter().any(|c| c == cap) }","tryCatchPattern":"if !supports(&resp.provider.capabilities, &required) {\n    eprintln!(\"provider lacks required capability; update the provider build\");\n    return Ok(ExitCode::FAILURE);\n}","preventionTips":["Publish a capability-discovery step before issuing operations","Keep capability string spellings in a shared constants module","Enable the corresponding provider feature flags at build time"],"tags":["ipc","capability-negotiation","native-provider"],"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"}