Counterfactual replay
constant replay turns archived Dry Master records into a deterministic
benchmark and model-migration harness. Instead of judging a new model or harness
on toy prompts, replay real multi-turn sessions from the exact turn where the
work mattered.
Usage
# Replay an entire corpus directory across harness:model cells with objective scoring
constant replay \
--corpus ./eval-corpus/ \
--targets claude:sonnet,claude:opus,codex:o3 \
--with-tools \
--render triage \
--isolate worktree \
--verify-cmd "cargo test" \
--out replay-report.json
# Replay one conversation from Turn 6, pinning worktrees to its recorded git SHA
constant replay \
--corpus cobalt-37 \
--turn 6 \
--targets claude,antigravity \
--pin-commit \
--jsonHow truncation works (--turn)
--turn auto(default): when--questionis omitted, Constant finds the lastuserturn, truncates the Dry Master right before it (keeping all prior turns and attached redacted tool events), replays that exact user prompt against every target in parallel, and records the original runtime's reply asbaseline_answer.--turn K: truncates after conversational turnK(keeping attached tool traffic on turns1..K). If turnK+1is auserturn and--questionis omitted, its verbatim text becomes the replay prompt automatically.
Historical commit pinning (--pin-commit)
Every constant/v2 Dry Master stamps subconscious.git_commit when sealed.
Passing --pin-commit with --isolate worktree checks out that exact
historical commit in each target's detached worktree rather than current HEAD
so counterfactual runs see the real codebase state from when the conversation
happened.
Report output (--out)
Reports are written atomically (temp sibling, fsync, rename) and include:
summary.total_cases,summary.divergent_cases, andsummary.per_target(succeeded,failed,avg_elapsed_ms,total_patches,unique_ref_cases,verify_passed,verify_failed)cases[]containingoriginal_runtime,original_model,pinned_commit,replayed_after_turn,question,baseline_answer, and the full multi-mindreport(per-target answers, worktree diffs, and deterministicdivergence).
Next: Agents & skill guide.