feat(specs): extend ABTest data model with Bayesian fields - #6834
stevenMevans merged 4 commits into
Conversation
ff72a84 to
4ba0f8e
Compare
Summary by Aikido
⚡ Enhancements
|
4ba0f8e to
ca60e31
Compare
ca60e31 to
3d103e3
Compare
026f725 to
6bb083f
Compare
3d103e3 to
b700fbe
Compare
29fcaf3 to
f7de49b
Compare
026f725 to
fc8a1b6
Compare
f7de49b to
4443e84
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4443e842e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fc8a1b6 to
d954112
Compare
4443e84 to
4f91eb5
Compare
fdaf09f to
8352939
Compare
0abf87e to
0a95144
Compare
55bd737 to
3f77878
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The methods schema lacks its documented uniqueness constraint, and Bayesian creation serialization remains untested.
Review details
Suppressed comments (8)
specs/abtesting-v3/common/parameters.yml:24
- The description rejects duplicate methods, but the array schema does not declare that constraint, so OpenAPI validators still accept values such as
bayesian,bayesian. AdduniqueItems: trueto keep the machine-readable contract aligned with the documented API behavior.
type: array
minItems: 1
items:
$ref: 'schemas/ABTest.yml#/AnalysisMethod'
specs/abtesting-v3/common/schemas/ABTest.yml:94
- The new creation fields are not exercised by the
addABTestsCTS fixture, which still sends noconfiguration. Because these schema properties become request-model fields in every generated client, add a Bayesian creation case containing bothmethodandprimaryMetricso serialization and naming are verified across languages.
method:
$ref: '#/AnalysisMethod'
primaryMetric:
$ref: '#/PrimaryMetric'
specs/abtesting-v3/common/parameters.yml:24
- The description says duplicate methods are invalid, but
minItemsonly rejects an empty list and the schema still accepts values such as["bayesian", "bayesian"]. AdduniqueItems: trueso the OpenAPI contract and generated validation do not permit an input the API documents as invalid.
type: array
minItems: 1
items:
$ref: 'schemas/ABTest.yml#/AnalysisMethod'
specs/abtesting-v3/common/schemas/ABTest.yml:94
- These fields are now accepted in the create request through
ABTestConfiguration, but theaddABTestsCTS fixture still only sends the minimal body and never serializesconfiguration.methodorconfiguration.primaryMetric. Because request CTS runs against each generated language client, add an all-parameters case covering Bayesian creation so this new request contract is exercised.
method:
$ref: '#/AnalysisMethod'
primaryMetric:
$ref: '#/PrimaryMetric'
specs/abtesting-v3/common/schemas/ABTest.yml:94
- (raised by
@copilot-pull-request-reviewer— unresolved) The new creation fields are not exercised by CTS: the existingaddABTestsfixture still sends only the minimal body, while the added fixtures cover only themethodsquery parameter. Add anaddABTestscase withconfiguration.methodandconfiguration.primaryMetric, and assert both fields in the expected request body so model serialization is verified across languages.
method:
$ref: '#/AnalysisMethod'
primaryMetric:
$ref: '#/PrimaryMetric'
specs/abtesting-v3/common/parameters.yml:17
- (raised by
@copilot-pull-request-reviewer— unresolved) The description says duplicate methods are invalid, but this array schema still accepts values such as[frequentist, frequentist]. AdduniqueItems: trueso the OpenAPI contract and generated validation/documentation express the same constraint instead of deferring it entirely to a 422 response.
Duplicate values aren't allowed.
specs/abtesting-v3/common/schemas/ABTest.yml:94
- These new create-request fields are not exercised by CTS: the existing
addABTests.jsoncase has noconfiguration, while the added CTS cases only test themethodsquery parameter. Add anaddABTestscase withconfiguration.method: bayesianandconfiguration.primaryMetric, and assert both values in the request body so generation/serialization is covered across languages. (raised by@copilot-pull-request-reviewer— unresolved)
method:
$ref: '#/AnalysisMethod'
primaryMetric:
$ref: '#/PrimaryMetric'
specs/abtesting-v3/common/parameters.yml:24
- The description rejects duplicate methods, but this array schema currently accepts them. Add
uniqueItems: trueso OpenAPI validation and generated documentation express the same request constraint instead of deferring it entirely to a 422 response. (raised by@copilot-pull-request-reviewer— unresolved)
type: array
minItems: 1
items:
$ref: 'schemas/ABTest.yml#/AnalysisMethod'
- Files reviewed: 11/11 changed files
- Comments generated: 0 new
- Review effort level: Balanced
0a95144 to
82f22e7
Compare
3f77878 to
1543400
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82f22e7b28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
63cdcb5 to
2b60dc3
Compare
1543400 to
bb6471b
Compare
2b60dc3 to
87598d0
Compare
4350404
87598d0 to
4350404
Compare
3876bad
into
fix/abtesting-v3/optional-pvalue
🧭 What and Why
Supports the Bayesian A/B test method and its result fields. Users can select frequentist or Bayesian analysis when creating a test and inspect the corresponding Bayesian metric results.
🎟 JIRA Ticket: OPTIM-2775
Changes included:
methodandprimaryMetrictoABTestConfiguration.bayesianmetric result withprobabilityToBeBetter,relativeEffectCILow, andrelativeEffectCIHigh.revenue_per_searchresult name, currency dimension, mean, and winsorized value metadata.🧪 Test
yarn specs:lint specs/abtesting-v3/yarn cli build specs abtesting-v3PR Stack