feat(openfeature): expose dynamic offline rules (FFL-2837 PR3) - #1348
Draft
btthomas wants to merge 3 commits into
Draft
feat(openfeature): expose dynamic offline rules (FFL-2837 PR3)#1348btthomas wants to merge 3 commits into
btthomas wants to merge 3 commits into
Conversation
This was referenced Jul 24, 2026
btthomas
force-pushed
the
blake.thomas/FFL-2837-PR2
branch
from
July 27, 2026 20:13
cb5597d to
932c87b
Compare
btthomas
force-pushed
the
blake.thomas/FFL-2837-PR3
branch
from
July 27, 2026 20:28
dbf9a5f to
ec8e68a
Compare
btthomas
force-pushed
the
blake.thomas/FFL-2837-PR2
branch
from
July 28, 2026 19:47
932c87b to
a725eb5
Compare
btthomas
force-pushed
the
blake.thomas/FFL-2837-PR3
branch
from
July 28, 2026 20:00
ec8e68a to
d6670ab
Compare
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.
Pull request stack
This description uses Simplified Technical English. Technical names and API names do not change.
Summary
This PR exposes dynamic offline rules through the existing offline provider.
FlagsClient.FlagsClientuse its stored context.TARGETING_KEY_MISSING.Reason
The provider lifecycle already supports offline configuration and context changes. The provider only needs to pass the current resolution context to the core rules path. A new provider class is not required.
When OpenFeature supplies no effective context, the provider passes
undefinedto the internal resolution method. This preserves an embedded precomputed context. The provider still passes the OpenFeature logger.OpenFeature hook constraint
Web SDK 1.8 freezes the hook context before it calls
beforehooks. It does not accept a replacement context from a hook. This PR does not claim that a hook can replace one resolution context.Temporary upstream code
This PR adds three fixture
TODO(FFL-2837)markers:The complete stacked branch contains 12 markers. PR1 and PR2 contain the other nine markers.
The three PR3 fixtures use the legacy
rulesBasedJSON wire. Replace them with one canonical version 1rules.responsebase64 fixture after a published flagging-core release contains openfeature-js-client#344. Reuse that fixture for the Metro, Hermes, and JSC checks.Tracking metadata is not an upstream blocker. Rules assignments use the existing native bridge.
User impact
A customer can load one rules configuration and call
OpenFeature.setContextfor new subjects. The provider evaluates each context locally. It does not fetch assignments.Precomputed-only behavior does not change. Matching precomputed data has priority when both branches exist.
Keep the original wire when it contains rules.
configurationToStringcannot recreate the protobuf rules payload.Remaining gates
This PR remains a draft until these gates are complete.
Checks
yarn tsc --noEmit -p packages/core/tsconfig.jsonyarn tsc --noEmit -p packages/react-native-openfeature/tsconfig.jsonyarn tsc --noEmit -p example-new-architecture/tsconfig.jsongit diff --check