astrid-runtime/astrid · error

{provider_name} does not advertise required capability {capa

Error message

{provider_name} does not advertise required capability {capability:?}

What it means

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.

Source

Thrown at crates/astrid-cli/src/commands/storage.rs:236

            STORAGE_PROVIDER_PROTOCOL_V1,
            response.protocol_version
        );
    }
    if response.request_id != request.request_id {
        bail!("{provider_name} returned a response for a different request");
    }
    if response.provider.name != provider_name
        || response.provider.version.is_empty()
        || response.provider.version.len() > 128
        || response.provider.version.chars().any(char::is_control)
        || response.provider.capabilities.len() > 16
        || !capabilities_are_unique(&response.provider.capabilities)
    {
        bail!("native provider identity does not match the co-installed executable");
    }
    for capability in required_capabilities {
        if !response.provider.capabilities.contains(capability) {
            bail!("{provider_name} does not advertise required capability {capability:?}");
        }
    }
    let operation_matches = matches!(
        (&request.operation, &response.outcome),
        (
            StorageProviderOperationV1::Mount { .. },
            StorageProviderOutcomeV1::Success(StorageProviderSuccessV1::Mounted { .. })
        ) | (
            StorageProviderOperationV1::Sync { .. },
            StorageProviderOutcomeV1::Success(StorageProviderSuccessV1::Synced { .. })
        ) | (
            StorageProviderOperationV1::Status { .. },
            StorageProviderOutcomeV1::Success(StorageProviderSuccessV1::Status { .. })
        ) | (
            StorageProviderOperationV1::Unmount { .. },
            StorageProviderOutcomeV1::Success(StorageProviderSuccessV1::Unmounted { .. })
        ) | (_, StorageProviderOutcomeV1::Failure(_))
    );

View on GitHub (pinned to affd8760f4)

Solutions

  1. Rebuild/install a provider build that supports and advertises the required capabilities
  2. Compare the exact capability strings expected by the CLI with those advertised (case, spelling) and align them
  3. Check the provider's feature flags/build configuration to ensure the capability is compiled in
  4. Gate the CLI operation on capability discovery first and surface a clear 'unsupported' message before invoking

Example fix

// before (provider)
capabilities: vec!["unmount".into()],
// after
capabilities: vec!["mount".into(), "unmount".into(), "status".into()],
Defensive patterns

Strategy: validation

Validate before calling

fn supports(caps: &[String], required: &[&str]) -> bool { required.iter().all(|r| caps.contains(&r.to_string())) }

Type guard

fn advertises(p: &StorageProviderIdentityV1, cap: &str) -> bool { p.capabilities.iter().any(|c| c == cap) }

Try / catch

if !supports(&resp.provider.capabilities, &required) {
    eprintln!("provider lacks required capability; update the provider build");
    return Ok(ExitCode::FAILURE);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/2f486922c1981ea6. Report an issue: GitHub.