This document is the maintainer testing guide for fractal-engine. The
default rule is offline-first: routine validation must not require credentials,
network access, or paid provider calls.
Run the offline suite before merging runtime, storage, adapter, prompt, or public API changes:
flowchart LR
Diff["Tracked change"] --> Offline["clojure -M:test"]
Offline --> Hygiene["git diff --check"]
Hygiene --> Package{"Packaging touched?"}
Package -- yes --> Build["jar + uber + java -jar help"]
Package -- no --> Done["Ready for review"]
Build --> Done
Done --> Live{"Provider path touched?"}
Live -- yes --> Matrix["Optional live suite or CLI matrix"]
Live -- no --> Report["Report evidence"]
Matrix --> Report
clojure -M:test
The :test alias excludes tests marked ^:live, so this command is expected to
run without provider credentials. It covers the deterministic engine path:
Run the patch hygiene check for every documentation or source change:
git diff --check
For packaging or release workflow changes, also build both artifacts and smoke the CLI jar:
clojure -T:build jar
clojure -T:build uber
java -jar target/fractal.jar help
Live-provider validation is opt-in:
clojure -M:live-test
The :live-test alias includes only tests marked ^:live. These tests are
credential-guarded and may skip when provider credentials are absent. A skipped
live test is useful information about local setup; it is not the same as
evidence that the provider path is healthy.
Use live validation to prove the real adapter path, provider authentication, real model responses, recursive child or leaf calls, and honest usage/cost/cache reporting. Keep it separate from the default gate because it can be slow, flaky for provider reasons, and paid.
For CLI/control-plane changes, also run a live command matrix through
clojure -M:cli as described in Live Validation. A
complete matrix should exercise usage commands, inspection commands, recursive
tree readback, trace readback, compaction, stop/close/reopen behavior, and
payload hydration from a stored ref.
For SDK surface changes, the focused live path is:
clojure -M:live-test -n fractal.engine.live-surface-test
That test uses a real provider, a real configured Git-like surface, a root session, a child session, and a leaf call. It proves that injected host functions can be selected by the model and that surface prompt context reaches the relevant request paths.
Every live run should be bounded in config. The relevant runtime keys are:
:max-steps for per-turn step count;:max-turns for total turns in a session;:call-timeout-ms for the wall-clock deadline around each adapter call;:max-fanout for maximum map-lm / map-rlm lanes accepted by one call;:fanout-pool for bounded fan-out worker threads.:leaf-concurrency for the process-wide leaf-call semaphore;:context hard threshold for context-window exhaustion.For paid validation, start with small values and raise only for the specific scenario under test. A live proof that needs high limits should say why those limits are necessary and what signal would indicate a runaway run.
These controls bound execution and produce explicit terminal statuses. Provider usage/cost records, when available, are observability metadata for audit and reporting.
Provider SDKs may read credentials from environment variables. Export those variables in the same shell that launches the JVM:
export PROVIDER_API_KEY=...
clojure -M:live-test
Use provider-specific variable names required by the SDK in your local shell or secret manager. Do not commit credential values, local credential file paths, or machine-specific setup notes.
Before publishing docs or generated artifacts, scan the changed files for secrets and local identifiers:
git status --short
git diff --check
git grep --untracked -n -E 'secret|token|password|api[_-]?key|credential|auth' -- .
git grep --untracked -n -E '[[:alnum:]._%+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,}' -- .
git grep --untracked -n -E '(^|[^[:alnum:]_])/(Users|home|var/folders)/' -- .
These scans are intentionally broad. Review matches manually; many legitimate matches are documentation about what not to commit.
Use long-horizon specimens when the change needs evidence beyond deterministic unit tests. Useful specimens should cover:
Keep raw transcripts, provider payloads, local run directories, and credentials out of tracked files. Summaries should be sanitized and reproducible enough for another maintainer to rerun the scenario with their own credentials.
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 |