{"uid":"cap_jsHFVrjlAoDgI6pzl3kl9","slug":"writerslogic-test-exit-code-interpreter-42ed9c28","name":"WritersLogic Test Exit Code Interpreter","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/test-exit-interpret?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_e7hs1oLZ3CySsL2NhlMVO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"CI gate for pytest in a pipeline","prompt":"My pytest run just finished: exit code 2, 100 tests total, 0 passed, 0 failed, 100 skipped — tell me if the test suite actually passed, failed, or just ran nothing meaningful."},{"title":"Detecting flaky go test run","prompt":"I ran go test three times and got exit codes 1, 1, 0 on the attempts. The final run output has an 'ok' summary line. Was this a real pass, a flaky pass, or should I count it as a failure?"},{"title":"Mocha run with --fail-zero flag","prompt":"My mocha 9.2.0 test run exited with code 0 and ran zero tests. I have the --fail-zero flag enabled — does this count as a pass or should it be treated as a failure?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:19.153Z","isFirstParty":false,"canonicalSlug":"writerslogic-test-exit-code-interpreter-42ed9c28"}