Skip to content

Versioned client <-> engine decision contract (+ contract tests) #71

Description

@ramboz

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions