Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Seeded chaos: `chaos.seed`, `--chaos-seed`, `x-aimock-chaos-seed`, `resetChaosOccurrences` (#618)
- Seeded hits add headers and journal fields; `chaosKeysMax`/`--chaos-keys-max` cap keys (#618)
- Recorder writes `requestHash`; changed replays get journal `staleFixture` and a warning (#638)

## [1.48.1] - 2026-11-20

Expand Down
26 changes: 26 additions & 0 deletions docs/record-replay/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,32 @@ <h2>Drift Detection Metadata</h2>
may no longer reflect what the real provider would return for the current prompt.
</p>

<h3 id="stale-fixtures">Stale Fixtures</h3>
<p>
The recorder also writes <code>metadata.requestHash</code>, a hash of the request it
recorded on. It covers the messages (system prompt and tool results included), the tool
definitions, <code>tool_choice</code>, <code>response_format</code>,
<code>temperature</code>, <code>max_tokens</code> and the model name without its date
suffix. It is taken after <code>requestTransform</code>, in canonical JSON, so key order
and whitespace do not change it. Headers, the stream flag and other transport details are
not covered. The hash is written only when the request has a system prompt or tools, so a
request with neither is never checked.
</p>
<p>
At replay, when a request matches a fixture that has a <code>requestHash</code> but hashes
differently, the request has changed since the recording (for example, a tool now returns
<code>{"blocked":true}</code> instead of <code>{"refunded":500}</code>). aimock still
serves the fixture as before, adds <code>response.staleFixture</code> to the journal entry
with the recorded hash (<code>expected</code>) and this request&rsquo;s
(<code>actual</code>), and logs one <code>STALE FIXTURE</code> warning. Fixtures without a
<code>requestHash</code> (hand-written ones and older recordings) are never checked.
</p>
<p>
Content that changes on every run, such as dates, timestamps or random IDs, changes the
hash too. Normalize it with <code>requestTransform</code>, or every replay of that fixture
is flagged.
</p>

<h2 id="snapshot-style-recording">Snapshot-Style Recording</h2>
<p>
When the <code>X-Test-Id</code> header is present on a request, aimock uses
Expand Down
5 changes: 5 additions & 0 deletions etc/aimock-a2a.import.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions etc/aimock-a2a.require.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions etc/aimock-agui.import.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions etc/aimock-agui.require.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions etc/aimock-index.import.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions etc/aimock-index.require.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions etc/aimock-jest.import.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions etc/aimock-jest.require.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions etc/aimock-mcp.import.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions etc/aimock-mcp.require.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions etc/aimock-vector.import.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions etc/aimock-vector.require.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions etc/aimock-vitest.import.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions etc/aimock-vitest.require.api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading