Agentic AI Atlasby a5c.ai
OverviewWikiGraphFor AgentsEdgesSearchWorkspace
/
GitHubDocsDiscord
i.3Wiki
Agentic AI Atlas · Mock And Fixture Contracts
docs/testing/mock-and-fixture-contractsa5c.ai
Search the atlas/
Wiki · linked records

Article and nearby pages

I.Current articlepp. 1 - 1
Agent Mux And Runtime E2ECoverage And ReportingCurrent Test Command InventoryHarness And Plugin E2EImplementation RoadmapPipeline Integration
I.
Wiki article

docs/testing/mock-and-fixture-contracts

Reading · 4 min

Mock And Fixture Contracts reference

No-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.

Page nodewiki/docs/testing/mock-and-fixture-contracts.mdNearby pages · 11Documents · 0

Continue reading

Nearby pages in the same section.

Agent Mux And Runtime E2ECoverage And ReportingCurrent Test Command InventoryHarness And Plugin E2EImplementation RoadmapPipeline IntegrationPrimary Flow Data PathsQuality GatesStack PermutationsTest LanesTrace Identifiers And Evidence

Mock And Fixture Contracts

No-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.

Fixture Families

Fixture familyProducerConsumersRequired contents
Harness discoveryBabysitter CLIHarness setup tests, docs snippets, CI summariesHarness name, installed flag, capabilities, version when available, redacted paths
Codex transcriptCodex adapter or fixture generatorAgent-mux adapters, transport-mux, WebUI, babysitter-agentPrompt, text deltas, final message, status, usage if safe, error envelope
Claude Code transcriptClaude Code adapter or fixture generatorAgent-mux adapters, transport-mux, WebUI, babysitter-agentPrompt, text deltas, tool-call events, stop reason, final message, error envelope
Agent-core event streamAgent-core testsTransport-mux, babysitter-agent, agent-mux gatewaySession start, deltas, tool calls, cancellation, completion, usage, transport replay metadata
Run journalCore SDK and babysitter-agent testsJournal rebuild/repair, observer, docs reporting, babysitter-agent runtimeRun created, effect requested, task posted, run completed, artifact references
Babysitter plugin sessionAgent-mux plugin/session testsAgent-mux plugin E2E, hooks-mux, SDK run-loop checksPlugin command text, originating agent, Babysitter run ID, terminal state, stop-hook evidence
Transport-mux route transcriptTransport-mux testsTransport-mux route/codec tests, agent-mux launch tests, coverage summariesExposed transport, route, request class, status, response envelope, streaming flag, auth result, metrics delta, redaction status
Transport-mux launch/env artifactAgent-mux launch testsAgent-mux CLI, transport-mux runtime, pipeline summariesHarness, provider, proxyNeeded, proxyReason, exposed transport, redacted proxy URL/token fields, changed env keys
Hook eventHooks mux adaptersHooks-mux CLI/core, agent-mux UI, plugin compilerNormalized hook input, adapter raw input, expected normalized output

Contract Rules

  • Fixtures must be JSON or JSONL unless a package requires a different canonical format.
  • Every fixture must name its lane, provider/harness, schema version, and redaction status.
  • Fixtures captured from live runs must be scrubbed before commit.
  • Mock tests may assert against fixture shape and ordering, but not provider-specific incidental wording.
  • Live model tests must periodically compare their event shape against the committed fixture schema.

Redaction Requirements

Committed fixtures must not include:

  • API keys or token file contents,
  • absolute home-directory credential paths,
  • full provider request payloads containing user secrets,
  • raw environment dumps,
  • unbounded model output from arbitrary prompts.

Fixtures may include:

  • harness names,
  • package versions,
  • redacted path placeholders,
  • sentinel prompt/output tokens,
  • event type names,
  • usage totals when provider policy allows it.

Compatibility Checks

Each fixture family should have a contract test that verifies:

1. the fixture parses, 2. required metadata exists, 3. event ordering is valid, 4. no forbidden secret patterns are present, 5. at least one consumer test imports the fixture.

The first implementation slice should add these checks before adding new live tests, so model-backed output has a deterministic target to compare against.

Live-To-Fixture Reconciliation

Every promoted model-backed scenario should either update or confirm a no-model fixture family.

Live scenarioFixture reconciliation
Codex sentinel promptCompare emitted event types and final message shape with Codex transcript fixture schema
Claude Code sentinel promptCompare text/tool/final event ordering with Claude Code transcript fixture schema
Transport-mux + external harness through agent-muxSave redacted launch-plan, env diff, route transcript, stream metadata, and metrics snapshot; assert they can be replayed through transport-mux parser tests
Transport-mux + agent-coreCompare agent-core event sequence with the committed agent-core event stream fixture and include transport replay metadata
Babysitter-agent bounded processCompare journal lifecycle with run journal fixture: create, effect, post, terminal state; confirm no installer commands were part of the runtime test
Babysitter plugin through agent-muxCompare plugin command, agent-mux session events, Babysitter run ID, and stop-hook evidence with the plugin session fixture
Hooks mux live payloadRedact and replay payload through hooks-mux adapter normalizer tests

A live test that cannot be reconciled to a fixture must explain why the behavior is inherently live-only before it can become release evidence.

Trail

Wiki
Babysitter Docs
Testing Strategy

Mock And Fixture Contracts

Continue reading

Agent Mux And Runtime E2E
Coverage And Reporting
Current Test Command Inventory
Harness And Plugin E2E
Implementation Roadmap
Pipeline Integration
Primary Flow Data Paths
Quality Gates

Page record

Open node ledger

wiki/docs/testing/mock-and-fixture-contracts.md

Documents

No documented graph nodes on this page.