The suite is one kaocha suite, :unit (tests.edn), over test/ (dvergr) and
benchmarks/test/ (the benchmark providers). ^:integration tests (real
provider calls) and ^:security-open tests (sandbox escapes still open) are
skipped by default.
The MCP relay (bin/dvergr-mcp) is a babashka script, and its tests in
dvergr.mcp.smoke-test skip (with a note) when bb is not on PATH; CI
installs babashka 1.12.200 so they run there. Install bb to run them locally.
clojure -M:test # everything
clojure -M:test --focus dvergr.jobs-test # one namespace
clojure -M:test --focus dvergr.jobs-test/cancelling-a-job-settles-its-run-cancelled
clojure -M:test --focus-meta :integration # the provider-calling tests
clojure -M:test --seed 1713321041 # repeat a run's test order
Every run prints how long loading (compiling) the test namespaces took and how
long the tests ran (dvergr.test-phases), and the profiling plugin lists the
40 slowest namespaces and tests. Note that --focus filters after loading:
kaocha still compiles every test namespace first.
To run only some namespaces, the way one CI container does, put them in a file and point the split hook at it. Only those namespaces are loaded:
.circleci/test-namespaces.sh > /tmp/all.txt
printf 'dvergr.jobs-test\ndvergr.effects-test\n' > /tmp/mine.txt
DVERGR_TEST_ALL_NAMESPACES=/tmp/all.txt DVERGR_TEST_NAMESPACES=/tmp/mine.txt clojure -M:test
The CircleCI test job runs with parallelism: 3. Each container:
.circleci/test-namespaces.sh, from the file
names under test/ and benchmarks/test/);circleci tests split --split-by=timings --timings-type=classname, which balances the shares by the namespace
timings of earlier runs (the JUnit results each container stores);dvergr.test-split, a kaocha pre-load hook,
narrows the suite's :ns-patterns to exactly those namespaces, so a
container compiles only what it runs.No test is lost or run twice: tests split puts each listed namespace in
exactly one container, and the hook refuses to run unless the list equals the
set of namespaces kaocha itself finds in the suite. A namespace the file-name
derivation misses, or a stale name, fails every container before any test
runs. The containers' summary lines add up to the full run's test count.
The three containers report as one check, ci/circleci: test.
wait-ms is 30 s), since a passing test never waits it out
and a cold CI JVM can be slow. A check that something does not happen
watches a short window that starts after the event that would have caused
it has settled.dvergr.sandbox.steer-test).dvergr.test-registries):
restoring a whole snapshot drops what namespaces loaded during the test
registered, and a later test then fails depending on order.Before asking an LLM to invent an agentic workflow, dvergr verifies that the programming surface it will use can construct and observe one without a model.
The contract executes the real clojure_eval tool against a room-bound SCI
context and ChatContext. Sandboxed Clojure creates a persistent child room through
dvergr.room/create!; a second evaluation proves that the REPL definition and
room view persisted; the host then checks the shared room registry and Datahike
registry row.
Run the test directly:
clojure -M:test --focus dvergr.repl-meta-harness-test
Or invoke the same test fixture interactively:
;; Start with: clojure -M:dev
(require '[dvergr.repl-meta-harness-test :as contract])
(def result (contract/run-contract!))
(:passed? result)
;; => true
(:checks result)
run-contract! uses a fresh state root under the JVM temporary directory,
disables file-driven agent autostart, stops its daemon, and restores the prior
dvergr state root. It refuses to run if a daemon is already active in the JVM.
No model provider is resolved or invoked.
To exercise an already running development daemon deliberately, use a unique child slug. This retains the child for inspection through the REPL, TUI, or web UI:
(require '[dvergr.repl-meta-harness-test :as contract])
(require '[dvergr.orchestration.daemon :as daemon])
(contract/run-against-daemon!
@daemon/current-daemon
{:parent-slug "boardroom"
:child-slug "my-meta-harness-probe"})
Can you improve this documentation?Edit on GitHub
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 |