CopilotKit / CopilotKit/outpost
Worker doesn't hot-reload sync mapping config — requires restart
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 3
- Avg merge
- 7d 16h
- Merged PRs (30d)
- 15
Description
Context
From #95. `apps/worker/src/build-sync-engine.ts`'s `buildSyncEngine()` is called once at module top-level (`const syncEngine = await buildSyncEngine();` in `apps/worker/src/index.ts`), at process boot. It loads the persisted mapping config once and builds a `SyncEngine` instance that lives for the process lifetime.
If someone edits the mapping config via the `/sync` dashboard while the worker is running, the change has zero effect until the worker process restarts (e.g. next deploy).
Fix options to evaluate
- Periodic re-poll of `SystemConfig` on an interval, rebuilding the `StatusMap`/adapter when the config changes (simplest, adds polling overhead)
- A dashboard-triggered signal (e.g. a Postgres NOTIFY, or a lightweight webhook back to the worker's health-check port) to force a rebuild on save
- Accept the limitation and just surface it clearly in the dashboard UI ("changes take effect after next deploy") instead of building live-reload
No strong opinion yet on which — worth a quick design pass before picking.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading apps/worker/src/build-sync-engine.ts and apps/worker/src/index.ts, especially the top-level buildSyncEngine() call and how persisted mapping config is loaded. Compare the polling, dashboard-triggered signal, and documented-limitation options, then define which approach should make config changes take effect without a worker restart or clearly surface the limitation in the dashboard.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100