From e8ab7629848d742f79f6e28bfaf3ac8ff4591d55 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 5 Apr 2026 11:06:13 -0400 Subject: [PATCH] test(cli): normalize json run snapshot llm defaults --- lib/crates/fabro-cli/tests/it/cmd/run.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/crates/fabro-cli/tests/it/cmd/run.rs b/lib/crates/fabro-cli/tests/it/cmd/run.rs index a2495218a..b9c45e283 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/run.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/run.rs @@ -229,12 +229,25 @@ fn json_run_implies_auto_approve_for_human_gates() { String::from_utf8_lossy(&output.stderr) ); - let progress: Vec = String::from_utf8(output.stdout) + let mut progress: Vec = String::from_utf8(output.stdout) .expect("stdout should be UTF-8") .lines() .filter(|line| !line.trim().is_empty()) .map(|line| serde_json::from_str(line).expect("run JSON output should be JSONL")) .collect(); + for event in &mut progress { + let Some(llm) = event.pointer_mut("/properties/settings/llm") else { + continue; + }; + let Some(llm) = llm.as_object_mut() else { + continue; + }; + llm.insert("model".to_string(), Value::String("[LLM_MODEL]".to_string())); + llm.insert( + "provider".to_string(), + Value::String("[LLM_PROVIDER]".to_string()), + ); + } fabro_json_snapshot!(context, &progress, @r#" [ { @@ -348,8 +361,8 @@ fn json_run_implies_auto_approve_for_human_gates() { "goal": "Route through the default approval path", "llm": { "fallbacks": null, - "model": "gpt-5.4", - "provider": "openai" + "model": "[LLM_MODEL]", + "provider": "[LLM_PROVIDER]" }, "mode": "standalone", "no_retro": true,