pub fn resolve_context_provider<'a>(
catalog: &'a [RegisteredContextProviderDescriptor],
requested: Option<&ContextProviderId>,
) -> Result<&'a RegisteredContextProviderDescriptor, ContextProviderLookupError>Expand description
Resolve one context-provider request against the loaded catalog.
EXACT-SCOPE, FAIL-CLOSED matching — the same discipline as
super::lifecycle::validate_manifest_deferred and
crate::orchestration::validate_user_authorizable_model: no partial,
prefix, or fuzzy matches, and no arbitrary tie-breaking.
requested = Some(id)— Ok iff EXACTLY ONE catalog entry declares that exact local id; zero matches failNotRegistered, two or more (the same id declared by multiple installed extensions) failAmbiguous.requested = None— the request names no explicit provider: Ok iff the whole catalog holds EXACTLY ONE descriptor; an empty catalog failsNotRegisteredand overlapping declarations failAmbiguous.
Pure slice read: never spawns, never touches lease state.