Repository navigation
Conversation
4992afc to
9df0441
Compare
9df0441 to
468d47a
Compare
468d47a to
346c0d3
Compare
346c0d3 to
f0596a8
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f0596a8. Configure here.
| active_conditions_.reset(); | ||
| } | ||
| StartSynchronizers(); | ||
| } |
There was a problem hiding this comment.
Stale shutdown aborts FDv2 retry
High Severity
OnFDv2RetryTimer closes the FDv1 adapter while its Next() is still in the orchestrator's WhenAny. That unblocks the old future with Shutdown, which is posted onto the executor after the new FDv2 synchronizer has already been started. OnSynchronizerResult then treats that stale Shutdown as belonging to the replacement and resets active_synchronizer_, so the SDK is left with no live source after the TTL elapses.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f0596a8. Configure here.
| DataSourceStatus::DataSourceState::kInterrupted, | ||
| DataSourceStatus::ErrorInfo::ErrorKind::kUnknown, | ||
| kNoFDv1FallbackConfigured); | ||
| return; |
There was a problem hiding this comment.
Fallback status skips shutdown fence
Medium Severity
When a fallback directive arrives and no FDv1 tier is configured, the new path writes kInterrupted through status_manager_->SetState instead of PublishState. That skips GuardShutdown, so a late write after Close can overwrite the shared status that outlives this source.
Additional Locations (1)
Triggered by learned rule: Client FDv2DataSource: basis is selector; GuardShutdown fences store
Reviewed by Cursor Bugbot for commit f0596a8. Configure here.


Summary
Honors the service's directive to move the client off FDv2 back to FDv1, and provides an FDv1 source to fall back to.
Note
Overview
Adds FDv1 fallback when the service tells the client to leave FDv2: a new
FDv1AdapterSynchronizerexposes an existing FDv1IDataSourceas an FDv2 synchronizer (Init/Upsert/status → changesets andFDv2SourceResult).FDv2DataSourcenow reacts tofdv1_fallbackon initializer and synchronizer results: it still applies any accompanying payload, switches the synchronizer tier viaSourceManager, starts the FDv1 fallback when configured, and schedules an FDv2 retry after the directive TTL (cancellable on close). If no FDv1 tier is configured, it reports interrupted with a clear message instead of staying on FDv2.Unit tests cover the adapter lifecycle/conversions and orchestration (apply-before-fallback, FDv1 tier start, disconnect without fallback, TTL retry).
Reviewed by Cursor Bugbot for commit f0596a8. Bugbot is set up for automated code reviews on this repo. Configure here.