Skip to content

fix: exclude server-only flags from bootstrap - #10

Merged
roncohen merged 1 commit into
mainfrom
fix/bootstrap-secret-flags
Nov 22, 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 get_flags_for_bootstrap() for both Client and AsyncClient, including bound clients.

  • Export only flags whose evaluated definition explicitly declares secret: false. Missing, null, malformed, or otherwise non-false metadata fails closed.
  • Use the same captured snapshot for evaluation, visibility, and flagStateVersion, including refreshes triggered by override callbacks.
  • Keep private definitions available for normal server reads and public-flag dependencies. Overrides may change an explicitly public flag's bootstrap value, but cannot publish private or unknown keys.
  • Remove dependency errors[].source from bootstrap without changing server-side diagnostics or registering flag-check events during serialization.
  • Cover live definitions, file fallback round trips, old metadata-less snapshots, static fallback, offline overrides, JSON ownership, and sync/async APIs with permanent regressions.

Compatibility

Values without explicit public visibility, including unclassified static values and override-only keys, are no longer exported. Old snapshots without visibility metadata remain usable server-side but cannot authorize bootstrap disclosure. Bootstrap context is unchanged; callers must still supply browser-safe context attributes.

Validation

  • 1,852 passed, 10 skipped on each of Python 3.11, 3.12, 3.13, 3.14, and 3.15, with warnings treated as errors.
  • Ruff lint/format, mypy, wheel/sdist build, and installed-artifact checks passed.
  • Generated Python bootstrap consumed by the built Browser v2 SDK: 13 interoperability assertions passed.
  • New privacy regressions reproduced failures against the unpatched implementation; all SDK HTTP in these tests is mocked.

Related .NET fixes: current SDK and Boolean 0.2 backport.

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 merged commit adc6257 into main Nov 22, 2026
16 checks passed
@roncohen
roncohen deleted the fix/bootstrap-secret-flags branch November 22, 2026 13:10
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