Thank you for being patient! We're working hard on resolving the issue
sync-plugin is the optional cargo feature that pulls in
lona-sync and ships a lona_sync::SyncProvider +
lona_sync::SyncExecutor impl alongside your connector module.
tento-myprovider/src/sync_plugin/
├── mod.rs
├── provider.rs # impl lona_sync::SyncProvider
├── executor.rs # impl lona_sync::SyncExecutor
├── context.rs # MyProviderApiContext (auth-resolution seam)
├── deps.rs # MyProviderSyncDeps (state + persistence seam)
└── state.rs # RowSyncState (per-row sync metadata)
<Provider>SyncProvider declares topology (stages, gating,
locking, max-concurrent, alias-key). <Provider>SyncExecutor
runs the sync — it walks date ranges and calls into the
<Provider>SyncDeps and <Provider>ApiContext seams.
Live examples:
tento-garmin/src/sync_plugin/tento-whoop/src/sync_plugin/tento-weather/src/sync_plugin/ (provider only — no executor)Ship sync-plugin when:
MyProviderBackendDeps-style trait propagates Send
cleanly across async fn returns.Skip it when:
Send-bounds are hard to express generically. (This is what
pushed Google's executor host-side; weather's executor lives
host-side too, though the topology Provider stays in
tento-weather.)| Responsibility | Lives in |
|---|---|
| Stage names + topology | provider.rs |
| Per-stage date-range overrides | provider.rs::stage_key_range |
| API calls + cell construction | executor.rs |
| Auth/client resolution | context.rs::<Provider>ApiContext (host-impl'd) |
| Row state lookup + persistence | deps.rs::<Provider>SyncDeps (host-impl'd) |
| Per-row synced-range tracking | state.rs::RowSyncState |
The split between connector::<Provider>BackendDeps and
sync_plugin::<Provider>SyncDeps is intentional: connector deps
serve every Row method (read + write + sync), sync deps serve
only the orchestrator executor. Keeping them separate means a
host that doesn't enable sync-plugin doesn't have to implement
the sync seams.
If you skip sync-plugin, say so in the connector module
docs so it doesn't look like an oversight. Mirror the note in
tento-google/src/connector/mod.rs:
//! Note: there is no `sync-plugin` feature for Google. The
//! orchestrator-side executor's `Send`-future bounds are difficult
//! to express generically over the Google-API client, so the host
//! supplies the executor wholesale.