Skip to content

feat: expose Big Segments via public Client and Config APIs#552

Open
beekld wants to merge 5 commits into
mainfrom
beeklimt/SDK-2368
Open

feat: expose Big Segments via public Client and Config APIs#552
beekld wants to merge 5 commits into
mainfrom
beeklimt/SDK-2368

Conversation

@beekld

@beekld beekld commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Expose Big Segments to customer code

Makes the server-side Big Segments feature reachable from customer code: a public config method to wire a store, and a status provider on the client for querying store health and subscribing to changes. Builds on SDK-2366-2.

What's in

  • Promotes BigSegmentsBuilder to the public include tree and adds ConfigBuilder::BigSegments(BigSegmentsBuilder), surfaced as an optional Config::BigSegments().
  • New public IBigSegmentStoreStatusProvider and BigSegmentStoreStatus (IsAvailable()/IsStale()), plus Client::BigSegmentStoreStatus().
  • ClientImpl constructs the BigSegmentStoreWrapper from config, hands it to the evaluator, and starts its background poll. An internal adapter exposes the wrapper's status broadcaster as the public provider.
  • BigSegmentsBuilder::Build() now returns a new error code when the store is null.

Design notes

  • The status surface mirrors DataSourceStatus: the accessor is Status(), and listeners use OnBigSegmentStoreStatusChange(handler) -> IConnection.
  • When no store is configured, the provider reports the store as unavailable and registered listeners never fire.

Testing

Unit tests added for the new behavior.


Note

Medium Risk
Changes flag evaluation wiring and adds a new public API surface; misconfigured stores now fail at config build instead of silently disabling Big Segments.

Overview
Exposes Big Segments on the public server SDK so apps can configure a store and observe store health, parallel to existing data-source status.

Configuration: ConfigBuilder::BigSegments(BigSegmentsBuilder) wires optional BigSegmentsConfig into Config; omitting it leaves Big Segments disabled. BigSegmentsBuilder::Build() now returns tl::expected and fails with kConfig_BigSegments_NullStore when the store pointer is null (previously a null store was allowed).

Client runtime: When Big Segments are configured, ClientImpl creates BigSegmentStoreWrapper, starts its metadata poll, and passes it into the evaluator; otherwise the wrapper stays null.

Status API: New BigSegmentStoreStatus (IsAvailable / IsStale) and IBigSegmentStoreStatusProvider with Status() and OnBigSegmentStoreStatusChangeIConnection, exposed as Client::BigSegmentStoreStatus(). An internal provider adapts the wrapper; with no store configured it reports unavailable / not stale and listeners are no-ops.

Unit tests cover builder validation, config round-trip, and status provider behavior (including transitions).

Reviewed by Cursor Bugbot for commit 5836643. Bugbot is set up for automated code reviews on this repo. Configure here.

@beekld beekld force-pushed the beeklimt/SDK-2368 branch from 7153392 to 53139f4 Compare June 12, 2026 16:45
Base automatically changed from beeklimt/SDK-2366-2 to main June 12, 2026 19:04
@beekld beekld force-pushed the beeklimt/SDK-2368 branch from 53139f4 to 5836643 Compare June 12, 2026 19:09
@beekld beekld marked this pull request as ready for review June 12, 2026 19:10
@beekld beekld requested a review from a team as a code owner June 12, 2026 19: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