Default test-runner for the Tier 1 verify loop. Shells out to the project's own Kaocha runner in the current working directory and parses the result.
Why shell out rather than run in-process: Kaocha exposes no stable
programmatic API, and the affected tests must run in the project's full
classpath (H2, the module under test, fixtures) — not the MCP server's. The
runner is injected into the tool deps as :test-runner, so this is swappable
(and stubbed in unit tests).
The structured parse is best-effort over Kaocha's textual output; the raw output tail is always included so the agent has the real failure text even when a failure shape isn't recognized.
Default test-runner for the Tier 1 verify loop. Shells out to the project's own Kaocha runner in the current working directory and parses the result. Why shell out rather than run in-process: Kaocha exposes no stable programmatic API, and the affected tests must run in the *project's* full classpath (H2, the module under test, fixtures) — not the MCP server's. The runner is injected into the tool deps as `:test-runner`, so this is swappable (and stubbed in unit tests). The structured parse is best-effort over Kaocha's textual output; the raw output tail is always included so the agent has the real failure text even when a failure shape isn't recognized.
(default-test-runner module)(default-test-runner module {:keys [command]})Run the project's tests for module and return a structured result:
{:status :passed | :failed | :error
[:passed n] [:failed n] [:failures [{:var :file :line :message}]]
[:note str] :raw-tail str}
:error means the runner itself could not run the suite (e.g. the module is
not yet wired into tests.edn) — distinct from :failed (tests ran, some
failed).
Run the project's tests for `module` and return a structured result:
{:status :passed | :failed | :error
[:passed n] [:failed n] [:failures [{:var :file :line :message}]]
[:note str] :raw-tail str}
`:error` means the runner itself could not run the suite (e.g. the module is
not yet wired into tests.edn) — distinct from `:failed` (tests ran, some
failed).cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |