diff --git a/docs/superpowers/specs/2026-07-26-improve-synchronization-design.md b/docs/superpowers/specs/2026-07-26-improve-synchronization-design.md index 2170fa8..0cfa7b3 100644 --- a/docs/superpowers/specs/2026-07-26-improve-synchronization-design.md +++ b/docs/superpowers/specs/2026-07-26-improve-synchronization-design.md @@ -11,6 +11,24 @@ Replace the Profile page's single inline "syncing: N/M activities" text line wit modal that shows real progress through sync, broken into named phases the user can actually follow: discovering new activities, fetching activity details, then fetching workouts. +## Cleanup folded into this work: dead `Backfill`/`IncrementalSync` wrappers + +`Service.Backfill(ctx)` and `Service.IncrementalSync(ctx)` are exported methods that each record +their own `SyncRun`, wrapping `backfillCore`/`incrementalSyncCore`. Their doc comments say +they're used "by the periodic background loop" -- but that loop was removed in an earlier +session (`4d2cbe4 refactor: remove automatic background incremental sync`), and grepping +`internal/api/` and `cmd/` confirms nothing in production calls them anymore. `FullSync` (the +only production caller of the core logic) calls `backfillCore`/`incrementalSyncCore` directly. +Only `internal/sync/service_test.go` still calls `Backfill`/`IncrementalSync`, which is the only +reason they're not already flagged as unused by the compiler. + +Since this plan already restructures `service.go`'s progress model, remove these two dead +exported methods (and their now-inaccurate doc comments) as an early task, rewriting the tests +that called them to exercise the same behavior through `FullSync` or the `*Core` functions +directly (same package, so unexported functions are still directly testable) -- before any of +the progress-model changes below, so later tasks aren't touching code that's about to be +deleted. + ## Current state (for reference) - `sync.Service.Progress()` returns a flat `{Done, Total}`, written only by