Skip to content

fix: Send the FDv2 polling selector as the "basis" query parameter - #418

Merged
jsonbailey merged 1 commit into
mainfrom
jb/fdv2-polling-basis-param
Aug 14, 2026
Merged

fix: Send the FDv2 polling selector as the "basis" query parameter#418
jsonbailey merged 1 commit into
mainfrom
jb/fdv2-polling-basis-param

Conversation

@jsonbailey

@jsonbailey jsonbailey commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What

The FDv2 (data system v2) polling requester (HTTPPollingRequester) was attaching the current payload selector's state to the poll request under the query-parameter name selector. The protocol requires this parameter to be named basis. Because the server silently ignores unknown query parameters, it never received the SDK's current basis, so every poll returned a full payload and delta polling never engaged.

Fix

Rename the polling query parameter from selector to basis (the value — the selector's state — is unchanged, and it is still only sent when a selector is present). This matches:

  • The CSFDV2 spec, which requires the basis query parameter carrying the state from the most recent payload-transferred event.
  • The Go server SDK (params["basis"] = selector.State()) and the recently fixed Python SDK.
  • Ruby's own FDv2 streaming requester, which already sends basis.

FDv1 polling (HTTPFDv1PollingRequester) does not send a selector/basis and is unaffected.

Testing

This was surfaced by a new sdk-test-harness FDv2 polling basis contract test. The existing polling unit specs (polling_synchronizer_spec.rb, polling_initializer_spec.rb, 39 examples) use mock requesters and continue to pass; none asserted the query-string parameter name, so no unit test change was needed.


Note

Overview
FDv2 polling now sends the current selector state on poll requests using the basis query parameter instead of selector, matching the CSFDV2 protocol and aligning with FDv2 streaming and other SDKs.

The value (selector.state) and the condition (only when a defined selector exists) are unchanged. FDv1 polling does not send this parameter and is unaffected.

Without this fix, the server ignored the unknown selector parameter, so polls always returned full payloads and delta polling never engaged.

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

@jsonbailey
jsonbailey requested a review from a team as a code owner August 14, 2026 19:14
@jsonbailey
jsonbailey merged commit 1084931 into main Aug 14, 2026
12 checks passed
@jsonbailey
jsonbailey deleted the jb/fdv2-polling-basis-param branch August 14, 2026 19:22
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