Skip to content

feat(api): a generated API registry — every route with purpose, owner, auth and callers, checked against the code in CI #18719

Open

Description

@mrveiss

Owner question 2026-10-17: "do we have an API registry with what it is for?" No, not one that can be trusted (external report, umbrella #18717; spot-checked here):

  • api/registry.py + registry_catalog.py (/api/registry/*): hand-written, 31 router entries for ~350 mounted modules; auth flags wrong for most; never read by the loader.
  • api/developer.py RuntimeEndpointRegistry (/api/developer/endpoints): register_router() is never called, so it's always empty (unwired; finish or retire with approval).
  • The router registry that actually runs (initialization/router_registry/*_routers.py) has no per-route data. The SLM has no registry (53 direct includes).
  • Generated OpenAPI (both api.ts, CI-checked) is the only complete catalogue, but it drops a double mount and records no owner, auth or callers.
  • docs/api/*.md: the report says 139 of 198 documented paths no longer exist.

Direction

Generate the registry from code, building on autobot_shared/api_routing/{mount_graph,router_prefixes,router_routes}.py (the static resolver the parity tests already use): per route its method, path, app, file:line, handler, registration order, auth class, purpose (docstring or summary), owning module and callers. Commit it as a generated artefact with a drift check, and have the duplicate/shadow guards read it.

Acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions