Add OpenABTest draft experiment and accounting contracts

This commit is contained in:
Anthony Ettinger 2026-09-13 09:16:34 +00:00
parent 123ba2e39a
commit 7fb67375a5
25 changed files with 1410 additions and 12 deletions

View file

@ -0,0 +1,22 @@
{
"openabtest": "0.1-draft",
"producerId": "chovy-server",
"manifestId": "chovy-signup-discount-v1",
"manifestRevision": 1,
"participantId": "participant-opaque-7d12",
"at": "2026-09-15T12:00:00Z",
"id": "event-adjustment-42",
"kind": "adjustment",
"payload": {
"assignmentId": "assignment-42",
"variantId": "signup-10",
"conversionId": "purchase-42",
"adjustmentId": "refund-42",
"currency": "USD",
"amountMinor": -3600,
"reason": "refund",
"proofRefs": [
"refund-proof-42"
]
}
}

View file

@ -0,0 +1,15 @@
{
"openabtest": "0.1-draft",
"producerId": "chovy-server",
"manifestId": "chovy-signup-discount-v1",
"manifestRevision": 1,
"participantId": "participant-opaque-7d12",
"at": "2026-09-15T12:00:00Z",
"id": "event-assignment-42",
"kind": "assignment",
"payload": {
"assignmentId": "assignment-42",
"variantId": "signup-10",
"cohortId": "eligible-referred-customers"
}
}

View file

@ -0,0 +1,69 @@
{
"openabtest": "0.1-draft",
"id": "chovy-signup-discount-v1",
"revision": 1,
"name": "Chovy referred purchase discount",
"state": "draft",
"cohort": {
"id": "eligible-referred-customers",
"eligibilityRule": "Server-verified eligible referral; exclude self-referrals and invalid attribution. Every referred purchase qualifies.",
"purchaseScope": "all-referred-purchases"
},
"assignment": {
"unit": "user",
"authority": "server",
"keyVersion": "1",
"algorithm": "hmac-sha256-persisted-v1",
"persistence": "sticky"
},
"variants": [
{
"id": "signup-5",
"weight": 1,
"parameters": {
"discountBps": 500
}
},
{
"id": "signup-10",
"weight": 1,
"parameters": {
"discountBps": 1000
}
},
{
"id": "signup-20",
"weight": 1,
"parameters": {
"discountBps": 2000
}
}
],
"window": {
"startsAt": "2026-09-14T00:00:00Z",
"endsAt": "2026-10-14T00:00:00Z"
},
"metrics": {
"primary": "retained-profit-per-eligible-visitor",
"denominator": "unique-eligible-participants",
"conversion": "unique-participants-with-confirmed-purchase",
"profit": "reconciled-net-retained-profit",
"minimumEligiblePerVariant": 100,
"minimumObservationSeconds": 604800,
"winnerPolicy": "manual-review"
},
"guardrails": {
"preserveAcceptedOffers": true,
"preserveAccruedCommissions": true,
"requireReconciledCostsForPayout": true,
"onBreach": "pause-new-assignments"
},
"economics": {
"currency": "USD",
"minorUnitExponent": 2,
"unit": "agent-hour",
"listUnitPriceMinor": 40000,
"modeledUnitCostMinor": 10000,
"minimumRetainedUnitProfitMinor": 5000
}
}

View file

@ -0,0 +1,26 @@
{
"openabtest": "0.1-draft",
"producerId": "chovy-server",
"manifestId": "chovy-signup-discount-v1",
"manifestRevision": 1,
"participantId": "participant-opaque-7d12",
"at": "2026-09-15T12:00:00Z",
"id": "event-conversion-42",
"kind": "conversion",
"payload": {
"assignmentId": "assignment-42",
"variantId": "signup-10",
"conversionId": "purchase-42",
"price": {
"offerId": "offer-42",
"acceptedAt": "2026-09-15T11:59:00Z",
"currency": "USD",
"listUnitPriceMinor": 40000,
"chargedUnitPriceMinor": 36000,
"discountBps": 1000,
"quantityMilliUnits": 1000,
"rounding": "half-up",
"totalMinor": 36000
}
}
}

View file

@ -0,0 +1,14 @@
{
"openabtest": "0.1-draft",
"producerId": "chovy-server",
"manifestId": "chovy-signup-discount-v1",
"manifestRevision": 1,
"participantId": "participant-opaque-7d12",
"at": "2026-09-15T12:00:00Z",
"id": "event-eligibility-42",
"kind": "eligibility",
"payload": {
"cohortId": "eligible-referred-customers",
"eligible": true
}
}

View file

@ -0,0 +1,16 @@
{
"openabtest": "0.1-draft",
"producerId": "chovy-server",
"manifestId": "chovy-signup-discount-v1",
"manifestRevision": 1,
"participantId": "participant-opaque-7d12",
"at": "2026-09-15T12:00:00Z",
"id": "event-exposure-42",
"kind": "exposure",
"payload": {
"assignmentId": "assignment-42",
"variantId": "signup-10",
"offerId": "offer-42",
"surface": "checkout"
}
}

View file

@ -0,0 +1,27 @@
{
"openabtest": "0.1-draft",
"producerId": "chovy-server",
"manifestId": "chovy-signup-discount-v1",
"manifestRevision": 1,
"participantId": "participant-opaque-7d12",
"at": "2026-09-15T12:00:00Z",
"id": "event-reconciliation-pending-42",
"kind": "reconciliation",
"payload": {
"assignmentId": "assignment-42",
"variantId": "signup-10",
"conversionId": "purchase-42",
"accountingRevision": 1,
"currency": "USD",
"state": "pending",
"revenueMinor": 36000,
"refundsMinor": 0,
"actualCostMinor": null,
"feesMinor": null,
"affiliateMinor": null,
"retainedProfitMinor": null,
"minimumRetainedProfitMinor": 5000,
"payoutStatus": "withheld",
"proofRefs": []
}
}

View file

@ -0,0 +1,30 @@
{
"openabtest": "0.1-draft",
"producerId": "chovy-server",
"manifestId": "chovy-signup-discount-v1",
"manifestRevision": 1,
"participantId": "participant-opaque-7d12",
"at": "2026-09-15T12:00:00Z",
"id": "event-reconciliation-42",
"kind": "reconciliation",
"payload": {
"assignmentId": "assignment-42",
"variantId": "signup-10",
"conversionId": "purchase-42",
"accountingRevision": 2,
"currency": "USD",
"state": "reconciled",
"revenueMinor": 36000,
"refundsMinor": 0,
"actualCostMinor": 10000,
"feesMinor": 1000,
"affiliateMinor": 20000,
"retainedProfitMinor": 5000,
"minimumRetainedProfitMinor": 5000,
"payoutStatus": "eligible",
"proofRefs": [
"cost-proof-42",
"fees-proof-42"
]
}
}