-
Notifications
You must be signed in to change notification settings - Fork 3
feat(rules): mutual-exclusion audience rule (bucketed_into_experience_key) — qs-03 #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
54e5fbb
wf(wf-jssdk-qs03): [SDK-2] shared 8-row mutual-exclusion fixture
abbaseya c9fddd5
wf(wf-jssdk-qs03): [SDK-1] enums — exclusion warning + MutualExclusio…
abbaseya 236ebe6
wf(wf-jssdk-qs03): [SDK-3] tests (RED) — data-unit + integration + br…
abbaseya 0788648
wf(wf-jssdk-qs03): [SDK-3] implementation (GREEN) — DataManager bucke…
abbaseya 8634092
wf(wf-jssdk-qs03): [SDK-3] fix AC3 test — await releaseQueues before …
abbaseya 4942a92
wf(wf-jssdk-qs03): [SDK-4] rules regression lock — fail-closed + AC7 …
abbaseya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,138 @@ | ||
| { | ||
| "specRef": "_bmad-output/planning-artifacts/2026-07-02-convert-js-sdk/qs-03-mutual-exclusion-rule.md#inline-cross-sdk-fixture", | ||
| "description": "qs-03 mutual-exclusion audience rule (bucketed_into_experience_key) cross-SDK fixture. The 8 rows and their expected values are the normative contract, identical across every sibling SDK spec (JS/PHP/Python/Ruby/Android/iOS). Consumed verbatim by packages/rules/tests, packages/data/tests, and packages/js-sdk/tests/browser via a relative filesystem read -- never duplicated. Changing an expected value here is a cross-SDK contract change, not a local test tweak.", | ||
| "config": { | ||
| "experiences": [ | ||
| { | ||
| "id": "100111", | ||
| "name": "exp-a", | ||
| "key": "exp-a", | ||
| "type": "a/b_fullstack", | ||
| "status": "active", | ||
| "audiences": [], | ||
| "goals": [], | ||
| "variations": [ | ||
| { | ||
| "id": "100901", | ||
| "name": "exp-a variation", | ||
| "status": "running", | ||
| "is_baseline": true | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "id": "100222", | ||
| "name": "exp-b", | ||
| "key": "exp-b", | ||
| "type": "a/b_fullstack", | ||
| "status": "active", | ||
| "audiences": [], | ||
| "goals": [], | ||
| "variations": [ | ||
| { | ||
| "id": "100902", | ||
| "name": "exp-b variation", | ||
| "status": "running", | ||
| "is_baseline": true | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "ruleDefaults": { | ||
| "rule_type": "bucketed_into_experience_key", | ||
| "matching": { | ||
| "match_type": "equals" | ||
| } | ||
| }, | ||
| "rows": [ | ||
| { | ||
| "row": 1, | ||
| "description": "empty stored bucketing, non-negated, target exp-a -> visitor not in exp-a -> not matched", | ||
| "storedBucketing": {}, | ||
| "dataStoreOnly": false, | ||
| "ruleValue": "exp-a", | ||
| "negated": false, | ||
| "expectedMatched": false, | ||
| "expectWarn": false | ||
| }, | ||
| { | ||
| "row": 2, | ||
| "description": "empty stored bucketing, negated, target exp-a -> visitor not in exp-a -> NOT-in-exp-a matches", | ||
| "storedBucketing": {}, | ||
| "dataStoreOnly": false, | ||
| "ruleValue": "exp-a", | ||
| "negated": true, | ||
| "expectedMatched": true, | ||
| "expectWarn": false | ||
| }, | ||
| { | ||
| "row": 3, | ||
| "description": "stored bucketing has exp-a's variation (in memory), non-negated, target exp-a -> matched", | ||
| "storedBucketing": { | ||
| "100111": "100901" | ||
| }, | ||
| "dataStoreOnly": false, | ||
| "ruleValue": "exp-a", | ||
| "negated": false, | ||
| "expectedMatched": true, | ||
| "expectWarn": false | ||
| }, | ||
| { | ||
| "row": 4, | ||
| "description": "stored bucketing has exp-a's variation (in memory), negated, target exp-a -> visitor IS in exp-a -> NOT-in-exp-a does not match", | ||
| "storedBucketing": { | ||
| "100111": "100901" | ||
| }, | ||
| "dataStoreOnly": false, | ||
| "ruleValue": "exp-a", | ||
| "negated": true, | ||
| "expectedMatched": false, | ||
| "expectWarn": false | ||
| }, | ||
| { | ||
| "row": 5, | ||
| "description": "stored bucketing has exp-b's variation only (in memory), negated, target exp-a -> visitor not in exp-a -> NOT-in-exp-a matches", | ||
| "storedBucketing": { | ||
| "100222": "100902" | ||
| }, | ||
| "dataStoreOnly": false, | ||
| "ruleValue": "exp-a", | ||
| "negated": true, | ||
| "expectedMatched": true, | ||
| "expectWarn": false | ||
| }, | ||
| { | ||
| "row": 6, | ||
| "description": "empty stored bucketing, non-negated, target exp-zz absent from config -> bucketedRaw resolves false -> not matched, warns naming the unresolved key", | ||
| "storedBucketing": {}, | ||
| "dataStoreOnly": false, | ||
| "ruleValue": "exp-zz", | ||
| "negated": false, | ||
| "expectedMatched": false, | ||
| "expectWarn": true | ||
| }, | ||
| { | ||
| "row": 7, | ||
| "description": "empty stored bucketing, negated, target exp-zz absent from config -> bucketedRaw resolves false -> NOT-in-exp-zz matches, warns naming the unresolved key", | ||
| "storedBucketing": {}, | ||
| "dataStoreOnly": false, | ||
| "ruleValue": "exp-zz", | ||
| "negated": true, | ||
| "expectedMatched": true, | ||
| "expectWarn": true | ||
| }, | ||
| { | ||
| "row": 8, | ||
| "description": "exp-a's variation stored ONLY in the configured DataStore (never written to the in-memory visitor store), negated, target exp-a -> getData() merges the DataStore in -> visitor IS in exp-a -> NOT-in-exp-a does not match", | ||
| "storedBucketing": { | ||
| "100111": "100901" | ||
| }, | ||
| "dataStoreOnly": true, | ||
| "ruleValue": "exp-a", | ||
| "negated": true, | ||
| "expectedMatched": false, | ||
| "expectWarn": false | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.