Skip to content

Release 0.9.0 (review) - #13

Merged
simukappu merged 11 commits into
mainfrom
develop
Nov 6, 2026
Merged

simukappu merged 11 commits into
mainfrom
develop

Conversation

@simukappu

@simukappu simukappu commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Review PR for the 0.9.0 release. Please do not merge on GitHub. After approval: release commit (version + CHANGELOG heading) on develop, fast-forward main, lightweight tag, push, TestPyPI check, PyPI upload (after your OK), GitHub Release.

What to review

  1. CHANGELOG.md (## Unreleased): four features, two bug fixes, documentation entries. No breaking changes.
  2. New public names (approved): --cassette-mode=record-missing / CassetteMode.RECORD_MISSING, iter_request_texts, assert_no_credential_urls / CredentialURLError, drift / drift_ignore on cassette() and LLMCassetteRecorder, --cassette-drift, the agentverify_cassette_drift ini setting, CassetteDriftError.
  3. README and docs/: a shorter README (1041 → about 790 lines) with the details in docs/cassettes.md, docs/tool-results.md, and the API reference docs/reference.md; new screenshots in docs/screenshots/.

Commits

Commit Change
c897213 --cassette-report leaves out files that are not cassettes
f98ffb8 --cassette-mode=record-missing
fbcaf9a iter_request_texts: every text sent to the model, with where it sits, for every provider shape
85a5857 assert_no_credential_urls: URLs with tokens, keys, signatures, or JWTs; values never printed
20123b6 Cassette drift (off / warn / fail)
453adf4 Self-review fixes (/code-review, 10 findings, all fixed)
b1aac4d Strands example on strands.vended_tools.http_request (strands-agents-tools 0.9 removed its own), re-recorded on Bedrock
7e76fb3 A shorter README; details and an API reference in docs/
fb17656 Failure output points at the test: no agentverify frames for its own assertion and cassette errors; assert_all indents each failure
1313712 README screenshots: multi-agent routing and data flow (top), stale cassette, allowed tools

The features come from Yamabiko (the maintainer's home agent, which tests itself with agentverify): AV-7 credential URLs, AV-8 request texts, AV-9 record-missing, AV-10 drift. Yamabiko reviewed the design before implementation.

Verification

  • 1152 tests, 100% coverage; framework tests in their own environments.
  • Every example run as its README says in a fresh venv with no credentials.
  • CI green on develop.

🤖 Generated with Claude Code

Files kept next to the cassettes (such as an approvals list) were listed as
unreadable. The README now also says that the expiry ini setting and options
apply through the cassette fixture, not to an LLMCassetteRecorder created
directly. Both noted by Yamabiko on moving to 0.8.0.
Records only the cassettes whose file does not exist yet, through the same
path as record (sanitized, saved), and replays the rest, so adding one
cassette does not re-record and pay for the others. pytest lists the new
cassettes at the end of the run. Requested from Yamabiko (AV-9).
Every text a request sends the model, as (where, text) pairs: the system
prompt, messages with their role, tool call arguments and tool results with
the tool's name, tool definitions including enum values, and the provider's
other parameters, read alike for every provider shape. Provider ids,
reasoning signatures, and embedded media are left out. Requested from
Yamabiko (AV-8).
Fails when a URL in a request the model was sent carries a credential: a
query name such as token, access_token, security_token, X-Amz-Signature, or
sig, or a JWT in the path or query. Searches every text iter_request_texts
walks, tool results and tool definitions included. extra_patterns adds
regular expressions and ignore drops default names. The error lists where and
the host, never the values. Requested from Yamabiko (AV-7).
With drift="warn" or "fail" (or the agentverify_cassette_drift setting and
--cassette-drift), replay compares what request matching leaves alone: tool
results key by key, the number and roles of the messages, and the provider's
other parameters. warn lists the places that differ in the stale cassettes
summary, fail raises CassetteDriftError; values are never shown. drift_ignore
takes globs over the places. Off by default, since tools that run for real
return something new. Requested from Yamabiko (AV-10).
- iter_request_texts skips provider ids and signatures only in the envelope:
  tool arguments, results, and schemas keep keys named id, data, or
  signature, so a URL under {"data": ...} is checked
- SDK objects in a request (dataclasses, models, tuples) are read like dicts,
  and an OpenAI tool message with a list of parts is a tool result
- assert_no_credential_urls reads the fragment (implicit OAuth tokens),
  decodes HTML entities (&), and splits URLs urlsplit rejects by hand
- drift applies with match_requests=False too
- record-missing keeps no cassette when the block raised
- --cassette-report lists an empty cassette as unreadable
- one relative-path helper and one list of system-prompt keys; the
  --cassette-mode help names record-missing
strands-agents-tools 0.9 removed http_request; the official Weather
Forecaster sample now imports it from strands.vended_tools, part of
strands-agents. The example does the same, drops the strands-agents-tools
dependency, and its cassette is re-recorded on Bedrock with the new tool
(three model calls, two tool calls).
The README keeps each feature's purpose and one example. docs/cassettes.md
holds the cassette rules (recorded and unsupported calls, streaming, the
Responses API, concurrency, tool replay, request matching, drift, expiry and
the report, request texts and credential URLs), docs/tool-results.md the
tool error signals, and docs/reference.md an index of every public name and
pytest option plus what the README only mentions (LLMCassetteRecorder
without the fixture, on_missing, @cassette_tool, step_probe, the result
objects, every error). One real-world example stays in the README and the
others are in the Examples table; budget, latency, and final-output
assertions share a section; the CHANGELOG entries are short.
Every assertion sets __tracebackhide__, so pytest shows a failure at the
test's own line instead of agentverify's internal frames. Request matching,
a missing recording, and the call paths that raise them do the same for
agentverify's own errors only, so an unexpected error inside agentverify
keeps its frames for a bug report. assert_all (MultipleAssertionError)
indents each failure's lines under its number.
docs/screenshots/ holds four, rendered alike from real runs: multi-agent.png
at the top of the README (a supervisor that skipped research, and a math
step that ignored the previous result), stale-cassette.png in Stale Cassette
Detection (a one-line prompt change failing replay with a diff and the
re-record command), safety.png in Allowed Tools (an MCP agent's calls outside
an allow list), and simple.png (a tool call mismatch and a token budget),
kept for later use.
@simukappu simukappu closed this Nov 6, 2026
@simukappu
simukappu merged commit 3f98b0b into main Nov 6, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant