Skip to content

fix: Accept selectorless FDv2 full payloads - #372

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

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

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

launchdarkly/ld-relay#979 serves FDv2 full transfers that have no selector: server-intent with id:"" and target:0, followed by payload-transferred {"state":"","version":0}. protocol_handler.dart dropped that event with "Ignoring payload-transferred with missing fields", so the SDK never applied the data. The contract test is launchdarkly/sdk-test-harness#600.

Describe the solution you've provided

  • protocol_handler.dart: accepts an empty state and version 0 as a full payload with no selector, and emits Selector.empty. That clears any held selector, and later requests omit basis.
  • protocol_types.dart: keeps a missing state as null so malformed events are still rejected.
  • Orchestration and URL building already handled Selector.empty correctly. An initializer's data without a selector continues the init chain and becomes ready when the chain is exhausted. A synchronizer full payload without a selector becomes ready immediately.
  • Tests: the exact envelope Relay sends, empty vs. missing state, and orchestrator regressions for initializer continuation, synchronizer readiness and clearing the selector.

Describe alternatives you've considered

None. Dropping the payload leaves the SDK uninitialized behind Relay when Relay has no selector.

Additional context

  • Ran with Flutter 3.29.3 / Dart 3.7.2: common_client format, analyze and tests pass (651 tests).
  • The Flutter client contract service passes the selectorless group from sdk-test-harness#600 5/5.

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-3593

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