Skip to content

Stop carrying rule traces in browser SDKs - #864

Merged
roncohen merged 1 commit into
mainfrom
fix/ignore-browser-rule-results
Dec 2, 2026
Merged

roncohen merged 1 commit into
mainfrom
fix/ignore-browser-rule-results

Conversation

@roncohen

@roncohen roncohen commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Why

The server already chooses the flag value. Browser SDKs do not need the per-rule trace to serve that value or record the selected variant. An unused trace should not make a valid flag response fail validation.

What changed

  • Browser, React, Vue, and React Native ignore ruleResults in live responses, cached flags, and bootstrap snapshots. Browser checks no longer include evalRuleResults. Flag values, variant and source version IDs, and evaluation errors are unchanged.
  • getFlagResults() keeps its ruleResults field for TypeScript compatibility, but the array is now empty and deprecated. Browser check events no longer provide the rule trace to the Event Log.
  • Browser and Node bootstrap writers send ruleResults: []. Browser SDK 2.0.0 requires the array to exist, so apps can still upgrade the server SDK independently. Node evaluation results and Node checks keep their rule traces.

Verification

  • Built and tested the Browser, React, Vue, React Native, and Node SDKs. yarn docs and yarn test:release passed.
  • Tested that missing and malformed rule traces do not reject otherwise valid flags, and that browser checks still record variant and source version without match booleans.
  • Passed snapshots from both writers through the Next.js Pages Router props validator and loaded them with the published Browser SDK 2.0.0.

@reflag-review reflag-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: medium

no actionable findings

@roncohen
roncohen added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 954f6db Dec 2, 2026
9 checks passed
@roncohen
roncohen deleted the fix/ignore-browser-rule-results branch December 2, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant