fix: deterministic fusion tie-order + seeded random eval sampling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,3 +10,20 @@ fn eval_mode_c_runs_and_reports_billable_recall() {
|
||||
let s = String::from_utf8_lossy(&out.stdout);
|
||||
assert!(s.contains("BillableRecall@10="));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn eval_is_deterministic_same_seed() {
|
||||
let run = || {
|
||||
let out = Command::new(env!("CARGO_BIN_EXE_alpha-id"))
|
||||
.args(["eval", "--mode", "c", "--cases", "40", "--seed", "42"])
|
||||
.arg("--config").arg("config/default.toml")
|
||||
.output().unwrap();
|
||||
assert!(out.status.success(), "stderr: {}", String::from_utf8_lossy(&out.stderr));
|
||||
String::from_utf8(out.stdout).unwrap()
|
||||
};
|
||||
let first = run();
|
||||
let second = run();
|
||||
assert!(!first.is_empty(), "eval produced no output");
|
||||
assert_eq!(first, second,
|
||||
"eval output differed between runs with identical args (seed=42):\n run1: {first:?}\n run2: {second:?}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user