Open
Conversation
* fix: resolve falsy value assignment bugs in FFE evaluation Fixes critical bugs that prevented proper handling of falsy values in flag assignments: 1. Bug #1: Fixed variant existence check in evaluateForSubject.ts - Changed `if (variant)` to `if (variant != null)` on line 78 - Ensures boolean false, integer 0, and empty string values are returned correctly - Previously, truthy check would incorrectly skip returning legitimate falsy flag values 2. Bug #2: Fixed cache entry validation in local-storage-assignment-cache.ts - Changed `if (key && value)` to `if (key != null && value != null)` on line 16 - Ensures cache entries with falsy values are stored properly - Prevents exposure event deduplication issues These fixes resolve the failing test cases: - test-case-boolean-false-assignment.json (boolean false values) - test-case-empty-string-variation.json (empty string values) - test-case-falsy-value-assignments.json (integer zero values) * add new test cases locally * match format
Collaborator
Author
|
I had stacked the fixes (8792b08) because the test files were not in json:api format; they are rectified here. |
dd-oleksii
reviewed
Nov 6, 2025
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.
Motivation
Server SDKs are not using the json:api wrapper; sync'ing this repo with the test files in system-tests to help migration.
Changes
jsonapiwrapper*ResponseobjectTest instructions
Checklist