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
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:
{ [name]: boolean }, or richer),{ [experimentId]: variant }),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