Skip to content

fix: exclude server-only flags from Boolean SDK bootstrap (0.2.x) - #20

Merged
roncohen merged 2 commits into
maintenance/0.2.xfrom
fix/bootstrap-secret-flags-v02
Nov 22, 2026
Merged

roncohen merged 2 commits into
maintenance/0.2.xfrom
fix/bootstrap-secret-flags-v02

Conversation

@roncohen

@roncohen roncohen commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Backport bootstrap privacy to the released Boolean SDK 0.2 line, without adopting the multivariate SDK or protocol v2.

  • Retain visibility through the legacy definition converter and persisted fallback snapshots. Only an explicit JSON secret: false permits export; missing or malformed metadata is server-only.
  • Filter bootstrap after evaluation/overrides, so private definitions and local overrides remain usable server-side without publishing private or unknown keys.
  • Capture definitions and flagStateVersion atomically, preserving existing on-access refresh behavior and keeping visibility/results/version consistent when an override callback refreshes the cache.
  • Add regressions for strict visibility, root/bound bootstrap, overrides, refresh consistency, actual file fallback round trips, old metadata-less snapshots, static fallback, and offline values.
  • A separate test-only follow-up fixes inherited current-analyzer failures: dispose a temporary JsonDocument and replace uncancelled timeout races with Task.WaitAsync. No SDK behavior changes in that follow-up.

Scope and compatibility

The base is maintenance/0.2.x, created directly at released v0.2.0 (5e40623). This deliberately avoids importing later SDK features into the security backport.

Unclassified static values, override-only keys, and old snapshots lacking visibility can still support server reads but are no longer exported in bootstrap. Bootstrap context is unchanged; callers must still supply browser-safe context attributes.

Validation

  • 179 SDK tests + 5 example tests passed on each of .NET 8 and .NET 10 (368 total executions).
  • Solution formatting verification passed; Release builds for net10.0 and netstandard2.0 passed with zero warnings/errors.
  • NuGet packing passed.
  • Against an untouched archive of the released v0.2.0 source, the added privacy suite reproduced 14 failures out of 15 cases; all 15 pass after the fix. SDK HTTP is mocked.

The protocol-v2/current-main fix is #21. Publication of any maintenance release is outside this PR.

@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: high

no actionable findings

@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: high

no actionable findings

@roncohen
roncohen merged commit ef656c7 into maintenance/0.2.x Nov 22, 2026
3 checks passed
@roncohen
roncohen deleted the fix/bootstrap-secret-flags-v02 branch November 22, 2026 13:50
@roncohen

Copy link
Copy Markdown
Contributor Author

This 0.2.x backport will not be released. The bootstrap fix will ship in the 0.3.x SDK line instead.

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