pub struct RunOptions {
pub root: PathBuf,
pub suite: String,
pub tasks: Vec<String>,
pub repetitions: Vec<u32>,
pub work_dir: PathBuf,
pub harness: PathBuf,
pub majordomus: PathBuf,
pub parallel: usize,
pub force: bool,
pub dry_run: bool,
pub session_timeout: Duration,
}Expand description
Everything a live suite run is told. The work directory must lie outside root, and
run refuses the options otherwise, because the transcripts it collects there quote
prompts and code that never belong in the repository’s history.
use std::time::Duration;
use majordomus_cli::economics::runner::{run, RunOptions};
let (repo, work) = (tempfile::tempdir().unwrap(), tempfile::tempdir().unwrap());
let mut opts = RunOptions {
root: repo.path().into(), suite: "nightly".into(), tasks: vec![], repetitions: vec![1],
work_dir: work.path().into(), harness: "claude".into(), majordomus: "majordomus".into(),
parallel: 2, force: false, dry_run: true, session_timeout: Duration::from_secs(900),
};
// the suite is looked up in the declarations, never invented from the options
assert_eq!(run(&opts, &decl, &|_| {}).unwrap_err(), "no suite \"nightly\"");
// and a recorded run is never written over, whatever the options say
opts.force = true;
assert!(run(&opts, &decl, &|_| {}).unwrap_err().contains("never overwritten"));Fields§
§root: PathBufThe repository whose declarations and share are used.
suite: StringThe suite.
tasks: Vec<String>Only these tasks; all of the suite’s when empty.
repetitions: Vec<u32>Only these repetitions; all of the suite’s when empty.
work_dir: PathBufWhere transcripts go. Never inside the repository. The workspaces are not here: each is a fresh directory of the system temporary directory, removed when its run ends.
harness: PathBufThe harness executable (claude, or a stand-in).
majordomus: PathBufThe majordomus executable the treatment installs from.
parallel: usizeRuns in flight at once.
force: boolAsks to record over an existing run, and is always refused by run: a recorded
run is evidence. A run that should not count is excluded in the methodology, with its
reason, and another repetition is recorded instead.
dry_run: boolPrepare the workspaces and print the commands, run nothing.
session_timeout: DurationPer-session wall-clock limit.
Trait Implementations§
Source§impl Clone for RunOptions
impl Clone for RunOptions
Source§fn clone(&self) -> RunOptions
fn clone(&self) -> RunOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more