Description
src/channelReconciler.ts mixes data fetching, diffing, and persistence in a single function. This makes the reconciliation logic hard to test in isolation. Separate the three concerns into distinct functions called by the main loop.
Acceptance Criteria
Context
- Target file:
src/channelReconciler.ts
- The public
reconcile() function signature must not change
Description
src/channelReconciler.tsmixes data fetching, diffing, and persistence in a single function. This makes the reconciliation logic hard to test in isolation. Separate the three concerns into distinct functions called by the main loop.Acceptance Criteria
fetchChannelState(),diffChannelState(), andpersistChannelDiff()are extracted as standalone, testable functionsContext
src/channelReconciler.tsreconcile()function signature must not change