From a65993bcc53ab9ba381acefe3748115f7e0ced27 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sat, 28 Mar 2026 01:16:57 -0400 Subject: [PATCH] Remove unused goal_override and base_dir from PersistCreateOptions These fields were only consumed by create_from_source before calling persist_validated, which immediately destructured them to _. Pass them as explicit parameters to create_from_source instead. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../fabro-workflows/src/operations/create.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/crates/fabro-workflows/src/operations/create.rs b/lib/crates/fabro-workflows/src/operations/create.rs index 25fa8d752..d8f403c94 100644 --- a/lib/crates/fabro-workflows/src/operations/create.rs +++ b/lib/crates/fabro-workflows/src/operations/create.rs @@ -46,8 +46,6 @@ struct PersistCreateOptions { base_branch: Option, working_directory: PathBuf, host_repo_path: Option, - goal_override: Option, - base_dir: Option, } /// Resolve workflow inputs, normalize settings, and persist a run directory. @@ -93,6 +91,9 @@ pub fn create(request: CreateRunInput) -> Result { .and_then(|(_, branch)| branch) }); + let goal_override = resolved.goal_override.clone(); + let base_dir = resolved.base_dir.clone(); + let persisted = create_from_source( &resolved.raw_source, PersistCreateOptions { @@ -104,9 +105,9 @@ pub fn create(request: CreateRunInput) -> Result { base_branch, working_directory, host_repo_path, - goal_override: resolved.goal_override.clone(), - base_dir: resolved.base_dir.clone(), }, + base_dir, + goal_override.as_deref(), )?; write_run_config_snapshot(&run_dir, resolved.workflow_toml_path.as_deref())?; @@ -150,13 +151,15 @@ fn write_run_config_snapshot( fn create_from_source( dot_source: &str, options: PersistCreateOptions, + base_dir: Option, + goal_override: Option<&str>, ) -> Result { let validated = preprocess_and_validate( dot_source, - options.base_dir.clone(), + base_dir, Vec::new(), Some(&options.settings), - options.goal_override.as_deref(), + goal_override, )?; if validated.has_errors() { @@ -220,8 +223,6 @@ fn persist_validated( base_branch, working_directory, host_repo_path, - goal_override: _, - base_dir: _, } = options; let settings = resolve_run_settings(settings, validated.graph());