From 633fced462eae18e9ff17c58178cdaf6290b8382 Mon Sep 17 00:00:00 2001 From: Fabro Date: Wed, 1 Apr 2026 15:57:43 +0000 Subject: [PATCH] fabro(01KN4VB09T999RE1V2DD8Z3YC3): simplify_opus (success) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fabro-Run: 01KN4VB09T999RE1V2DD8Z3YC3 Fabro-Completed: 6 Fabro-Checkpoint: 468ea5806d230b89db4ac818ebda0590c772ff64 ⚒️ Generated with [Fabro](https://fabro.sh) --- lib/crates/fabro-cli/tests/it/cmd/support.rs | 24 ++++++-------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/lib/crates/fabro-cli/tests/it/cmd/support.rs b/lib/crates/fabro-cli/tests/it/cmd/support.rs index e36b74d61..4deffb71c 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/support.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/support.rs @@ -318,23 +318,9 @@ worktree_mode = "never" "#, ); - let mut cmd = context.command(); - cmd.current_dir(&workspace_dir); - cmd.timeout(COMMAND_TIMEOUT); - cmd.env("OPENAI_API_KEY", "test"); - cmd.args([ - "run", - "--auto-approve", - "--no-retro", - "--sandbox", - "local", - "--provider", - "openai", - "run.toml", - ]); // The workflow is expected to fail (script exits 1), but the CLI may still // exit 0. We only care that conclusion.json records a non-success status. - let _output = cmd.output().expect("command should execute"); + let _output = exec_local_workflow(context, &workspace_dir, "run.toml"); let run = only_run(context); let conclusion = read_json(&run.run_dir.join("conclusion.json")); @@ -348,7 +334,7 @@ worktree_mode = "never" run } -fn run_local_workflow(context: &TestContext, workspace_dir: &Path, workflow: &str) -> RunSetup { +fn exec_local_workflow(context: &TestContext, workspace_dir: &Path, workflow: &str) -> Output { let mut cmd = context.command(); cmd.current_dir(workspace_dir); cmd.timeout(COMMAND_TIMEOUT); @@ -363,7 +349,11 @@ fn run_local_workflow(context: &TestContext, workspace_dir: &Path, workflow: &st "openai", workflow, ]); - let output = cmd.output().expect("command should execute"); + cmd.output().expect("command should execute") +} + +fn run_local_workflow(context: &TestContext, workspace_dir: &Path, workflow: &str) -> RunSetup { + let output = exec_local_workflow(context, workspace_dir, workflow); if !output.status.success() { panic!( "command failed: fabro run --auto-approve --no-retro --sandbox local --provider openai {workflow}\nstdout:\n{}\nstderr:\n{}",