Test Pulse
check_testRun the project's real test suite and return structured health — the same engine as the terminal command zephex check test. Detects bun, vitest, jest, pytest, go test, and cargo. Parses JUnit plus lcov (not a regex over stdout). Returns summary, a plain card (what broke, why clusters, coverage, warnings), fix_first, broken_areas, failure_clusters, coverage_by_area, and session_id. Not a file picker for what to edit. ALWAYS call after you edited source, when they ask if tests pass, what is failing, why tests failed, are we green, before commit, before push, or to re-run only the failed tests. PREFER this over running bun test, npm test, or pytest yourself and dumping logs. This already ran the suite, clustered the failures, and named the first file to fix. Workflow: task=detect sees the runner without executing (framework, command, test file count). task=run executes once and stores a session. Then task=failures, status, list, coverage, missing, why, or fix_prompt using session_id (or omit session_id to read the last run on this machine). Do not re-run the whole suite just to read failures. Read summary and fix_first first. On FAIL, call task=failures, then fix those files. task=why with a question explains clusters. task=missing finds changed source without tests. task=fix_prompt is a paste-ready brief. Pass diff_base: main after edits for failures_in_diff. area or file_filter scopes a later run. Local stdio: omit path (the editor cwd — their machine) or pass that project folder. Hosted: public GitHub URL or inline_files — not a local disk path. Does not modify source. Does not invent a runner if none exists. Does not choose product files to edit. Does not check npm packages. Does not scan a live URL. Example: check_test({ task: "run" }) then check_test({ task: "failures", session_id: "" }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| area | No | Scope to module/area name derived from test paths (e.g. proxy, auth, handlers) | |
| path | No | Project folder. Local/stdio: omit to use the editor cwd (tests run on their machine), or pass the absolute folder. Hosted: public GitHub URL or inline_files — not a local disk path. Required for run/detect unless stdio cwd is a project. missing accepts path or session_id. | |
| task | No | run = execute the suite (stores a session). detect = see runner, do not execute. failures|status|list|coverage|fix_prompt|why = read the last session (no re-run). missing = git-diff sources without tests. Same tasks as zephex check test / check test failures. | run |
| limit | No | Max rows for task:history (1–20) | |
| command | No | Override auto-detected test command | |
| question | No | Natural-language follow-up for task:why (e.g. "what failed in proxy?") | |
| diff_base | No | Git branch for patch coverage and failures_in_diff (e.g. main) — use after edits | |
| session_id | No | From a prior task=run (ts_*). Reuse for failures/status/list/why/fix_prompt so you do not re-run. Omit on stdio to read the last run on this machine. | |
| timeout_ms | No | Max run time ms (default 1800000 stdio, capped 600000 hosted) | |
| failed_only | No | Re-run only tests that failed in the prior session | |
| file_filter | No | Substring or glob fragment to filter test_files (e.g. auth, handlers) | |
| coverage_top | No | Max files in coverage slice | |
| detail_level | No | Token budget: brief <500 tokens on PASS; agent default; full=all slices | agent |
| inline_files | No | Hosted fallback when github is unavailable: { "package.json": "...", "src/foo.test.ts": "..." }. Supports task detect and task run (temp dir on Railway). Include package.json with scripts.test. | |
| include_flaky | No | Include flaky test hints from local history | |
| with_coverage | No | Collect lcov coverage (default true) | |
| include_missing | No | Git-diff scan for source files without matching tests (default true on detect and when diff_base set) |