Repository navigation
chore: Advertise user-type capability in contract tests - #446
Merged
Merged
Conversation
Accept old-style users in the client-side initialUser and identify event params, so the harness runs its old user tests against Android. LDContext's Gson adapter already converts old user JSON. SDK-3747
keelerm84
marked this pull request as ready for review
November 25, 2026 13:45
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.


Related issues
SDK-3747. Related harness PRs: launchdarkly/sdk-test-harness#699 and launchdarkly/sdk-test-harness#700.
Describe the solution you've provided
The contract-test service now advertises
user-type. It accepts old-style users inclientSide.initialUserandidentifyEvent.user, and parses them withLDContext's Gson adapter. Withoutuser-type, the harness skips all of its old-user tests on Android.This is a draft to find out which of those tests pass. I expect failures where a legacy user's
custom.kindbecomes the context kind (SDK-3747). Any failures will either go into the suppression files or be fixed in java-core.Note
Overview
Enables the Android contract-test service to participate in harness legacy user scenarios by advertising the
user-typecapability and wiring alternate JSON fields alongside existing context fields.SdkConfigClientSideParamsgainsinitialUser, andIdentifyEventParamsgainsuser. Client creation and identify commands now preferinitialContext/context, falling back to the new user fields when absent—legacy user JSON (nokind) is expected to deserialize throughLDContext’s Gson adapters.Without
user-typein capabilities, the harness skips old-user tests on Android; this change unblocks those runs (known edge cases around legacycustom.kindmay still fail per SDK-3747).Reviewed by Cursor Bugbot for commit 647842e. Bugbot is set up for automated code reviews on this repo. Configure here.