# Wrong customer

Injected failure: agent refunds the wrong order. Action recorded for order_1001, tools called on order_1005.

Failure mode `wrong_customer` of the CommitLayer failure matrix, on 1 of its 8 workflows. Each run below is the sandbox's scripted agent acting on the sandbox's fake systems of record under the injected failure, an oracle reading those systems' databases, and the verdict of engine 1.0.0 from the systems of record alone. The accounts, orders and amounts are the sandbox's and describe no real customer. Last changed 2026-11-13.

| Workflow | Agent reported | Oracle (policy) | CommitLayer (outcome / policy) | Why |
|---|---|---|---|---|
| Refund a customer | success | FAIL | FAIL / FAIL | No refund was created in payments |

## Refund a customer

Scenario `refund/wrong_customer`: agent refunds the wrong order. Action recorded for order_1001, tools called on order_1005.

### What the agent reported

The agent reported success. Its calls, and what it saw come back:

- `GET /orders/order_1005`: 200
- `POST /payments/refunds`: 200
- `POST /orders/order_1005/status`: 200
- `POST /crm/notes`: 200
- `POST /tickets/notify`: 200

Agent notes: reported order_1001 but acted on order_1005.

### What the systems of record showed

Records written after the action:

- payments `refund_created` on order_1005 (amount=180, currency=USD)
- orders `order_status_changed` on order_1005 (status=refunded)
- crm `note_added` on order_1005 (author=lab-agent, text=Refunded 180.0 USD per customer request)
- tickets `customer_notified` on order_1005 (channel=email)

The oracle, reading the databases directly: outcome FAIL, policy FAIL: missing payments.refund_created; missing orders.order_status_changed; missing crm.note_added; missing tickets.customer_notified.

Effects on a record the action never named: order_1005:order_status_changed, order_1005:refund_created.

### The verdict and why

FAIL — No refund was created in payments (outcome FAIL, policy FAIL).

- expected effect, payments.refund_created observed within 10m of the action: No refund was created in payments
- expected effect, orders.order_status_changed observed within 10m of the action where status=refunded: Order did not move to refunded
- expected effect, crm.note_added observed within 10m of the action: No CRM note was added
- expected effect, tickets.customer_notified observed within 10m of the action: Customer was not notified

Reported as effects with no action behind them: order_1005:customer_notified, order_1005:note_added, order_1005:order_status_changed, order_1005:refund_created.

## Run it in the Failure Lab

The Failure Lab replays each run above: the agent's calls, the records the systems held and the verdict. No account is needed. The verdict comes from the production engine while you watch.

- [Refund a customer, Wrong customer](https://commitlayer.ai/lab?workflow=refund&failure=wrong_customer)

The sandbox in the app runs the exact scenario in your own workspace, as a verified action:

- [`refund/wrong_customer`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Drefund%2Fwrong_customer)
