CopilotKit / CopilotKit/outpost

Worker doesn't hot-reload sync mapping config — requires restart

Open
#97 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: sync roadmap roadmap: next
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.