rotate all condition lists in an experiment on mark#3246
Open
bcb37 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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 successfulmark_decision_pointusing the responseexperimentId. - JS: add
DataService.rotateAssignmentsByExperimentId()and rotate aftermarkDecisionPointcompletes 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.
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.
No description provided.