feat: Add FDv2 support to the test data source - #200
Open
beekld wants to merge 1 commit into
Open
Conversation
beekld
marked this pull request as ready for review
September 10, 2026 19:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The FDv1
TestDatasource does not work with the FDv2 data system, so tests that rely on it cannot run against FDv2. This teaches the sameTestDatato also act as an FDv2 synchronizer, so it can be passed toConfigBuilder::data_sourcefor FDv1 or toDataSystemBuilder::synchronizerfor FDv2.Under FDv2 it delivers a full payload of the current flags on first read, then a partial for each later update. The FDv2 data system is pull-based, so the source hands change sets to it rather than writing the store directly. As a result, updates propagate asynchronously, unlike FDv1's synchronous
update().Note
Overview
TestDatanow works with the FDv2 data system in addition to the existing FDv1data_sourcepath. Wire it viaDataSystemBuilder::synchronizerinstead ofConfigBuilder::data_source.The implementation adds an FDv2 synchronizer that returns a full change set on the first pull, registers an mpsc channel for live updates, and broadcasts partial change sets when flags/segments change through
update,use_preconfigured_flag, oruse_preconfigured_segment. FDv1 behavior (direct store upserts) is unchanged. Docs note that FDv2 updates are asynchronous.ItemChangegainsCloneso partial sets can be fan-out to multiple synchronizers. New client and test_data tests cover end-to-end FDv2 evaluation and full-then-partial synchronizer events.Reviewed by Cursor Bugbot for commit eca1ea1. Bugbot is set up for automated code reviews on this repo. Configure here.