Repository navigation
Conversation
282dc25 to
f77e2c9
Compare
f77e2c9 to
58353ce
Compare
6d6cf49 to
e58619d
Compare
e58619d to
09f2c00
Compare
09f2c00 to
ba9939b
Compare
ba9939b to
4882e49
Compare
d849b82 to
b6fd6c1
Compare
91194e9 to
f341fe1
Compare
263f451 to
e987248
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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 e987248. Configure here.
| std::chrono::system_clock::time_point instant) { | ||
| auto const now = std::chrono::system_clock::now(); | ||
| return std::chrono::steady_clock::now() - (now - instant); | ||
| } |
There was a problem hiding this comment.
Clock rollback delays first poll indefinitely
Low Severity
ToSteadyClock maps a persisted system_clock freshness onto steady_clock with no clamp. If the wall clock has moved backward since that timestamp was stored, the mapped instant sits in the future, so the polling synchronizer treats elapsed time as negative and delays the first poll by the full clock delta instead of at most poll_interval. After an NTP step or manual clock change, flag updates can stall for that entire offset.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e987248. Configure here.
There was a problem hiding this comment.
Risk: medium.
Automated risk review (dry run): Medium
This PR would not be automatically approved. Human approval required.
Why: Client FDv2 connection-mode assembly in mode_sources.cpp/source_factories.cpp plus public FDv2Config/ConnectionMode defaults is a non-trivial data-source behavior change, and Bugbot has an unresolved finding in ToSteadyClock. Human review is needed; no reviewers were assigned.
If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.
Sent by Cursor Approval Agent: Dry-Run PR Approver
kinyoklion
left a comment
There was a problem hiding this comment.
I think we should clamp the cache timestamp similar to JS:
https://github.com/launchdarkly/js-core/blob/8dbcc788602ba29bc5e7db1117102628db60e7ad/packages/shared/sdk-client/src/datasource/fdv2/calculatePollDelay.ts#L26




Summary
Defines the client's FDv2 connection modes and assembles the data sources each one uses.
ConnectionModeenum and a clientFDv2Configdescribing each mode's data sources.BuildModeSources, which turns a mode's config into the initializer and synchronizer factories it needs.Note
Overview
Introduces FDv2 connection modes for the desktop client: a
ConnectionModeenum (streaming,polling,offline), a clientFDv2Configthat describes each mode’s initializers, synchronizer tiers, FDv1 fallback, and shared timeouts/use_post, plus desktop defaults (start in streaming, three modes, 2‑minute fallback and 5‑minute recovery).Adds
BuildModeSourcesto turn a mode’s config into initializer and synchronizer factory lists (cache, FDv2 polling/streaming, optional FDv1 polling adapter), including URL overrides and request config from endpoints/context. Polling synchronizers getlast_pollfrom cache per-context freshness (mapped to steady clock) so relaunches don’t burst polls.Refactors concrete
source_factoriesfor polling init/sync, streaming sync, and FDv1 fallback wrapping. Wired into CMake with broad unit tests for default pipelines, custom modes, and fallback behavior.Reviewed by Cursor Bugbot for commit e987248. Bugbot is set up for automated code reviews on this repo. Configure here.