Overview
Following the template established by the feature flag migration (PR #56, commit ab64254), extract each domain service into a self-registering module type that can be declared in YAML config.
Template pattern:
- Define the module type with config struct (db_path, cache_ttl, etc.)
- Module's
ProvidesServices() self-registers its admin adapter in the service registry
- Server auto-discovers it via interface assertion — no explicit wiring
Domain Services to Extract
| Service |
Current Location |
New Module Type |
Key Config |
| Event Store |
evstore.SQLiteEventStore |
eventstore.service |
db_path, retention_days |
| Timeline/Replay |
store/timeline_handler.go |
timeline.service |
event_store dependency |
| DLQ |
store/dlq_handler.go |
dlq.service |
max_retries, retention |
| Execution Tracker |
module/execution_tracker.go |
execution.tracker |
event_store dependency |
| Runtime Manager |
module/runtime_manager.go |
runtime.manager |
— |
| Backfill/Mock/Diff |
store/backfill_handler.go |
backfill.service |
— |
| Ingest Handler |
hardcoded in server |
ingest.handler |
— |
| Billing |
billing/handler.go |
billing.service |
stripe_key, plans |
Per-Service Pattern
For each service:
Depends On
Already Done