feat(sdk): Add flag dependencies to the evaluation context - #8396
Draft
khvn26 wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
khvn26
force-pushed
the
feat/dependent-flags-evaluation-context
branch
from
August 27, 2026 15:54
3411d79 to
37c4926
Compare
khvn26
force-pushed
the
feat/dependent-flags-evaluation-context
branch
from
August 27, 2026 15:55
37c4926 to
6b6685d
Compare
Adds the schema surface needed to evaluate flags that depend on other flags, as an equivalent to LaunchDarkly's flag prerequisites. `EvaluationContext.flags` is a map of already-evaluated flag results keyed by feature name, so that segment conditions can reference `$.flags.<name>.enabled`, `.value` and `.variant`. Entries reference `FlagResult` in evaluation-result.json directly, so the context and the result cannot drift, and it is `readOnly` as the engine populates it. No behaviour change; this lands the schema so the engines can generate their context types from it.
khvn26
force-pushed
the
feat/dependent-flags-evaluation-context
branch
from
August 27, 2026 15:57
6b6685d to
87b91cb
Compare
khvn26
added a commit
to Flagsmith/engine-test-data
that referenced
this pull request
Aug 27, 2026
REVERT BEFORE MERGE. `EvaluationContext.flags` only exists on the schema branch of Flagsmith/flagsmith#8396, so validating the new test cases against `refs/heads/main` silently proves nothing: the key is simply unknown to the schema, and `EvaluationContext` doesn't set `additionalProperties` to false, so anything at all passes. Points `schema.json` at the context schema on that branch, and the new test cases at `schema.json` on this one, so that validation is meaningful while both are in review. With this, `check-jsonschema` rejects e.g. a non-boolean `$.context.flags.<name>.enabled`, which it accepted before. Once #8396 is merged, both refs should go back to `main` (and the test cases to a tag, in line with the rest of the corpus).
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.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to #8394.