Skip to content

fix: accept bootstrap snapshots without rule results - #858

Open
roncohen wants to merge 1 commit into
mainfrom
fix/optional-bootstrap-rule-results
Open

roncohen wants to merge 1 commit into
mainfrom
fix/optional-bootstrap-rule-results

Conversation

@roncohen

@roncohen roncohen commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Why

Bootstrap snapshots should be able to omit the rule-by-rule diagnostic trace. It is not needed to restore a flag value or identify which variant and flag version were selected. Released v2 browser readers currently reject a snapshot without ruleResults, so readers need to be updated before snapshot producers can omit the field.

What changed

  • Browser and framework SDKs accept v2 bootstrap snapshots without ruleResults. The Browser SDK treats omitted results as an empty diagnostic trace and still records the selected variant and its source version in checks.
  • Existing snapshots with rule results are accepted and keep their trace. Live flag evaluation responses still require and validate rule results. This does not change what snapshot producers emit.

Verification

  • Built the Browser and React SDKs and ran the Browser, React, Vue, and React Native test suites.
  • Added regression tests for reading a snapshot without rule results, preserving selected-variant check data, and rejecting missing or malformed rule results where required.

@roncohen
roncohen marked this pull request as ready for review December 1, 2026 19:16

@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

This branch has not been deployed

No deployments
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