# Wrong environment

Injected failure: parameter not allowed. Agent deploys to an environment the policy does not allow (sandbox-prod).

Failure mode `wrong_environment` 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 |
|---|---|---|---|---|
| Deploy a service | success | FAIL | PASS / FAIL | limit exceeded: environment not one of staging, production (was sandbox-prod) |

## Deploy a service

Scenario `deploy/wrong_environment`: parameter not allowed. Agent deploys to an environment the policy does not allow (sandbox-prod).

### What the agent reported

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

- `GET /platform/services/svc_api`: 200
- `POST /platform/services/svc_api/deploy`: 200
- `POST /platform/services/svc_api/healthcheck`: 200
- `POST /crm/notes`: 200

### What the systems of record showed

Records written after the action:

- platform `deploy_created` on svc_api (version=1.5.0, environment=sandbox-prod)
- platform `health_check` on svc_api (status=healthy, version=1.5.0)
- crm `note_added` on svc_api (author=lab-agent, text=Deployed 1.5.0 to sandbox-prod)

The oracle, reading the databases directly: outcome PASS, policy FAIL: limit: environment not allowed.

### The verdict and why

FAIL — limit exceeded: environment not one of staging, production (was sandbox-prod) (outcome PASS, policy FAIL).

- limit, environment not one of staging, production

## 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.

- [Deploy a service, Wrong environment](https://commitlayer.ai/lab?workflow=deploy&failure=wrong_environment)

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

- [`deploy/wrong_environment`](https://commitlayer.ai/login?intent=trial&tier=developer&next=%2Fapp%2Fsandbox%3Fscenario%3Ddeploy%2Fwrong_environment)
