Skip to content

feat: add FDv2 configuration builder#545

Merged
beekld merged 52 commits into
mainfrom
beeklimt/SDK-2100
Jun 17, 2026
Merged

feat: add FDv2 configuration builder#545
beekld merged 52 commits into
mainfrom
beeklimt/SDK-2100

Conversation

@beekld

@beekld beekld commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Adds a public FDv2Builder and wires the FDv2 data system into MakeDataSystem, so end users can opt into the FDv2 protocol via the existing config-builder pattern.

// Default FDv2 stack (streaming primary, polling fallback,
// FDv1 streaming last-resort)
auto config = ConfigBuilder("sdk-key-123")
    .DataSystem().Method(DataSystemBuilder::FDv2())
    /* ... */;

// Customised: payload filter + shorter fallback timeout, no FDv1 fallback
auto config = ConfigBuilder("sdk-key-123")
    .DataSystem().Method(
        DataSystemBuilder::FDv2()
            .Streaming(FDv2Builder::StreamingSource().Filter("mobile-flags"))
            .FallbackTimeout(std::chrono::seconds{30})
            .DisableFDv1Fallback())
    /* ... */;

Test plan

  • 5 new FDv2 builder tests in config_builder_test.cpp
  • Full server suite green (503 tests)

Note

Medium Risk
Changes how the server SDK selects and connects its data source (new public API and client construction path); default remains Background Sync unless FDv2 is configured.

Overview
Introduces FDv2Builder and FDv2Config so apps can select the FDv2 changeset protocol via DataSystemBuilder::Method(FDv2::Default()) or a custom stack (ordered initializers/synchronizers, optional FDv1 streaming/polling fallback, fallback/recovery timeouts, per-source BaseUrl overrides).

MakeDataSystem in client_impl.cpp now constructs FDv2DataSystem from config: polling initializer factories plus streaming/polling synchronizer factories and optional FDv1 adapter factories, with shared fallback/recovery condition factories.

FDv2 poll/stream implementations take a resolved base URL string (override or service endpoints) instead of full ServiceEndpoints. New initializer/synchronizer factory types build runtime sources from built config.

config_builder_test.cpp adds FDv2 builder coverage; existing FDv2 HTTP tests updated for the new request API.

Reviewed by Cursor Bugbot for commit afe78d6. Bugbot is set up for automated code reviews on this repo. Configure here.

@beekld beekld force-pushed the beeklimt/SDK-2379-4 branch from cce4172 to 458539d Compare June 4, 2026 00:53
@beekld beekld force-pushed the beeklimt/SDK-2100 branch from 3981ee7 to 4d3a6c8 Compare June 4, 2026 00:53
@beekld beekld force-pushed the beeklimt/SDK-2379-4 branch from 458539d to 5aace2f Compare June 4, 2026 21:54
@beekld beekld force-pushed the beeklimt/SDK-2100 branch 2 times, most recently from 095280a to 58392f8 Compare June 4, 2026 23:43
@beekld beekld force-pushed the beeklimt/SDK-2379-4 branch from 5aace2f to 5988ce1 Compare June 4, 2026 23:43
@beekld beekld force-pushed the beeklimt/SDK-2100 branch from 58392f8 to aaf3aa6 Compare June 4, 2026 23:51
@beekld beekld force-pushed the beeklimt/SDK-2379-4 branch from 5988ce1 to 88190bc Compare June 4, 2026 23:51
@beekld beekld force-pushed the beeklimt/SDK-2379-4 branch from 88190bc to 86b2e3d Compare June 5, 2026 18:07
@beekld beekld force-pushed the beeklimt/SDK-2100 branch from aaf3aa6 to 9bb657e Compare June 5, 2026 18:07
beekld added a commit that referenced this pull request Jun 12, 2026
@beekld beekld changed the base branch from beeklimt/SDK-2379-4 to beeklimt/SDK-2515 June 12, 2026 21:40
beekld added a commit that referenced this pull request Jun 12, 2026
beekld added a commit that referenced this pull request Jun 15, 2026
@beekld beekld marked this pull request as ready for review June 15, 2026 23:42
@beekld beekld requested a review from a team as a code owner June 15, 2026 23:42
Base automatically changed from beeklimt/SDK-2515 to main June 16, 2026 17:57
beekld added a commit that referenced this pull request Jun 16, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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 13bdf20. Configure here.

Comment thread libs/server-sdk/src/config/builders/data_system/fdv2_builder.cpp
# Conflicts:
#	libs/server-sdk/src/client_impl.cpp
beekld added a commit that referenced this pull request Jun 16, 2026
beekld added a commit that referenced this pull request Jun 17, 2026
@beekld beekld merged commit 43850ce into main Jun 17, 2026
60 of 63 checks passed
@beekld beekld deleted the beeklimt/SDK-2100 branch June 17, 2026 22:45
@github-actions github-actions Bot mentioned this pull request Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants