gleamunison/cli_replay

gleamunison replay <file.lisp> <def> <tape.json> — re-run a definition against a recorded transcript. Playback serves recorded op results; the real handlers never run. Divergence (wrong ability, wrong op, exhausted tape) fails loudly. Verification, not vibes: a clean replay proves the run the tape records is the run the code performs.

Values

pub fn command(args: List(String)) -> Result(Nil, String)
pub fn load_and_compile(
  path: String,
  name: String,
) -> Result(String, String)

Load a file and compile the named definition. Only define forms are processed: evaluating a stray expression at load time would call real handlers outside any replay/recording frame, which is exactly the accident this tool exists to prevent. The loader itself lives in verify.load_defs_file — one loader, shared by every CLI that loads code. Public because the test-side recording harness (test/replay_support.gleam) shares this one name→module authority (bk-f850).

pub fn replay_from_file(
  path: String,
  name: String,
  tape_path: String,
) -> Result(String, String)

Replay a definition against a tape file. The tape must carry raw values (v2 format); an audit-only tape cannot drive a replay.

✨ Search Document