Skip to main content

diagnose_run

Everything needed to diagnose a failed run, in one call: the failing tests with fuller error messages, the feature's current Gherkin, the executed spec sources, artifact download links, and the log tail. It replaces the get_runread_fileget_run_artifacts round trips an agent otherwise needs before it can fix anything.

Request

GET /api/v1/ops/projects/{project}/runs/{runId}/diagnosis
ParameterInTypeRequiredDescription
projectpathstringyesThe project's public id.
runIdpathintegeryesThe run id.
curl -H "Authorization: Bearer $TESTVIBE_API_KEY" \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/runs/214/diagnosis"

Response

{
"runId": 214,
"status": "failed",
"verdict": "failed",
"featureId": 12,
"featureName": "Login Functionality",
"config": "Default",
"siteUrl": "https://demo.example",
"finishedUtc": "2026-06-11T09:15:42Z",
"summary": { "total": 3, "passed": 2, "failed": 1 },
"failures": [
{
"name": "Login > locked out user",
"status": "failed",
"durationMs": 12044,
"error": "TimeoutError: locator.click: Timeout 10000ms exceeded …"
}
],
"featureStatus": "generated",
"gherkin": "Feature: Login Functionality\n …",
"specs": [
{ "path": "Features/Default/Login Functionality.js", "content": "// executed spec source …" }
],
"log": "…last 4000 chars of the run log…",
"artifacts": [
{ "kind": "screenshot", "path": "…", "size": 48211, "url": "https://…(short-lived)" }
],
"hint": "Selector or timing failures in the spec usually mean the Gherkin needs tightening …"
}

A run that passed returns "verdict": "passed" with the summary and no failure context; a run still executing returns "verdict": "running" — wait for it first (wait_for_run).

FieldNotes
failuresNon-passed tests only, errors trimmed at 6,000 chars (vs 1,500 in get_run).
gherkin / featureStatusThe feature's current source — absent when the feature was deleted since the run.
specsThe executed spec files' stored content (first 5 files, 8,000 chars each; specsTruncated: true when capped).
artifactsSame short-lived links as get_run_artifacts.

Errors

HTTPWhen
404 not_foundNo such run in this project.