Skip to content

Releases

agent-crashtest 0.3.1: the Action runs both scenarios, honest PASS reports, quieter output

Choose a tag to compare

@munendra07-tech munendra07-tech released this 27 Nov 13:50

A patch release. No verdict, checker or contract change, and no change of result or exit code for any run: every trial is still judged from the sink's rows by crashtest.checker (the verdict-property tests check every case).

From a maintainer-side test run of v0.3.0 (not counted as an independent tester report):

  • The Action takes a scenario input: refunds (the default, unchanged), refunds-cut-before-request, or all. With all it runs both scenarios one after the other; its result is the worst of the two, its exit-code the most serious, and junit-file lists both reports. CI shows why it matters: a test agent that reports "done" after an error passes refunds alone and fails with all.
  • A PASS that never sent an idempotency key says so. When no request in any trial carried a key, the report's recommended-fix section carries a caveat instead of "nothing to fix". In the refunds scenario: the agent avoided the duplicate some other way (for example a lookup), which can race with a commit in a real system. In the cut scenario: nothing was committed before the retry. The caveat is in all four formats (caveats in JSON, a caveat property in JUnit).
  • crashtest selftest's passing line no longer says your agent's result "can be trusted". It now says the harness's counts are reliable on this machine, and that a PASS covers only the scenario.
  • The connection cut no longer prints a traceback. In refunds-cut-before-request the refund MCP server used to log a full ClientDisconnect traceback ("Exception in ASGI application") on every trial, which read like a crash. It now logs one line: the client disconnected before its request was read, and no tool was called. Other errors keep their traceback.

Also:

  • crashtest --version prints the installed version.
  • Reports say what ran the test: the JSON report has report_schema (the layout's version; keys are only added within a version) and environment (the agent-crashtest, mcp and Python versions, the OS, its release and the machine type), and the JUnit report has the same as env_* properties. No host name, user name, path or environment variable is recorded. The text and Markdown reports are unchanged.
  • A stack file left by a killed crashtest serve is cleaned up. serve now records its process ID in .crashtest-stack.json; when a later command finds that the process is gone, it removes the file and says so on stderr, instead of using URLs that point at nothing.
  • CI runs the full test suite on Windows and macOS, not only on Ubuntu.
  • Docs: a status lookup before retrying (check_refund_status) is no longer presented as equal to an idempotency key; the README, docs/scenarios.md, docs/connect-your-client.md and the example say it can race in a real system. The README's limitations say what a PASS does and does not show, and that the full suite runs in CI on all three systems.
  • New: a Tester report issue form for sharing any result, pass or fail: self-test only or a completed run, both scenarios' results, setup, MCP client or framework, full output, suggestions, and permission to quote.
  • New: CODE_OF_CONDUCT.md (Contributor Covenant 2.1), a pull-request template, docs/testing.md, docs/RELEASING.md and docs/decisions.md. CONTRIBUTING.md's good first issues are brought up to date.
  • For maintainers: tools/triage_report.py reads the issues labelled tester-report and prints the tracker, applying the counting rules and checking that the pasted output supports the chosen result. .github/workflows/reproduce.yml (started by hand) installs a release on a chosen OS and Python version and runs the self-tests and both example agents. Neither posts, labels or closes anything; see docs/testing.md.

Compatibility. Nothing is removed and no default changes. If you parse output:

  • crashtest selftest's passing line has new wording (exit code 0, as before).
  • A PASS report's recommended-fix section can show the caveat where it said "nothing to fix in this scenario" (text and Markdown).
  • The JSON report has a new caveats key (a list, empty unless the caveat applies) under the same report_schema; keys are only ever added within a schema version.
  • JUnit reports can carry a new caveat property.

Install

pip install "agent-crashtest[local] @ git+https://github.com/munendra07-tech/agent-crashtest@v0.3.1"
crashtest selftest

Upgrade from 0.3.0

Install the same way, with @v0.3.1. Nothing to change in your setup: commands, defaults, results and exit codes are as in 0.3.0. In the GitHub Action, change @v0.3.0 to @v0.3.1 and add scenario: all to run both scenarios.

agent-crashtest 0.3.0: stdio, a control token, a test controller, a second scenario

Choose a tag to compare

@munendra07-tech munendra07-tech released this 25 Nov 14:55

Easier to connect, harder for the agent under test to tamper with, and a second fault taken from experiment 008. No verdict, checker or contract change: every trial is still judged from the sink's rows by crashtest.checker, and the reference scenario's reports are byte-identical to 0.2.1's apart from the additive run metadata below.

  • crashtest mcp --stdio serves the same refund MCP server over stdio, for clients that launch a command (Claude Desktop, IDEs, the MCP Inspector). It finds the running sink from --sink-url, CRASHTEST_SINK_URL or the stack file (--stack-file), and exits 2 with a message on stderr when no sink answers. CI checks on Ubuntu, Windows and macOS that the same agent gets the same verdict over stdio and over HTTP.
  • A control token on the sink. /control/* (arming faults, reset) now requires Authorization: Bearer <token>; GET /refunds (the read-only ground truth) stays open. crashtest serve generates the token and stores it in .crashtest-stack.json, never in MCP output; arm, run, selftest, the Action and the experiment runners pass it automatically, and agents started by crashtest run get an environment without it. Docker Compose now requires CRASHTEST_CONTROL_TOKEN to be set before docker compose up; scripts or curl commands that call /control/* directly must send the token.
  • DNS-rebinding protection is on by default for the HTTP MCP server: the Host and Origin headers must name 127.0.0.1, localhost or [::1] (421 / 403 otherwise). Docker keeps it on and lists its container names in MCP_ALLOWED_HOSTS.
  • Client guides in docs/clients/, each marked with its verification status: the Python mcp client and the MCP Inspector's CLI are verified in CI (a new inspector job); Claude Desktop, Claude Code, VS Code, Cursor and the Inspector's web UI are not yet verified.
  • crashtest controller --stdio | --http: a separate MCP server for the developer, never for the agent, with create_test_run, configure_scenario, arm_fault, get_run_status and get_test_report. No reset or delete tool; token-protected over HTTP; verdicts only from the sink through the same checker and report code as crashtest run (a regression test checks both give the same result, verdicts and counts). docs/controller.md.
  • Scenarios. crashtest run <scenario> and crashtest selftest --scenario <scenario>: refunds (the reference, unchanged) and refunds-cut-before-request from experiment 008: a proxy cuts the agent's first call before it reaches the server, so nothing is refunded, yet the agent sees the same error as after a cut that follows the commit. Ground truth: the sink's rows plus the proxy's record, reported per trial as fault_record. docs/scenarios.md has its results table and limitations.
  • Reports carry a run ID, the scenario's name and version, and which driver produced them (crashtest run or the controller): additive JSON keys and JUnit properties, and one extra line in the text and Markdown reports.
  • Framework examples in examples/frameworks/: a Pydantic AI agent and a LangGraph agent, each driven by a scripted model (no API key), checked in CI (naive FAIL, stable key PASS). Frameworks that need a model key are not included.
  • A read-only lookup tool, contributed in PR #15: check_refund_status(order_id) on the refund MCP server says whether a refund exists, changing nothing, and examples/check_status_agent.py looks the refund up after a timeout before retrying.
  • subjects/requirements/crewai.txt warns that it pins a chromadb version with open critical and high advisories, used only to reproduce experiment 003.

Install

pip install "agent-crashtest[local] @ git+https://github.com/munendra07-tech/agent-crashtest@v0.3.0"
crashtest selftest

GitHub Action: uses: munendra07-tech/agent-crashtest@v0.3.0.

Upgrading from 0.2.x: Docker Compose needs CRASHTEST_CONTROL_TOKEN set before docker compose up, and anything calling the sink's /control/* endpoints directly must send Authorization: Bearer <token>. crashtest commands pass the token for you.

agent-crashtest 0.2.1: the Docker images build again

Choose a tag to compare

@munendra07-tech munendra07-tech released this 23 Nov 23:37

A patch release: the Docker images build again.

v0.2.0's Docker build is broken. Since 0.2.0, pyproject.toml installs examples/ as crashtest/examples (the example agents), but the three Dockerfiles copied only src/, so pip install . inside the images failed ("package directory 'examples' does not exist") and docker compose up failed at v0.2.0. v0.2.1 fixes it: each Dockerfile copies examples/.

No other change: pip install, crashtest run refunds, crashtest selftest and the GitHub Action behave as in 0.2.0. The README's install command and Action usage now name @v0.2.1. What 0.2.0 added: see the v0.2.0 release.

Install (Python 3.12 or later, no Docker needed):

pip install "agent-crashtest[local] @ git+https://github.com/munendra07-tech/agent-crashtest@v0.2.1"

Then:

crashtest selftest
crashtest run refunds --agent path/to/my_agent.py

In CI: uses: munendra07-tech/agent-crashtest@v0.2.1.

agent-crashtest 0.2.0: crashtest run refunds, selftest and a GitHub Action

Choose a tag to compare

@munendra07-tech munendra07-tech released this 23 Nov 22:31

One command now tells a developer whether their agent refunds twice when a tool's response is lost, and why. No experiment, results file, verdict or contract text changed; the server, sink, checker and the 0.1.0 commands are reused as they were.

  • crashtest run refunds --agent naive|stable_key|PATH starts the local stack, arms the lost-response fault for a fresh order per trial (--trials, default 5), runs the agent once per order and prints the report.
  • crashtest selftest checks the harness itself before you trust a result about your own agent: it runs crashtest run refunds with both example agents as controls (3 trials each) and passes only if the naive agent FAILs with a duplicate and the fault confirmed in every trial and the stable-key agent PASSes. Exit 0 when both controls behave, 1 when one misbehaves (the harness is at fault, not your agent), 2 for an environment error. No new verdicts.
  • Two example agents in examples/, both short scripts on the plain mcp client and templates for your own: naive_retry_agent.py retries with no idempotency key (FAIL), stable_key_agent.py sends one key per order (PASS). They are installed with the package.
  • The report keeps three parts apart: what was observed (from the sink and the harness), the likely cause (labelled as an inference) and the recommended fix. PASS means every trial's verdict from the checker is correct. Every report states what was tested (one simulated refund tool over MCP and one fault, a lost response), that the tool is a test double writing only to a local PostgreSQL, and the result as "N of N trials": repeatability under the stated configuration, not a rate. --format text|json|markdown|junit, --output, --junit-file, --markdown-file.
  • Exit codes: 0 PASS; 1 a duplicate or lost refund; 2 an environment or configuration error; 3 the fault could not be confirmed. When the sink is correct but the agent's report contradicts it, the run shows WARN and exits 0, or 1 with --fail-on-report-mismatch.
  • A GitHub Action (action.yml): uses: munendra07-tech/agent-crashtest@v0.2.0 with agent, trials and fail-on-duplicate-effect. It writes a JUnit report and the Markdown report to the job summary, and fails on a duplicate refund.
  • CI installs the package from scratch on a clean Ubuntu runner and runs crashtest selftest and both example agents (FAIL, then PASS), and runs the Action itself on both.
  • Tests: the five connection-drop tests in tests/test_client_matrix.py that raced the client's timeout against the proxy's cut now give the client a 10-second timeout, so the cut always comes first. New tests cover crashtest run refunds, its formats and exit codes.
  • The README is a landing page (what, why, quickstart with expected output, how it works, the Action, limitations); the research results follow, unchanged. Issue templates (bug, question, "my agent failed"), good first issues in CONTRIBUTING.md, and Dependabot for pip and GitHub Actions.

Install (Python 3.12 or later, no Docker needed):

pip install "agent-crashtest[local] @ git+https://github.com/munendra07-tech/agent-crashtest@v0.2.0"

Then check the harness on your machine and test an agent:

crashtest selftest
crashtest run refunds --agent path/to/my_agent.py

In CI: uses: munendra07-tech/agent-crashtest@v0.2.0 (see "In CI: the GitHub Action" in the README).

agent-crashtest 0.1.0: crash-test your own MCP client

Choose a tag to compare

@munendra07-tech munendra07-tech released this 23 Nov 20:14

A developer can now install agent-crashtest and crash-test their own MCP client in four commands. No experiment, results file or contract text changed.

  • crashtest serve starts PostgreSQL, the sink and the MCP server with its fake issue_refund tool on this machine, and prints their URLs.
  • crashtest arm ORDER_ID makes the next refund for an order lose its response: the sink commits it, then holds the response past the client's timeout.
  • crashtest verdict ORDER_ID reads the sink and prints how many refunds were committed, the checker's verdict, and whether the client's report agrees with the sink. It exits 0 only for correct.
  • pip install "agent-crashtest[local]": the local extra installs a pip-packaged PostgreSQL, so no Docker is needed.
  • The README opens with a "Use it" section, and docs/connect-your-client.md leads with the commands.

Install (Python 3.12 or later, no Docker needed):

pip install "agent-crashtest[local] @ git+https://github.com/munendra07-tech/agent-crashtest@v0.1.0"

Quick start: the "Use it" section of the README, and docs/connect-your-client.md.