feat(openfeature): expose dynamic offline rules (FFL-2837 PR3) - #1348
Draft
btthomas wants to merge 2 commits into
Draft
feat(openfeature): expose dynamic offline rules (FFL-2837 PR3)#1348btthomas wants to merge 2 commits into
btthomas wants to merge 2 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
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
Summary
This PR exposes dynamic offline rules through the existing offline provider.
FlagsClient.TARGETING_KEY_MISSING.Reason
The provider lifecycle already supports offline configuration and context changes. It only needs to pass the current resolution context to the core rules path. A new provider class is not required.
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 change one resolution context.Temporary upstream code
This PR has three fixture
TODO(FFL-2837)items:These fixtures use the legacy
rulesBasedJSON wire. Replace them with the canonical protobufruleswire after a flagging-core release contains openfeature-js-client#344.Tracking metadata is not an upstream blocker. Rules assignments use the existing native bridge.
The stack remains in draft while PR #344 is unpublished and the regular expression, size, and security policies are incomplete.
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 a rules wire because the parsed object does not contain the original protobuf payload.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