Repository navigation
optional decision point sent in assign - #3410
Draft
danoswaltCL wants to merge 1 commit into
Draft
danoswaltCL wants to merge 1 commit into
danoswaltCL wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Single-condition lookups now miss case-insensitive matches on a cold cache and issue repeated HTTP requests rather than caching focused responses.
2 open issues
What changed in this PR
Adds optional decision-point scoping to /v6/assign, reducing assignment work while retaining the full-context backend cache. Updates the Java client's single-condition lookup to use scoped requests.
Changes:
- Limits assignment processing to the relevant experiment pool and shares pool selection between assign and mark.
- Consolidates decision-point validation and adds scoped-assignment regression tests.
- Adds optional decision-point request data to the Java SDK.
| File | Description |
|---|---|
packages/backend/test/unit/services/ExperimentAssignmentService.test.ts |
Tests scoped assignment, pool selection, and mark consistency. |
packages/backend/test/unit/controllers/validators/ExperimentAssignmentValidator.test.ts |
Tests optional decision points and target normalization. |
packages/backend/src/api/services/ThompsonSamplingRewardService.ts |
Uses the shared decision-point reference type. |
packages/backend/src/api/services/ExperimentAssignmentService.ts |
Narrows experiment pools and filters scoped assignments. |
packages/backend/src/api/controllers/validators/RewardValidator.ts |
Reuses shared 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 nested decision point. |
packages/backend/src/api/controllers/validators/DecisionPointValidator.ts |
Defines shared validation and target normalization. |
packages/backend/src/api/controllers/validators/BatchAssignValidator.ts |
Inherits shared decision-point validation. |
packages/backend/src/api/controllers/ExperimentClientController.v6.ts |
Documents and forwards assignment scoping. |
packages/backend/CLAUDE.md |
Adds documentation about dormant preview-user behavior. |
clientlibs/java/src/main/java/org/upgradeplatform/requestbeans/ExperimentRequest.java |
Adds optional decision-point request fields. |
clientlibs/java/src/main/java/org/upgradeplatform/client/ExperimentClient.java |
Sends scoped requests when the full-response cache is empty. |
clientlibs/java/CLAUDE.md |
Documents Java lookup and caching behavior. |
Review effort: Balanced
| } else { | ||
| // Still filtered client-side: a server without decisionPoint support drops the field and returns the | ||
| // whole context. | ||
| requestAssignments(new ExperimentRequest(this.context, site, target), false, toAssignment); |
| } else { | ||
| // Still filtered client-side: a server without decisionPoint support drops the field and returns the | ||
| // whole context. | ||
| requestAssignments(new ExperimentRequest(this.context, site, target), false, toAssignment); |
…rimentCondition, normales decision-point types
danoswaltCL
force-pushed
the
wip/assign-single-dp-response
branch
from
November 2, 2026 17:40
4d24917 to
0e51947
Compare
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.

Also to note:
This dramatically improved times in local testing.