Python library & interactive lab
Test recovery from tool failures.
Inject a failure. Compare recovery code. Check what actually committed.
INC-001 / After a write commits
Lost acknowledgement
The first shipment commits, then its confirmation is lost. A retry may create a second shipment.
2 shipments for 1 order
The first shipment committed before its confirmation was lost. Retrying without an idempotency key committed another shipment.
| Recovery policy | Confirmation | Shipments | Recorded calls | Simulated time | Checks |
|---|---|---|---|---|---|
| Not received | 1 / 1 requested | 2 | 200 ms | Failed | |
| Received | 2 / 1 requested | 3 | 320 ms | Failed | |
| Received | 1 / 1 requested | 3 | 470 ms | Passed |
Run evidence
What this experiment measures
The fixture tries to ship one order. Inventory reads and shipment commits happen in memory. Three scripted policies receive the same fault rules; each runs independently. Timing is simulated by VirtualClock, so these values are not performance benchmarks.
A passed contract means the recorded evidence met this scenario’s checks. It does not measure a language model or prove that a real service is safe. The export includes the configuration, calls, effects, checks, and digest from this result.
ToolStorm 0.2.0 · Report SHA-256 d7e6a5ac771da3f7f0465336917e17e0ba2fc9c874e37e31ee4843529d558ca7
Bring the failure into your test suite.
Wrap a Python function, record committed effects, and keep the recovery as a regression test. Sync and async. No runtime dependencies.
Read the quickstartpip install "toolstorm @ git+https://github.com/shi1720/toolstorm.git@v0.2.0"The lab runs scripted recovery policies against in-memory tools. No language model calls or real shipments.