Skip to content

fix: exclude server-only flags from protocol-v2 bootstrap - #21

Merged
roncohen merged 1 commit into
mainfrom
fix/bootstrap-secret-flags
Nov 24, 2026
Merged

roncohen merged 1 commit into
mainfrom
fix/bootstrap-secret-flags

Conversation

@roncohen

@roncohen roncohen commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep server-only flags out of GetFlagsForBootstrap() in the multivariate/protocol-v2 SDK, including bound clients.

  • Preserve flag visibility during JSON parsing, prepared-definition copying, and fallback persistence. Only an explicit JSON false is public; missing or malformed visibility defaults to server-only.
  • Filter outbound bootstrap against the collection captured for evaluation, rather than a potentially newer collection published by an override callback.
  • Keep private definitions available for server reads and public-flag dependencies. Overrides may replace a known public value, but cannot publish private or unknown keys.
  • Remove dependency error sources from bootstrap while retaining full diagnostics in server check telemetry. Bootstrap serialization still registers no flag-check events.
  • Add regressions for visibility metadata, private flag/segment dependencies, diagnostics, refresh consistency, file fallback round trips and old snapshots, static fallback, and offline overrides. Retain public JSON/null bootstrap coverage in the existing tests.

Compatibility

Values without explicit public visibility, including unclassified static values and override-only keys, are no longer exported. Old persisted snapshots lack visibility metadata and therefore fail closed for bootstrap while remaining usable server-side. Bootstrap context is unchanged; callers must still supply browser-safe context attributes.

Validation

  • 196 SDK tests + 6 example tests passed on each of .NET 8 and .NET 10 (404 total executions).
  • Solution formatting verification passed; Release builds for net10.0 and netstandard2.0 passed with zero warnings/errors.
  • NuGet packing passed.
  • New privacy regressions reproduced failures before the fix; SDK requests use mocked HTTP.

This PR targets current main / the 0.3 line. The Boolean 0.2 release backport is #20; the equivalent Python fix is python-sdk#10. No package publication or deployment is included.

@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 reopened this Nov 24, 2026
@roncohen
roncohen enabled auto-merge (squash) November 24, 2026 07:33
@roncohen
roncohen merged commit 6a749fb into main Nov 24, 2026
5 checks passed
@roncohen
roncohen deleted the fix/bootstrap-secret-flags branch November 24, 2026 07:35
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