---
title: "(dev only) Fabricate failing eval runs and fire the real eval.failed emitter"
method: POST
path: "/v1/evals/synthesize-failure"
tags: ["evals", "evals"]
---

# (dev only) Fabricate failing eval runs and fire the real eval.failed emitter

`POST /v1/evals/synthesize-failure`

Fabricate failing eval runs for an agent and run the REAL ENG-604 emitter.

Exercises the full classification/escalation/digest/dedupe-key path that plain
``test-send`` bypasses: builds the ``eval.failed`` payload exactly as the eval
orchestrator would, then enqueues ``dispatch`` (the notify Celery task) — so a
background worker is required for the message to actually deliver.

## Request body

- SynthesizeEvalFailureRequest — Fabricate failing eval runs for one agent and fire the REAL ``eval.failed`` emitter. Dev-only (the route 404s in production). ``n_failures==1`` produces the single payload shape; ``>1`` produces the digest shape. ``failure_kind='quality'`` writes ``COMPLETED`` runs with a failing score (these feed the sustained-failure window that escalates to ``critical``); ``'error'`` writes ``ERRORED`` runs with no score (these never increment the sustained window).
  - `agent_id` string, uuid, required
  - `n_failures` integer
  - `failure_kind` 'quality' | 'error'
  - `score` number
  - `threshold` number

## Response `200`

Successful Response

- SynthesizeEvalFailureResponse — The fabricated session/runs plus the exact payload handed to ``dispatch``. ``payload`` is ``{}`` and ``dispatched`` is ``False`` only if the emitter found nothing notifiable (should not happen for the shapes this endpoint fabricates).
  - `session_id` string, uuid, required
  - `eval_run_ids` string[], required
  - `payload` object, required
  - `severity` string, nullable, required
  - `sustained_count` integer, required
  - `dispatched` boolean, required
  - `task_id` string, nullable, required

## Other responses

- `400` — Bad request
- `401` — Authentication required
- `422` — Validation Error

---

[API](https://skmtc.net/oneloop-hq/apis/feather-api.md) · [All operations](https://skmtc.net/oneloop-hq/apis/feather-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneloop-hq/feather-api/versions/888bdd5c076e/schema)
