{ "schema_version": 1, "title": "Fictional $73 refund, original policy", "input": {"operation": "refund", "order_id": "order-example-730", "amount_cents": 7300, "currency": "USD", "approved": true}, "effects_complete": true, "events": [ {"type": "tool_call", "call_id": "before-1", "name": "issue_refund", "args": {"order_id": "order-example-730", "amount_cents": 7300, "currency": "USD", "idempotency_key": "refund-example-730-a"}}, {"type": "business_effect", "call_id": "before-1", "effect": {"type": "refund", "order_id": "order-example-730", "refund_id": "refund-before-101", "amount_cents": 7300, "currency": "USD"}}, {"type": "tool_result", "call_id": "before-1", "ok": false, "error": "provider_timeout"}, {"type": "tool_call", "call_id": "before-2", "name": "issue_refund", "args": {"order_id": "order-example-730", "amount_cents": 7300, "currency": "USD", "idempotency_key": "refund-example-730-b"}}, {"type": "business_effect", "call_id": "before-2", "effect": {"type": "refund", "order_id": "order-example-730", "refund_id": "refund-before-102", "amount_cents": 7300, "currency": "USD"}}, {"type": "tool_result", "call_id": "before-2", "ok": true, "result": {"status": "refunded", "refund_id": "refund-before-102"}}, {"type": "final_output", "output": {"status": "refunded", "refund_id": "refund-before-102"}} ], "assertions": [ {"id": "one-refund-per-order", "type": "effect_count", "effect_type": "refund", "group_by": "order_id", "min": 1, "max": 1}, {"id": "refund-status", "type": "output_equals", "path": "/status", "value": "refunded"}, {"id": "has-receipt", "type": "required_output", "fields": ["refund_id"]} ] }