adobe / adobe/aem-experimentation
Versioned client <-> engine decision contract (+ contract tests)
- Dominant language
- JavaScript
- Stars
- 16
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Part of #66
## Problem
The client and the engine/worker exchange decisions (audience resolutions, experiment assignments, fragment URLs) with an implicit shape. Nothing pins it down, so any conforming worker/engine has to be reverse-engineered against the client.
## Proposal
Define a small, **versioned** normalized decision contract — the shapes exchanged for:
- audience resolution (`{ [name]: boolean }`, or richer),
- experiment assignment (`{ [experimentId]: variant }`),
- rendered decision (URL / JSON / ref),
- the request `context` (`{ visitorId, url, consent, geo, … }`).
Ship **contract tests** validating those shapes on both ends via shared fixtures, so any conforming worker/engine works out of the box.
## Acceptance criteria
- [ ] Documented, versioned contract for the decision + context shapes.
- [ ] Shared fixtures + contract tests exercised by the client resolver.
- [ ] Referenced by the reference worker.
Contributor guide
Research direction
Start by locating the client resolver and the reference worker, then trace how they exchange audience resolutions, experiment assignments, rendered decisions, and request context. Define the versioned shapes and shared fixtures described in the issue, and run contract tests through the client resolver. Done means the contract is documented, both ends exercise the fixtures, and the reference worker is linked to it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100