Skip to content

rotate all condition lists in an experiment on mark#3246

Open
bcb37 wants to merge 1 commit into
devfrom
fix/clientlibs-rotate-conditions-by-experiment
Open

rotate all condition lists in an experiment on mark#3246
bcb37 wants to merge 1 commit into
devfrom
fix/clientlibs-rotate-conditions-by-experiment

Conversation

@bcb37

@bcb37 bcb37 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the client libraries’ “within-subject rotation” behavior so that a successful mark rotates all cached assignments belonging to the marked experiment (by experiment id), rather than rotating only the currently-marked decision point (or rotating pre-request). This keeps condition/factor cycling consistent across all decision points that share the same experiment.

Changes:

  • Python: add DataService.rotate_assignments_by_experiment_id() and rotate after a successful mark_decision_point using the response experimentId.
  • JS: add DataService.rotateAssignmentsByExperimentId() and rotate after markDecisionPoint completes successfully.
  • Java: rotate cached conditions after mark completion based on the returned experimentId (and apply rotation across cached experiments).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
clientlibs/python/tests/test_data_service.py Adds unit tests verifying rotation only affects assignments matching a given experiment id, and is a no-op on a cold cache.
clientlibs/python/tests/test_client.py Extends integration-style client tests to ensure mark-driven rotation is gated by the returned experimentId.
clientlibs/python/src/upgrade_client_lib/data_service.py Adds rotate_assignments_by_experiment_id() to rotate all cached assignments for an experiment.
clientlibs/python/src/upgrade_client_lib/client.py Changes mark flow to rotate cached assignments after a successful mark response (by response experiment id).
clientlibs/js/src/DataService/DataService.ts Adds rotateAssignmentsByExperimentId() to rotate all cached assignments belonging to an experiment id.
clientlibs/js/src/DataService/DataService.spec.ts Adds tests for rotating only matching assignments and handling missing cached data.
clientlibs/js/src/ApiService/ApiService.ts Updates markDecisionPoint to rotate cached assignments after receiving a response with experimentId.
clientlibs/js/src/ApiService/ApiService.spec.ts Updates mocks and adds tests to verify post-response rotation behavior.
clientlibs/java/src/main/java/org/upgradeplatform/client/ExperimentClient.java Updates condition rotation to be driven by returned experimentId and applied across cached experiments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bcb37
bcb37 requested a review from danoswaltCL July 23, 2026 21:25
@bcb37 bcb37 linked an issue Jul 23, 2026 that may be closed by this pull request
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.

Update client libraries to rotate conditions by experiment

2 participants