---
title: "Record Harness Failed Issue Build"
method: POST
path: "/api/rooster/issues/{issue_id}/build-harness-failed"
tags: ["rooster"]
---

# Record Harness Failed Issue Build

`POST /api/rooster/issues/{issue_id}/build-harness-failed`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/rooster/issues/{issue_id}/build-harness-failed`
- Auth: none declared

`tools/rooster_worker/drain.py` calls this instead of `/build-failed`
when the build's own machinery broke -- a timeout, a checkout that never
started, CI that never reported, a merge or crash that has nothing to do
with the fix -- rather than a build that ran, reasoned, and produced a
wrong or failing change. See `issues_service.record_harness_failure` for
the full contract: this does NOT spend a build attempt, and past a
bounded remediation ladder it self-files a real defect against Rooster's
own harness instead of ever landing "needs a person" on someone's Today
for a fix nobody actually tried.

`principal` is passed through as BOTH `actor_principal_id` and
`filer_principal_id` -- the calling agent's own authenticated identity
is who touched the row and who a self-filed defect is authored by,
exactly the same reuse `record_issue_intake_attempt_failed` above makes
for the identical reason: never the reporter, who did not diagnose this.

## Path parameters

- `issue_id` string, uuid, required

## Request body

- HarnessFailedBuildRequest
  - `failure_class` string, required
  - `detail` string

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
