Repository navigation
allow passing a decision point via in assign call - #3414
Open
danoswaltCL wants to merge 1 commit into
Open
danoswaltCL wants to merge 1 commit into
danoswaltCL wants to merge 1 commit into
Conversation
…se to just that one assignment. consolidates DecisionPoint types
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The uncached scoped lookup is case-sensitive while the warm-cache lookup is not, causing previously valid decision-point lookups to fail depending on cache state.
1 open issue
What changed in this PR
Adds optional decision-point scoping to /assign and integrates it into the Java client, reducing per-request assignment work while retaining full-context fetching and experiment-pool selection.
Changes:
- Limits assignment evaluation to the relevant pool and returns only the requested decision point.
- Consolidates decision-point validation and adds scoped-assignment regression tests.
- Updates Java single-condition requests and adds a
--singleDecisionPointload-testing mode.
| File | Description |
|---|---|
packages/backend/test/unit/services/ExperimentAssignmentService.test.ts |
Tests scoped assignment, pooling, and mark consistency. |
packages/backend/test/unit/controllers/validators/ExperimentAssignmentValidator.test.ts |
Tests optional decision-point validation and target defaults. |
packages/backend/src/api/services/ThompsonSamplingRewardService.ts |
Reuses the shared decision-point reference type. |
packages/backend/src/api/services/ExperimentAssignmentService.ts |
Scopes evaluation to relevant pools and filters returned assignments. |
packages/backend/src/api/controllers/validators/RewardValidator.ts |
Uses shared nested decision-point validation. |
packages/backend/src/api/controllers/validators/MarkExperimentValidator.v6.ts |
Inherits shared decision-point validation. |
packages/backend/src/api/controllers/validators/ExperimentAssignmentValidator.ts |
Accepts an optional decision point. |
packages/backend/src/api/controllers/validators/DecisionPointValidator.ts |
Defines shared validation and target normalization. |
packages/backend/src/api/controllers/validators/BatchAssignValidator.ts |
Reuses shared decision-point validation. |
packages/backend/src/api/controllers/ExperimentClientController.v6.ts |
Documents and forwards the scoped-assignment parameter. |
packages/backend/CLAUDE.md |
Documents dormant preview-user behavior. |
clientlibs/java/src/main/resources/org/upgradeplatform/client/quicktest-burst-ui.html |
Adds an assignment-mode selector. |
clientlibs/java/src/main/java/org/upgradeplatform/requestbeans/ExperimentRequest.java |
Adds an optional decision-point request payload. |
clientlibs/java/src/main/java/org/upgradeplatform/client/QuickTestBurst.java |
Adds scoped-request load testing. |
clientlibs/java/src/main/java/org/upgradeplatform/client/ExperimentClient.java |
Shares request handling and scopes uncached single-condition lookups. |
clientlibs/java/CLAUDE.md |
Documents updated lookup and caching behavior. |
Review effort: Balanced
| if (allExperiments != null) { | ||
| toAssignment.onSuccess(allExperiments); | ||
| } else { | ||
| requestAssignments(new ExperimentRequest(this.context, site, target), false, toAssignment); |
Collaborator
Author
There was a problem hiding this comment.
i think this case-sensitivity issue would be resolved by your pr @bcb37
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.

getExperimentConditionmethod to this new usage automaticallyAlso:
Testing showed this to be potentially 30%+ quicker /assign calls, across the board
Note: left out is client-caching of the single decision-point response. I wanted to discuss how to do this, it wasn't as straightforward as one would think. It doesn't seem all that important at this point as there isn't a present usage that a client would return again to an already fetched single-decision-point experiment, so I'm punting this for now....