# Ineligible order

Injected failure: precondition violated. Agent refunds an order that had already shipped (order_1003).

Failure mode `ineligible_order` 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 | PASS / FAIL | Order was not in a refundable state |

## Refund a customer

Scenario `refund/ineligible_order`: precondition violated. Agent refunds an order that had already shipped (order_1003).

### What the agent reported

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

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

### What the systems of record showed

Records written after the action:

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

The oracle, reading the databases directly: outcome PASS, policy FAIL: precondition: order not paid.

### The verdict and why

FAIL — Order was not in a refundable state (outcome PASS, policy FAIL).

- precondition, latest orders.order_status before the action had status=paid: Order was not in a refundable state

### Three models on the same injected failure

From the [benchmark](https://commitlayer.ai/benchmark), where a model drove the agent instead of a script. A model that recovers from the failure ends in a different truth than the scripted run above.

| Model | Agent reported | Trace-only judge | Truth | CommitLayer |
|---|---|---|---|---|
| Anthropic | failure | FAIL | FAIL | FAIL |
| OpenAI | failure | FAIL | FAIL | FAIL |
| Google | failure | FAIL | FAIL | FAIL |

## 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, Ineligible order](https://commitlayer.ai/lab?workflow=refund&failure=ineligible_order)

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

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