-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Refactor: sync/watch lifecycle via SyncCoordinator
Why
Background sync + watch lifecycle is a cross-cutting concern that can easily leak into initialization, routers, and MCP lifespan. Centralizing lifecycle improves reliability and reduces coupling.
Scope
- Introduce a
SyncCoordinatorresponsible for:- starting/stopping watch service
- scheduling background sync
- reporting status
- Entrypoints decide when to start it (API/MCP/CLI) via their containers.
Acceptance criteria
- Lifecycle logic centralized in one place.
- Fewer scattered background-task conditionals.
- Stable shutdown behavior (especially in Postgres test mode where hangs were previously noted).
Dependencies
- After containers + deps split.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request