Skip to main content

Module test_bench

Module test_bench 

Source
Expand description

harn test-bench runner.

Wraps crate::commands::run::execute_run in a harn_vm::testbench::TestbenchSession so a script runs against a pinned clock, an optional LLM/process tape, and an optional filesystem overlay — all with deny-by-default network egress.

The CLI flag names map onto harn_vm::testbench::Testbench one-for-one.

§Runtime modes

--runtime paused-tokio (default): multi-threaded Tokio runtime. Tasks from concurrent Harn agents run in parallel across worker threads. The paused mock clock keeps virtual time stable, but task-interleaving order varies between runs.

--runtime des: single-threaded current_thread Tokio runtime. All tasks, I/O completions, and timer callbacks share one OS thread. Combined with the paused mock clock this produces bit-exact event tapes across reruns for scripts that stay within the DES-safe primitive set (no real network, no real subprocess, no real clock). See docs/src/dev/des-mode.md.