Skip to content

test: Add experiment exposure change support to client contract test services - #2213

Draft
joker23 wants to merge 3 commits into
mainfrom
skz/sdk-3688/fix-experiment-exposure-notifications
Draft

joker23 wants to merge 3 commits into
mainfrom
skz/sdk-3688/fix-experiment-exposure-notifications

Conversation

@joker23

@joker23 joker23 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The browser, react, and vue contract test services now support the "experiment exposure change" harness suite. Browser and react get the flag change listener commands and the flag-change-listeners capability, the same as vue already has. All three report experiment-exposure-change. There is no SDK change. All 9 cases of the suite pass on all three SDKs.

Additional context

  • Do not merge before feat: Add client-side experiment exposure change listener tests sdk-test-harness#602. That PR adds the suite and the experiment-exposure-change capability.
  • An earlier version of this PR also stopped FDv2 partial payloads from notifying for identical data. That change is reverted, because the harness no longer checks identical partial data. Partial payloads still notify for every key, the same as on main. Identical partial data happens in production: when a context's big segment membership changes, Flag Delivery sends every dependent flag again in an xfer-changes payload at unchanged versions. SDK-3688 keeps that finding.
  • With a change listener registered, the browser SDK promotes the connection to streaming even when the mode is set to manual. The test services now set streaming to match the harness initial connection mode, so the polling synchronizer cases keep polling. streaming: false alone does not work: the SDK turns a configured streaming mode into one-shot. Open question: is the promotion in manual mode intended?

Related tickets

  • sdk-3688
  • sdk-3556

Opened from termag

An FDv2 partial payload now notifies change listeners only for keys
that are new or whose data changed. Identical data does not notify.

Generated-by: termag
…services

Add flag change listener commands to the browser and react services.
Add the experiment-exposure-change capability to browser, react, and
vue. Set the streaming option to match the harness initial connection
mode, so that a change listener does not promote polling to streaming.

Generated-by: termag
@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 19243 bytes
Compressed size limit: 33000
Uncompressed size: 106351 bytes

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26376 bytes
Compressed size limit: 44000
Uncompressed size: 171444 bytes

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 34596 bytes
Compressed size limit: 35500
Uncompressed size: 123487 bytes

if (changed.length > 0) {
this.handleFlagChanges(changed, 'init');
}
} else if (type === 'partial') {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: do we have guarantees that flag delivery will send partial update if and only if the flag is updated somehow? Or more conservatively, there may be a reason for the sdk to re-evaluate the flag?

This reverts commit d43e9af. The harness no longer requires that an FDv2 partial payload with identical data gives no notification.

Generated-by: termag
@joker23 joker23 changed the title fix: Prevent flag change events for identical partial updates test: Add experiment exposure change support to client contract test services Nov 19, 2026

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