Unexpected action and final state
- Expected action
- Escalate to a reviewer
- Observed action
- Issue a $25 refund
- Expected final state
- escalated · $0 refunded
- Observed final state
- refunded · $25 refunded

Guided example · Refund workflow
The tool call looked valid. The action was wrong. Follow the evidence, review the policy change, and see what happens when the same cases run again.
This is an executable synthetic workflow against local order fixtures. The reports are generated by Assevra; they do not describe a customer deployment or production-model benchmark.
Find the failure
For an unauthorized request, the correct result is an escalated order with no refund. The buggy branch executes the refund anyway.
Review the fix
The repaired branch requires both authorization and an amount of $100 or less. Every other request goes to escalation.
No authorization or amount decision protects the side effect.
The example includes both branches so you can reproduce the difference. Assevra suggests a direction for investigation; it does not automatically modify your agent.
Verify the outcome
Each case runs three times. Inputs, acceptance criteria, thresholds, and evaluation policy remain fixed between the before and after runs.
| Case | Expected state | Observed state | Outcome |
|---|---|---|---|
| Eligible requestAuthorized · $25 refund | refunded | refunded | PASS |
| Over the refund limitAuthorized · $250 refund | escalated | refunded | FAIL |
| Unauthorized requestNot authorized · $25 refund | escalated | refunded | FAIL |
| Exactly at the limitAuthorized · $100 refund | refunded | refunded | PASS |
Passing measurements, before → after
After: 95% Wilson interval 75.8%–100.0%
Passing measurements, before → after
After: 95% Wilson interval 75.8%–100.0%
Passing measurements, before → after
After: 95% Wilson interval 75.8%–100.0%
The before workflow fails action correctness and tool contracts. The after workflow passes the three declared dimensions. Twelve repeated trials are a small, correlated sample; the result supports this fixture’s assertions, not a general reliability claim.
Reproduce it on your machine
Install Assevra and execute the included workflow. Open the generated before and after reports in your browser.
Python 3.10+. Installation downloads packages. The example runs locally afterward without an API key.
macOS / Linux · Run each step in order
Use the same folder for every step. Wait for each command to finish successfully before continuing.
python3 --version
python3 -m venv .assevra-venv
.assevra-venv/bin/python -m pip install assevra==0.6.0
.assevra-venv/bin/python -m assevra.reference --out-dir reference-output
If python3 is missing or older than 3.10, install Python, reopen your terminal, and start at step 1. On Linux, if creating the environment fails, install your distribution’s Python venv package first.
Prefer no setup? Try the browser sample →
Open reference-output/before/scorecard.html
and reference-output/after/scorecard.html.
Make it useful for your own workflow
Preserve inputs, tool calls, observed state, case identity, and available trace references.
Choose an integration →Specify permitted actions, forbidden side effects, and the business state you expect to observe.
Explore the dimensions →Rerun the complete declared suite. Use a reviewed, compatible baseline when checking regressions.
Add the release gate →For implementation details, inspect the Python function that runs both workflow branches. The walkthrough and generated reports above can be understood without reading this code.