test: declare client-prereq-cycle-detection capability in wrappers#1823
Merged
Conversation
Adds the `client-prereq-cycle-detection` capability to each wrapper's contract-test service so the sdk-test-harness exercises cycle scenarios against them. Covers react, react-native, electron, and node-client; vue has no contract-test service (jest-only), so nothing to declare. The defensive cycle guard itself lives in the shared @launchdarkly/js-client-sdk-common package (v1.30.0), which every wrapper already depends on. Each wrapper's variation() is a direct passthrough to the shared LDClientImpl, so no wrapper-specific code changes are needed.
Contributor
|
@launchdarkly/js-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk size report |
Contributor
|
@launchdarkly/js-client-sdk-common size report |
Contributor
|
@launchdarkly/browser size report |
tanderson-ld
marked this pull request as ready for review
July 23, 2026 14:27
joker23
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
client-prereq-cycle-detectioncapability to each wrapper's contract-test service so the sdk-test-harness exercises cycle scenarios against them. This closes the wrapper subtasks under the parent cycle-protection effort.Tracker: SDK-2711 (React), SDK-2712 (React Native), SDK-2713 (Electron), SDK-2714 (Node client), SDK-2715 (Vue). Parent: SDK-2695.
Context
The defensive prerequisite-cycle guard lives in the shared
@launchdarkly/js-client-sdk-commonpackage. It shipped as v1.30.0 in release #1805 (merged 2026-07-21), which cascaded fresh releases to every wrapper that depends on it:@launchdarkly/js-client-sdk-common@launchdarkly/js-client-sdk@launchdarkly/node-client-sdk@launchdarkly/react-native-client-sdk@launchdarkly/react-sdk@launchdarkly/vue-client-sdkUsers installing the latest wrapper from npm get the cycle-guarded shared library transitively, so no dependency bumps are needed in this PR — release-please's
node-workspaceplugin already handled the cascade.@launchdarkly/electron-client-sdkis pre-release (0.0.1, unpublished); when it first publishes, itsworkspace:^reference resolves to the current shared version.Each wrapper's
variation()is a direct passthrough to the sharedLDClientImpl, so the guard flows through unchanged. Wrappers only need to declare the harness capability so the matching contract tests activate.Changes
Four one-line additions, one per wrapper contract-test service:
packages/sdk/react/contract-tests/app/TestHarnessWebSocket.tspackages/sdk/react-native/contract-tests/entity/src/TestHarnessWebSocket.tspackages/sdk/electron/contract-tests/entity/src/main.tspackages/sdk/node-client/contract-tests/src/index.tsVue is omitted intentionally: its wrapper package has no contract-test service (jest-only unit tests). Its coverage is provided algorithmically by the shared library.
Test plan
yarn installclean.events/summary events/prerequisites/handles cycles/*andevents/prerequisite events handle cycles/*scenario.Note
Low Risk
Test-harness capability strings only; no production SDK or evaluation logic changes.
Overview
Adds
client-prereq-cycle-detectionto the capability lists returned by the React, React Native, Electron, and Node client contract-test services so the sdk-test-harness runs prerequisite cycle scenarios against those wrappers.This is harness metadata only; cycle handling remains in shared
@launchdarkly/js-client-sdk-common. Vue is unchanged (no contract-test service).Reviewed by Cursor Bugbot for commit d1bceb0. Bugbot is set up for automated code reviews on this repo. Configure here.