Skip to content

Admin Decomposition: Consolidate 18 handler modules into 2 generic handlers (Phase A) #85

@intel352

Description

@intel352

Overview

The admin config has 18 intermediate api.query/api.command module definitions (9 domain pairs) that each delegate to a Go service. Consolidate to just 2 generic handlers.

Reference: docs/ADMIN_CONFIG_DECOMPOSITION.md — Phase A
Template: PR #56, commit ab64254 (feature flag migration pattern)

Problem

  • 16 unnecessary handler modules exist solely to name a delegate target
  • QueryHandler and CommandHandler work fine without delegate config — it's optional
  • When a route has a pipeline, the pipeline runs; the delegate is only a fallback

Tasks

Remove 16 modules from admin/config.yaml:

admin-engine-queries, admin-engine-commands, admin-schema-queries, admin-ai-queries, admin-ai-commands, admin-component-queries, admin-component-commands, admin-timeline-queries, admin-replay-queries, admin-replay-commands, admin-dlq-queries, admin-dlq-commands, admin-backfill-queries, admin-backfill-commands, admin-billing-queries, admin-billing-commands

Rename + simplify 2 remaining handlers:

  • admin-v1-queriesadmin-queries (type: api.query, no delegate)
  • admin-v1-commandsadmin-commands (type: api.command, no delegate)

Update all ~77 route handler: references:

  • All 18 old handler names → one of admin-queries or admin-commands

Verification

  • go build -o server ./cmd/server compiles
  • ./server -config admin/config.yaml starts
  • All delegate routes still work (delegates still registered as services)
  • go test ./... passes

Files to Modify

  • admin/config.yaml — module removals + route handler rewiring

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions