Agentic AI Atlasby a5c.ai
OverviewWikiGraphFor AgentsEdgesSearchWorkspace
/
GitHubDocsDiscord
iiRecord
Agentic AI Atlas · Mock And Fixture Contracts
page:docs-testing-mock-and-fixture-contractsa5c.ai
Search record views/
Record · tabs

Available views

II.Record viewspp. 1 - 1
overviewarticlejsongraph
II.
Page JSON

page:docs-testing-mock-and-fixture-contracts

Structured · live

Mock And Fixture Contracts json

Inspect the normalized record payload exactly as the atlas UI reads it.

File · wiki/docs/testing/mock-and-fixture-contracts.mdCluster · wiki
Record JSON
{
  "id": "page:docs-testing-mock-and-fixture-contracts",
  "_kind": "Page",
  "_file": "wiki/docs/testing/mock-and-fixture-contracts.md",
  "_cluster": "wiki",
  "attributes": {
    "nodeKind": "Page",
    "sourcePath": "docs/testing/mock-and-fixture-contracts.md",
    "sourceKind": "repo-docs",
    "title": "Mock And Fixture Contracts",
    "displayName": "Mock And Fixture Contracts",
    "slug": "docs/testing/mock-and-fixture-contracts",
    "articlePath": "wiki/docs/testing/mock-and-fixture-contracts.md",
    "article": "\n# Mock And Fixture Contracts\n\nNo-model tests are only valuable if their mocks describe the same contracts live providers must satisfy. This document defines fixture expectations for Codex, Claude Code, agent-core, agent-mux, transport-mux, hooks muxes, and babysitter-agent.\n\n## Fixture Families\n\n| Fixture family | Producer | Consumers | Required contents |\n| --- | --- | --- | --- |\n| Harness discovery | Babysitter CLI | Harness setup tests, docs snippets, CI summaries | Harness name, installed flag, capabilities, version when available, redacted paths |\n| Codex transcript | Codex adapter or fixture generator | Agent-mux adapters, transport-mux, WebUI, babysitter-agent | Prompt, text deltas, final message, status, usage if safe, error envelope |\n| Claude Code transcript | Claude Code adapter or fixture generator | Agent-mux adapters, transport-mux, WebUI, babysitter-agent | Prompt, text deltas, tool-call events, stop reason, final message, error envelope |\n| Agent-core event stream | Agent-core tests | Transport-mux, babysitter-agent, agent-mux gateway | Session start, deltas, tool calls, cancellation, completion, usage, transport replay metadata |\n| Run journal | Core SDK and babysitter-agent tests | Journal rebuild/repair, observer, docs reporting, babysitter-agent runtime | Run created, effect requested, task posted, run completed, artifact references |\n| Babysitter plugin session | Agent-mux plugin/session tests | Agent-mux plugin E2E, hooks-mux, SDK run-loop checks | Plugin command text, originating agent, Babysitter run ID, terminal state, stop-hook evidence |\n| Transport-mux route transcript | Transport-mux tests | Transport-mux route/codec tests, agent-mux launch tests, coverage summaries | Exposed transport, route, request class, status, response envelope, streaming flag, auth result, metrics delta, redaction status |\n| Transport-mux launch/env artifact | Agent-mux launch tests | Agent-mux CLI, transport-mux runtime, pipeline summaries | Harness, provider, `proxyNeeded`, `proxyReason`, exposed transport, redacted proxy URL/token fields, changed env keys |\n| Hook event | Hooks mux adapters | Hooks-mux CLI/core, agent-mux UI, plugin compiler | Normalized hook input, adapter raw input, expected normalized output |\n\n## Contract Rules\n\n- Fixtures must be JSON or JSONL unless a package requires a different canonical format.\n- Every fixture must name its lane, provider/harness, schema version, and redaction status.\n- Fixtures captured from live runs must be scrubbed before commit.\n- Mock tests may assert against fixture shape and ordering, but not provider-specific incidental wording.\n- Live model tests must periodically compare their event shape against the committed fixture schema.\n\n## Redaction Requirements\n\nCommitted fixtures must not include:\n\n- API keys or token file contents,\n- absolute home-directory credential paths,\n- full provider request payloads containing user secrets,\n- raw environment dumps,\n- unbounded model output from arbitrary prompts.\n\nFixtures may include:\n\n- harness names,\n- package versions,\n- redacted path placeholders,\n- sentinel prompt/output tokens,\n- event type names,\n- usage totals when provider policy allows it.\n\n## Compatibility Checks\n\nEach fixture family should have a contract test that verifies:\n\n1. the fixture parses,\n2. required metadata exists,\n3. event ordering is valid,\n4. no forbidden secret patterns are present,\n5. at least one consumer test imports the fixture.\n\nThe first implementation slice should add these checks before adding new live tests, so model-backed output has a deterministic target to compare against.\n\n## Live-To-Fixture Reconciliation\n\nEvery promoted model-backed scenario should either update or confirm a no-model fixture family.\n\n| Live scenario | Fixture reconciliation |\n| --- | --- |\n| Codex sentinel prompt | Compare emitted event types and final message shape with Codex transcript fixture schema |\n| Claude Code sentinel prompt | Compare text/tool/final event ordering with Claude Code transcript fixture schema |\n| Transport-mux + external harness through agent-mux | Save redacted launch-plan, env diff, route transcript, stream metadata, and metrics snapshot; assert they can be replayed through transport-mux parser tests |\n| Transport-mux + agent-core | Compare agent-core event sequence with the committed agent-core event stream fixture and include transport replay metadata |\n| Babysitter-agent bounded process | Compare journal lifecycle with run journal fixture: create, effect, post, terminal state; confirm no installer commands were part of the runtime test |\n| Babysitter plugin through agent-mux | Compare plugin command, agent-mux session events, Babysitter run ID, and stop-hook evidence with the plugin session fixture |\n| Hooks mux live payload | Redact and replay payload through hooks-mux adapter normalizer tests |\n\nA live test that cannot be reconciled to a fixture must explain why the behavior is inherently live-only before it can become release evidence.\n",
    "documents": []
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "page:docs-testing",
      "to": "page:docs-testing-mock-and-fixture-contracts",
      "kind": "contains_page"
    }
  ]
}

Shortcuts

Back to overview
Open graph tab