Repository navigation
fix: Signal readiness when selectorless initializers are exhausted - #499
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: low.
Automated risk review (dry run): Low
This PR would be automatically approved.
Why: This is a narrow FDv2 initializer-exhaustion fix in fdv2.rb plus a memory_initialized? accessor on the in-memory store, with unit tests covering selectorless readiness, data application, and persistent-store false-ready. Bugbot completed with no findings.
If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.
Sent by Cursor Approval Agent: Dry-Run PR Approver
keelerm84
approved these changes
Nov 20, 2026
keelerm84
pushed a commit
that referenced
this pull request
Nov 20, 2026
🤖 I have created a release *beep* *boop* --- ## [8.20.1](8.20.0...8.20.1) (2026-11-20) ### Bug Fixes * Prevent a NaN or infinite metric value from discarding all events in a flush ([#498](#498)) ([2b0f4ef](2b0f4ef)) * Restart the stream when a delete event has a version that is not an integer ([#501](#501)) ([d060827](d060827)) * Signal readiness when selectorless initializers are exhausted ([#499](#499)) ([22fda02](22fda02)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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
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.rbexposes the memory store's initialization separately, so data already in a persistent store doesn't trigger readiness. The readiness change is infdv2.rb.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
bundle exec rspec(1688 examples, 0 failures) andbundle exec rubocoppass.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-3727
Note
Overview
Fixes startup hanging when FDv2 initializers return selectorless full payloads (e.g. from ld-relay): data was applied but
@ready_eventstayed unset until a synchronizer succeeded.After all initializers finish,
run_initializersnow sets readiness when the in-memory store was populated during that run (memory_initialized?), not when a read-only persistent cache alone is “initialized.”Storeexposes that separate check so stale cached data does not unblock startup.Selector-bearing initializer payloads still end initialization and signal ready immediately; remaining initializers still run for selectorless success. New selectorless initialization specs cover exhaustion-with-synchronizer-pending, data applied before ready, persistent-store-only negative case, and unchanged selector-bearing short-circuit.
Reviewed by Cursor Bugbot for commit b4a51d7. Bugbot is set up for automated code reviews on this repo. Configure here.