Repository navigation
fix: Signal readiness when selectorless initializers are exhausted - #582
Merged
Merged
Conversation
Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
Risk: medium.
Automated risk review (dry run): Medium
This PR would not be automatically approved. Human approval required.
Why: This changes FDv2 startup readiness in fdv2.py, async_fdv2.py, and store.py so selectorless initializer data can mark the client ready after exhaustion. That is a moderate SDK initialization-behavior change, even with tests for exhaustion and persistent-store cases. Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Dry-Run PR Approver
keelerm84
approved these changes
Nov 20, 2026
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.


Requirements
async_*siblings (or N/A)Related issues
launchdarkly/ld-relay#979 serves FDv2 full payloads with no selector. When only initializers provided such data, the SDK applied it, but the startup wait signaled readiness only for selector-bearing payloads. Startup then stayed pending until a synchronizer succeeded. The contract test is launchdarkly/sdk-test-harness#600.
Describe the solution you've provided
This implements DATASYSTEM v2 requirements 1.1.3 and 1.1.5:
store.pyexposes the memory store's initialization separately, so data already in a persistent store doesn't trigger readiness. The sync change is infdv2.pyand the matching async change is inasync_fdv2.py.Describe alternatives you've considered
Checking the store's general
initializedstate. With a persistent store, that would report ready before any data arrived in this process.Additional context
make lintandmake testpass (2367 passed).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-3726
Note
Overview
Fixes FDv2 startup hanging when initializers only deliver selectorless full payloads (e.g. from LD Relay): sync
fdv2.pyand asyncasync_fdv2.pynow set the readiness event after the initializer chain finishes if data was applied to the in-memory store during that run. Selector-bearing payloads still signal ready immediately and stop further initializers.store.pyaddsis_memory_initialized()so readiness reflects in-process initializer data, not a pre-populated persistent store alone. Sync/async tests cover exhaustion with selectorless init (with and without flag data) and the case where only persistent data exists (no premature ready).Reviewed by Cursor Bugbot for commit 79565eb. Bugbot is set up for automated code reviews on this repo. Configure here.