Validate precomputed evaluation values against variation types - #40
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The schema and documentation changes are consistent, narrowly scoped, and improve fixture validation without introducing functional code-path risk.
Pull request overview
This PR tightens validation for FLEX precomputed assignment fixtures by updating the JSON Schema (and related docs) so that defaultValue and expectedResult.value must match the declared variationType, preventing malformed typed getter inputs from reaching downstream SDK runners.
Changes:
- Updated
schemas/precomputed-assignment.schema.jsonto conditionally validatedefaultValueandexpectedResult.valuetypes based onvariationType(boolean/string/integer/float/object). - Clarified documentation in
precomputed-assignments/README.mdandAGENTS.mdto explicitly state the required JSON types for these fields.
File summaries
| File | Description |
|---|---|
| schemas/precomputed-assignment.schema.json | Adds allOf + if/then constraints to enforce defaultValue/expectedResult.value types by variationType. |
| precomputed-assignments/README.md | Documents the new type-matching requirements for evaluation inputs and expected values. |
| AGENTS.md | Updates the fixture-authoring guidance to reflect the stricter typed-value validation rules. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
typotter
marked this pull request as ready for review
September 17, 2026 20:28
typotter
requested review from
danyal002,
leoromanovsky and
pavlokhrebto
and removed request for
a team
September 17, 2026 20:29
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.
What changed
Schema and documentation changes require precomputed evaluation defaults and expected values to match the declared variation type.
1.0.Why
A numeric string such as
"1.5"previously passed validation for a float evaluation, allowing malformed typed getter inputs into downstream runners.How to verify
Impact
For internal, the FFE team catches malformed typed evaluation fixtures before they reach SDK runners, reducing downstream debugging of invalid getter inputs.