fix(sdk-client-common): identify() bootstrap does not set flagstore in FDv2 - #1837
fix(sdk-client-common): identify() bootstrap does not set flagstore in FDv2#1837joker23 wants to merge 1 commit into
identify() bootstrap does not set flagstore in FDv2#1837Conversation
FDv2 This PR will fix per-context bootstrap behavior for FDv2.
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/browser size report |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 17186ea. Configure here.
This PR will fix per-context bootstrap behavior for FDv2.
Note
Medium Risk
Changes identify/bootstrap flag-store wiring for FDv2; incorrect parsing or context mapping would break per-context evaluations, but scope is limited and covered by new tests.
Overview
FDv2
identify()now loads bootstrap into the per-context flag store instead of assuming the caller already applied it (e.g. viapresetFlagsbefore identify).When
identifyOptions.bootstrapis present,FDv2DataManagerBaseparses it withreadFlagsFromBootstrap(or uses pre-parsedbootstrapParsed) and callsflagManager.setBootstrap(context, …)for the identified context, then resolves identify immediately as before.Tests cover
setBootstrapon first identify and on re-identify with updated bootstrap payloads.Reviewed by Cursor Bugbot for commit 17186ea. Bugbot is set up for automated code reviews on this repo. Configure here.