Skip to content

refactor(sync): extract SyncJob for session sync orchestration#106

Merged
samzong merged 1 commit into
mainfrom
refactor/sync-job
Jul 8, 2026
Merged

refactor(sync): extract SyncJob for session sync orchestration#106
samzong merged 1 commit into
mainfrom
refactor/sync-job

Conversation

@samzong

@samzong samzong commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What's changed?

  • Extract SyncJob / SyncStats / ExistingState from the monolithic run_sync_job_inner loop in src/sync.rs
  • Split adapter scan, existing-state load, per-session process, backfill, and progress reporting into methods with the same control flow

Why

  • The previous function mixed adapter iteration, scan, persistence, and reporting in one long body, making incremental sync hard to follow and change safely
  • Structure matches recent adapter helper extractions without changing sync semantics

Verification

  • cargo test --lib sync — 34 passed (sync unit tests, adapter scan_for_sync, integration regression sync cases, related import/TUI filters)

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong samzong merged commit 6714f61 into main Jul 8, 2026
1 check passed
@samzong samzong deleted the refactor/sync-job branch July 8, 2026 23:00
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.

1 participant