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 Adapter 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, adapters, transport-adapter, hooks muxes, and agent-platform.

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

Continue reading

Nearby pages in the same section.

Agent Adapter 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, adapters, transport-adapter, hooks muxes, and agent-platform.

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 generatorAdapters adapters, transport-adapter, WebUI, agent-platformPrompt, text deltas, final message, status, usage if safe, error envelope
Claude Code transcriptClaude Code adapter or fixture generatorAdapters adapters, transport-adapter, WebUI, agent-platformPrompt, text deltas, tool-call events, stop reason, final message, error envelope
Agent-core event streamAgent-core testsTransport-adapter, agent-platform, adapters gatewaySession start, deltas, tool calls, cancellation, completion, usage, transport replay metadata
Run journalCore SDK and agent-platform testsJournal rebuild/repair, observer, docs reporting, agent-platform runtimeRun created, effect requested, task posted, run completed, artifact references
Babysitter plugin sessionAdapters plugin/session testsAdapters plugin E2E, hooks-adapter, SDK run-loop checksPlugin command text, originating agent, Babysitter run ID, terminal state, stop-hook evidence
Transport-adapter route transcriptTransport-adapter testsTransport-adapter route/codec tests, adapters launch tests, coverage summariesExposed transport, route, request class, status, response envelope, streaming flag, auth result, metrics delta, redaction status
Transport-adapter launch/env artifactAdapters launch testsAdapters CLI, transport-adapter runtime, pipeline summariesHarness, provider, proxyNeeded, proxyReason, exposed transport, redacted proxy URL/token fields, changed env keys
Hook eventHooks adapter adaptersHooks-adapter CLI/core, adapters 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-adapter + external harness through adaptersSave redacted launch-plan, env diff, route transcript, stream metadata, and metrics snapshot; assert they can be replayed through transport-adapter parser tests
Transport-adapter + 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 adaptersCompare plugin command, adapters session events, Babysitter run ID, and stop-hook evidence with the plugin session fixture
Hooks adapter live payloadRedact and replay payload through hooks-adapter 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 Adapter 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.