Liking cljdoc? Tell your friends :D

wagoe.mcp.shell.verify

Shell side of the Tier 1 closed verify loop (BOU-101). Runs the steps that touch the filesystem / subprocesses against the files a generate tool just wrote, and hands the raw results to wagoe.mcp.core.verify for the pure report assembly.

Steps:

  • kondo — clj-kondo over the written .clj files (static; in-process).
  • fcis — wagoe.tools.check-fcis/check-file over written core/ files, so FC/IS (BND-806) violations are caught per-file regardless of the monorepo's core-source-paths discovery.
  • tests — the project's affected tests, via an injected :test-runner (a fn of the module name). The runner is injected, not hardcoded, because there is no stable programmatic Kaocha API and the tests must run in the project's classpath, not the MCP server's; the default shell-out runner lives in wagoe.mcp.shell.test-runner. Absent runner → an honest :unavailable step (never a silent pass).

Malli validation of the generate request happens in the scaffolder service before any file is written; its failures arrive as :errors on the generate result and are surfaced by the core report, so there is no separate Malli step here.

Shell side of the Tier 1 closed verify loop (BOU-101). Runs the steps that
touch the filesystem / subprocesses against the files a generate tool just
wrote, and hands the raw results to wagoe.mcp.core.verify for the pure
report assembly.

Steps:
  * kondo  — clj-kondo over the written .clj files (static; in-process).
  * fcis   — wagoe.tools.check-fcis/check-file over written core/ files,
             so FC/IS (BND-806) violations are caught per-file regardless of
             the monorepo's `core-source-paths` discovery.
  * tests  — the project's affected tests, via an injected `:test-runner`
             (a fn of the module name). The runner is injected, not hardcoded,
             because there is no stable programmatic Kaocha API and the tests
             must run in the *project's* classpath, not the MCP server's; the
             default shell-out runner lives in wagoe.mcp.shell.test-runner.
             Absent runner → an honest :unavailable step (never a silent pass).

Malli validation of the generate *request* happens in the scaffolder service
before any file is written; its failures arrive as `:errors` on the generate
result and are surfaced by the core report, so there is no separate Malli
step here.
raw docstring

test-path?clj

(test-path? root p)

Is p inside a test root, judged from root?

The path is made relative to the project root and the FIRST src or test segment decides: test/…, libs/<lib>/test/… are tests; src/… is source, even for a module named test. A path outside the root — which the tools' confine-path does not produce — falls back to the LAST such segment.

Not a search for "/test/" in the path. The tools pass absolute, canonical paths, so a project that merely lives under a directory named test — ~/test/myapp, /tmp/test/… — had every core file classified as a test and skipped: FC/IS reported a pass without checking anything.

Is `p` inside a test root, judged from `root`?

The path is made relative to the project root and the FIRST `src` or `test`
segment decides: `test/…`, `libs/<lib>/test/…` are tests; `src/…` is source,
even for a module named `test`. A path outside the root — which the tools'
confine-path does not produce — falls back to the LAST such segment.

Not a search for "/test/" in the path. The tools pass absolute, canonical
paths, so a project that merely lives under a directory named test —
~/test/myapp, /tmp/test/… — had every core file classified as a test and
skipped: FC/IS reported a pass without checking anything.
sourceraw docstring

verify-generatedclj

(verify-generated deps result)
(verify-generated deps {:keys [module files] :as result} opts)

Run the verify loop over a generate result and return the structured report (wagoe.mcp.core.verify/build-report shape).

deps — needs :test-runner (optional fn of module name). result — {:module str :files [{:path :action}] [:errors] :success bool} opts — {:overridden? bool} (an audited soft-guardrail override).

kondo runs over every written .clj file; FC/IS over the written core/ files; tests over the module (via the injected runner).

Run the verify loop over a generate result and return the structured report
(wagoe.mcp.core.verify/build-report shape).

`deps`   — needs :test-runner (optional fn of module name).
`result` — {:module str :files [{:path :action}] [:errors] :success bool}
`opts`   — {:overridden? bool} (an audited soft-guardrail override).

kondo runs over every written .clj file; FC/IS over the written core/ files;
tests over the module (via the injected runner).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close