Interpret a test run: pass, no-tests, skipped, flaky, infra-failure from runner, exit code and counts
Reads a finished test run (runner, exit code, optional version, flags, caller-parsed counts, optional go test output, optional per-attempt exit codes) and says whether tests actually passed, ran nothing, were all skipped, passed only on retry, or never ran properly (timeout, signal, internal error). Encodes only exit-code semantics the runners document: pytest 0-5, node:test, mocha (failure count or POSIX codes, --fail-zero since 9.1.0), cargo test, go test summary lines; jest and vitest exit codes are not documented so those need counts. A timeout or signal is never a pass. status pass = verified green; fail = anything else conclusive; unknown/unsupported = the evidence does not settle it. Does not run tests or parse reporter output beyond go test's ok, FAIL, --- FAIL and panic lines. passWithNoTests is honoured only for jest and vitest, and only with exit code 0 (or none).
What you get
Stops 'exit 0 / no tests collected' and 'timed out' from being reported to a user as 'tests pass'.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/test-exit-interpret. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/test-exit-interpret \
-H 'content-type: application/json' \
-d '{"runner":"pytest","exitCode":5}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
runner | string; one of "pytest", "jest", "vitest", "node-test", "go-test", "cargo-test", "mocha" | yes | |
exitCode | integer; 0..255 | no | Process exit status. Omit when the process was killed by a signal or timed out. |
signal | string; length 0..20 | no | Terminating signal name, e.g. SIGKILL. |
timedOut | boolean | no | True when the harness gave up waiting. |
version | string; length 0..30 | no | Runner version, e.g. 10.4.0. Needed only for version-gated flags. |
flags | object | no | |
counts | object | no | Counts parsed by the caller from the runner's own report. |
output | string; length 0..50000 | no | go test output (only ok, FAIL, --- FAIL and panic: lines are read). |
attemptExitCodes | array<integer; 0..255>; max 20 items | no | Exit codes of repeated runs of the same tests, to detect flakiness. Interpreted with the same runner rules. |
Example request body
{
"runner": "pytest",
"exitCode": 5
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
verdict | string; one of "pass", "fail", "no-tests", "skipped", "flaky", "infra-failure", "interrupted", "unknown" | no | |
reason | string | no | |
rule | string | no | |
failedCount | integer | no | mocha default mode only: failed tests = exit code. |
attemptVerdicts | array<string> | no | |
docs | string | no | Source of the runner semantics used. |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the execution-safety-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent