Skip to content

design(architecture): unify the 3 credential-gated registries behind a shared base #11664

Closed

Description

@mrveiss

Observation (session closure audit — LARGER refactor, needs design/owner sign-off before implementing)

Three subsystems independently implement the same 'singleton registry + credential-gated default population + resolve' pattern:

  • integrations/capability_registry.py (MESSAGING/TTS/STT; _populate_default_providers + _register_X_if_available)
  • agent_loop/search/registry.py (Brave/SearXNG credential-gated fallback chain)
  • llm_shared/provider_registry.py (12+ LLM providers, credential-gated auto-registration)

Each re-derives: lazy singleton, try/except-per-provider gating, resolve/get, 'never raise on missing'. A shared CredentialGatedRegistry base (or mixin) would remove the triplicated registration/gating logic and give one consistent 'resolve returns [] on absent' contract.

Why filed, not done

Cross-subsystem refactor with real blast radius (touches LLM routing, search, integrations) — per Rule 6 this is ASK-before-large-refactor territory. Filing to track; needs a short design note + owner go-ahead. Also minor: capability names (MESSAGING/TTS/STT) are loose string constants — a Capability(str, Enum) could fold in here.

Not urgent

No bug; purely consolidation/maintainability.

Activity

  1. github-actions commented on Jul 15, 2026

    @github-actions
    Contributor

    PR #11752 (merged to Dev_new_gui) references this issue with a close keyword.

    refactor(registries): unify credential-gated registries behind shared base (#11664)

    If this issue is fully resolved, close it manually. If work remains, no action is needed.

  2. mrveiss commented on Jul 15, 2026

    @mrveiss
    OwnerAuthor

    Closed — merged to Dev_new_gui. Commit: 4f4674c (PR #11752). CredentialGatedRegistry base in root autobot_shared (built on lazy_singleton, standard reset seams); capability/search/provider registries subclass it with public APIs preserved (probed: Capability str-enum interop, #11665 degraded warning still fires, _providers direct-access consumers intact). One deliberate unification: provider populate failures now never-raise (the issue's requested contract). Evidence: 88+344+64+39 tests passed; independent 46. Discoveries: none.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions