docs: fold dead Backfill/IncrementalSync wrapper cleanup into sync spec
Discovered while verifying the sync design with the user: these two
exported methods are dead in production (only FullSync's *Core calls
are actually used), kept alive only by tests, and their doc comments
still reference the background sync loop removed in 4d2cbe4.
This commit is contained in:
@@ -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
|
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.
|
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)
|
## Current state (for reference)
|
||||||
|
|
||||||
- `sync.Service.Progress()` returns a flat `{Done, Total}`, written only by
|
- `sync.Service.Progress()` returns a flat `{Done, Total}`, written only by
|
||||||
|
|||||||
Reference in New Issue
Block a user