feat: Add the FDv2 polling data source - #188
Open
beekld wants to merge 10 commits into
Open
Conversation
beekld
force-pushed
the
bklimt/SDK-2701/fdv2-polling
branch
2 times, most recently
from
August 10, 2026 18:46
51cd15e to
e33f29d
Compare
beekld
force-pushed
the
bklimt/SDK-2701/fdv2-polling
branch
from
August 12, 2026 21:45
e33f29d to
49a0ba3
Compare
beekld
force-pushed
the
bklimt/SDK-2701/fdv2-polling
branch
from
August 12, 2026 22:10
49a0ba3 to
03b9ff6
Compare
beekld
marked this pull request as ready for review
August 12, 2026 22:11
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
Adds the first concrete FDv2 sources: a polling initializer and synchronizer, both built on the existing
HttpTransport.A few behaviors worth noting:
The source also reports an FDv1 fallback directive when a response signals one, which the orchestrator will act on in later work.
NOTE: This PR adds a direct dependency on
percent-encoding, but this is low risk, because we already depend on that crate indirectly through other dependencies.Note
Overview
Adds the first concrete FDv2 polling sources: a
PollingInitializerandPollingSynchronizerthat implement the existingInitializer/Synchronizertraits overHttpTransport.Poll requests go to
GET sdk/pollwith shared RequestHeaders (auth, user-agent, instance id, optional tags) and an optional selector encoded as thebasisquery parameter via new URL helpers (percent-encodingdependency). The synchronizer waits between polls and clamps the interval to a 30s minimum.Responses are mapped to
FDv2SourceEvent: 304 yields a no-op change set; 200 bodies are parsed as FDv2 event envelopes throughFDv2ProtocolHandler; recoverable HTTP errors become Interrupted, others TerminalError. FDv1 fallback directives are read fromX-LD-FD-Fallback/ TTL headers (with body precedence on goodbye), via new logic insource.rs.Dev-only:
tokiotest-util for paused-clock interval tests; broad unit and mockito e2e coverage for parsing, status handling, selectors, and polling timing.Reviewed by Cursor Bugbot for commit 03b9ff6. Bugbot is set up for automated code reviews on this repo. Configure here.