Skip to content

fix: address review feedback on eventstore/timeline/dlq service modules#139

Merged
intel352 merged 2 commits intofeat/issue-90-domain-servicesfrom
copilot/sub-pr-125
Feb 23, 2026
Merged

fix: address review feedback on eventstore/timeline/dlq service modules#139
intel352 merged 2 commits intofeat/issue-90-domain-servicesfrom
copilot/sub-pr-125

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

Addresses reviewer feedback from the domain-services extraction PR. Fixes several correctness issues in the service discovery logic and config handling.

Dead type-assertion loops removed (cmd/server/main.go)

Both svc.(*module.TimelineServiceModule) and svc.(*module.DLQServiceModule) assertions could never succeed — those modules register their muxes/store as services via ProvidesServices(), not themselves. Replaced with single-pass loops over the registry that collect services by suffix.

Partial-discovery bugs fixed (cmd/server/main.go)

  • Timeline: timelineDiscovered was set to true as soon as .timeline was found, skipping the fallback even when .replay or .backfill were still nil. Now all three must be non-nil before marking discovered.
  • DLQ: dlqDiscovered was set when the .admin handler was found, but dlqStore could still be nil. Now both mux and store must be found together.

float64 config handling (plugins/dlq, plugins/eventstore)

YAML numeric values decode as float64; integer-only assertions silently dropped max_retries and retention_days. Added float64 branches consistent with the rest of the codebase (see plugins/api/plugin.go:getIntConfig).

Nil guard for EventStore (module/timeline_service.go)

NewTimelineServiceModule now panics immediately with a clear message if eventStore is nil, rather than panicking on the first HTTP request.

Unimplemented config fields documented (module/dlq_service.go, module/eventstore_service.go)

max_retries, retention_days (DLQ), and retention_days (EventStore) are stored and exposed via accessors but not yet wired to the underlying stores. Added doc comments marking them as reserved for future implementation.

Test fix (module/eventstore_service_test.go)

TestEventStoreServiceModule_DefaultDBPath was passing a non-empty path, contradicting its stated purpose. Updated to pass an empty DBPath and verify the store initializes via the default path.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…t64 config handling, and test fix

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Extract EventStore, Timeline, and DLQ as self-registering modules fix: address review feedback on eventstore/timeline/dlq service modules Feb 23, 2026
Copilot AI requested a review from intel352 February 23, 2026 14:20
@intel352 intel352 marked this pull request as ready for review February 23, 2026 14:32
@intel352 intel352 merged commit 3c00d26 into feat/issue-90-domain-services Feb 23, 2026
@intel352 intel352 deleted the copilot/sub-pr-125 branch February 23, 2026 14:32
intel352 added a commit that referenced this pull request Feb 23, 2026
…es (#90) (#125)

* feat: extract EventStore, Timeline, and DLQ as self-registering modules (#90)

Follow the feature flag module pattern (PR #56) to extract three domain
services into self-registering module types:

- eventstore.service: wraps SQLiteEventStore with config-driven setup
- timeline.service: wraps TimelineHandler and ReplayHandler
- dlq.service: wraps DLQHandler

Each module implements ProvidesServices() for auto-discovery and is
declared in admin/config.yaml. Hardcoded wiring removed from main.go
with backward-compatible fallbacks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: address review feedback on eventstore/timeline/dlq service modules (#139)

* Initial plan

* Apply PR review feedback: fix timeline/DLQ discovery, nil check, float64 config handling, and test fix

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants