Repository navigation
Conversation
Generated-by: termag
Generated-by: termag
joker23
commented
Nov 13, 2026
Generated-by: termag
Generated-by: termag
Generated-by: termag
joker23
marked this pull request as ready for review
November 20, 2026 20:07
There was a problem hiding this comment.
Risk: medium. Not approved. Cursor Bugbot completed with no findings and Cursor Security Agent did not run; this PR is a non-trivial new listener and experiment-exposure test suite plus a new opt-in capability, which is above the low-risk approval threshold. Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: SDK - Pull Request Router and Approver
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 a client-side suite for a flag that joins an experiment while its
valueandvariationstay the same. Onlyreason.inExperiment,trackEvents,trackReason,version, andflagVersionchange. Wrappers evaluate again only after a change notification, so an SDK that does not notify here loses the exposure events of control users.Each case registers a general flag change listener, delivers the update, and expects a notification for the flag. It then evaluates the flag and checks that the feature event is a full event with the new reason and flag version. A control case on each path sends an identical update and expects no notification.
Delivery paths:
xfer-full)fdv1-fallback)A separate group identifies a new context whose data has the same
versionandflagVersionbut puts the context in the experiment. Comparing versions alone misses this change, so the SDK has to compare the whole result. Its control case identifies a new context with identical data.The suite needs
flag-change-listenersand a new opt-in capability,experiment-exposure-change. The draft FLAGCHG flag change listeners spec makes this behavior part of the general listener contract. Until that spec is accepted, SDKs opt in. After that, the suite gates onflag-change-listenersonly and the capability goes away.docs/service_spec.mddocuments the new capability and now saysflag-change-listenersapplies to client-side SDKs too.The feature event check moves out of
client_side_events_experimentation.gointo a shared helper,expectClientSideExperimentFeatureEvent, so the new suite and the existing experimentation test use the same check. The existing test checks the same things as before.Additional context
putandpatchare not covered. The v3 mock stream only speaks FDv2, and the v2 harness has no listener protocol. feat: Run the test suite over FDv1 and FDv2 with the fdv1 and fdv2 capabilities (V2/V3 consolidation) #562 may make FDv1 stream coverage possible here later. It also touchestestsuite_entry_point.go,service_params.go, andservice_spec.md, so expect a small rebase.-enable-long-running-tests.fdv1Fallback.pollIntervalMs. No earlier test does, so a test service that drops that field times out on that case.X-LD-FD-Fallback: true. The existing directive tests use a 500 on the initializer or a 200 on the stream, so this combination is new.Related tickets
Opened from termag
Note
Overview
Adds client-side harness coverage for experiment exposure: when a flag enters an experiment without changing
valueorvariation, general flag change listeners must still fire so wrappers can re-evaluate and emit exposure events.The new suite (
doClientSideExperimentExposureTests) exercises FDv2 stream (partial and full), FDv2 polling, and FDv1 fallback delivery paths, with control cases that expect no notification on identical updates (except partial stream, where either behavior is allowed). Separate identify cases cover a new context that joins the experiment with unchanged versions versus identical data.SDKs opt in via a temporary
experiment-exposure-changecapability (plusflag-change-listeners), documented inservice_spec.mdalong with clarifying thatflag-change-listenersapplies to client-side SDKs. The client-side test entry point registers the new suite; experimentation event checks are centralized inexpectClientSideExperimentFeatureEventfor reuse.Reviewed by Cursor Bugbot for commit c0912e2. Bugbot is set up for automated code reviews on this repo. Configure here.