# WritersLogic Test Exit Code Interpreter

> WritersLogic Test Exit Code Interpreter is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Interprets the exit code and metadata of a finished test run to determine whether tests passed, failed, were skipped, or encountered an error, using runner-specific exit code semantics.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/test-exit-interpret?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-test-exit-code-interpreter-42ed9c28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jsHFVrjlAoDgI6pzl3kl9

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability writerslogic-test-exit-code-interpreter-42ed9c28 -d '<json body>'
```

Example prompt: My pytest run finished with exit code 1, 47 total tests, 3 failed, and 44 passed — can you interpret whether that counts as a conclusive failure or something else?

## When to prefer this

Use this endpoint when you need to programmatically determine whether a completed test run was a genuine pass, based on runner-specific exit code semantics — especially in CI/CD pipelines where you cannot re-run tests and need a reliable verdict. Prefer this over ad-hoc exit code checks when handling edge cases like all-skipped runs, flaky retries, timeouts, signals, or version-gated flags like mocha's --fail-zero.

## Known failure modes

- Unsupported runner or undocumented exit code returns status 'unknown'
- Missing counts for jest/vitest (which lack documented exit codes) results in 'unknown'
- Signal or timedOut=true always yields a non-pass result regardless of exit code
- Counts inconsistent with exit code may produce 'unknown' or 'fail'
- Version not supplied when needed for version-gated flags (e.g. mocha --fail-zero) may result in incorrect classification

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

A structured verdict on the test run: a status of 'pass', 'fail', or 'unknown/unsupported', along with a classification such as all-skipped, no-tests-run, passed-on-retry, timeout, signal-terminated, or conclusive failure — based on the runner's documented exit code semantics and provided metadata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "flags": {
   "type": "object",
   "properties": {
    "failZero": {
     "type": "boolean"
    },
    "posixExitCodes": {
     "type": "boolean"
    },
    "passWithNoTests": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "counts": {
   "type": "object",
   "properties": {
    "todo": {
     "type": "integer",
     "maximum": 10000000,
     "minimum": 0
    },
    "flaky": {
     "type": "integer",
     "maximum": 10000000,
     "minimum": 0,
     "description": "Tests that failed then passed on retry."
    },
    "total": {
     "type": "integer",
     "maximum": 10000000,
     "minimum": 0
    },
    "failed": {
     "type": "integer",
     "maximum": 10000000,
     "minimum": 0
    },
    "passed": {
     "type": "integer",
     "maximum": 10000000,
     "minimum": 0
    },
    "skipped": {
     "type": "integer",
     "maximum": 10000000,
     "minimum": 0
    }
   },
   "description": "Counts parsed by the caller from the runner's own report.",
   "additionalProperties": false
  },
  "output": {
   "type": "string",
   "maxLength": 50000,
   "description": "go test output (only ok, FAIL, --- FAIL and panic: lines are read)."
  },
  "runner": {
   "enum": [
    "pytest",
    "jest",
    "vitest",
    "node-test",
    "go-test",
    "cargo-test",
    "mocha"
   ],
   "type": "string"
  },
  "signal": {
   "type": "string",
   "maxLength": 20,
   "description": "Terminating signal name, e.g. SIGKILL."
  },
  "version": {
   "type": "string",
   "pattern": "^[0-9]+(\\.[0-9]+){0,2}$",
   "maxLength": 30,
   "description": "Runner version, e.g. 10.4.0. Needed only for version-gated flags."
  },
  "exitCode": {
   "type": "integer",
   "maximum": 255,
   "minimum": 0,
   "description": "Process exit status. Omit when the process was killed by a signal or timed out."
  },
  "timedOut": {
   "type": "boolean",
   "description": "True when the harness gave up waiting."
  },
  "attemptExitCodes": {
   "type": "array",
   "items": {
    "type": "integer",
    "maximum": 255,
    "minimum": 0
   },
   "maxItems": 20,
   "minItems": 2,
   "description": "Exit codes of repeated runs of the same tests, to detect flakiness. Interpreted with the same runner rules."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-test-exit-code-interpreter-42ed9c28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
