Skip to content

fix: Clear selectorless FDv2 state in client and server SDKs - #640

Draft
kinyoklion wants to merge 1 commit into
mainfrom
devin/1794591018-fdv2-selectorless
Draft

kinyoklion wants to merge 1 commit into
mainfrom
devin/1794591018-fdv2-selectorless

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

launchdarkly/ld-relay#979 serves FDv2 full transfers that carry no selector: payload-transferred {"state":"","version":0}. The SDKs stored the empty state as a present selector, so both the polling path (params().append({"basis", ...})) and the streaming path (params().set("basis", ...)) sent an empty basis=. The contract test that covers this is launchdarkly/sdk-test-harness#600.

  • libs/internal/src/fdv2_protocol_handler.cpp (shared by client and server): an empty transferred state now produces an absent selector, so poll and stream URLs leave out basis.
  • libs/server-sdk/.../fdv2_data_system.cpp: when a payload arrives without a selector, the selector the SDK was holding is cleared. A no-change response still keeps it.
  • Behavior with a real selector, and initialization, are unchanged.

Verification

  • Beast and CURL out-of-source builds succeed. The internal, server, and client unit suites pass on both (292, 573, and 219 tests).
  • Server contract service: the selectorless group from sdk-test-harness#600 passes 5/5 on both backends.
  • Client contract tests were not exercised. The client contract service doesn't wire up FDv2 (client_impl.cpp only builds FDv1 or null sources), so the harness can't reach this code path. The client change is covered by unit tests only.

Link to Devin session: https://app.devin.ai/sessions/f3b22e19bdde48f1b39f77808077390b
Open in Devin Desktop: https://app.devin.ai/desktop/session/f3b22e19bdde48f1b39f77808077390b?variant=devin
Requested by: @kinyoklion

SDK-3596

Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

This branch has not been deployed

No deployments
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.

1 participant