mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
refactor: rename Settings/Config structs to Options suffix
Standardize naming so all "bag of options" structs use the Options suffix: ExecutorSettings→ExecutorOptions, RunSettings→RunOptions, GitCheckpointSettings→GitCheckpointOptions, LifecycleConfig→LifecycleOptions, RunCreateSettings→RunCreateOptions, StartRetroConfig→StartRetroOptions, StartFinalizeConfig→StartFinalizeOptions, AutoMergeConfig→AutoMergeOptions. Also renames the run_settings module to run_options. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c81e61bd12
commit
fafc0a3c39
27 changed files with 275 additions and 275 deletions
|
|
@ -24,11 +24,11 @@ use fabro_interview::{Answer, Interviewer, QuestionType, WebInterviewer};
|
|||
use fabro_workflows::context::Context;
|
||||
use fabro_workflows::event::{EventEmitter, WorkflowRunEvent};
|
||||
use fabro_workflows::handler::HandlerRegistry;
|
||||
use fabro_workflows::operations::{self, RunCreateSettings};
|
||||
use fabro_workflows::operations::{self, RunCreateOptions};
|
||||
use fabro_workflows::pipeline::{self, InitOptions, Persisted};
|
||||
use fabro_workflows::records::Checkpoint;
|
||||
use fabro_workflows::run_settings::LifecycleConfig;
|
||||
use fabro_workflows::run_settings::RunSettings;
|
||||
use fabro_workflows::run_options::LifecycleOptions;
|
||||
use fabro_workflows::run_options::RunOptions;
|
||||
|
||||
pub use fabro_types::{
|
||||
ApiQuestion, ApiQuestionOption, PaginatedRunList, PaginationMeta,
|
||||
|
|
@ -489,7 +489,7 @@ async fn start_run(
|
|||
};
|
||||
let persisted = match operations::create(
|
||||
&req.dot_source,
|
||||
RunCreateSettings {
|
||||
RunCreateOptions {
|
||||
config,
|
||||
run_dir: Some(run_dir.clone()),
|
||||
run_id: Some(run_id.clone()),
|
||||
|
|
@ -653,7 +653,7 @@ async fn execute_run(state: Arc<AppState>, run_id: String) {
|
|||
}
|
||||
};
|
||||
let run_record = persisted.run_record().clone();
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: run_record.config,
|
||||
run_dir: run_dir.clone(),
|
||||
cancel_token: Some(cancel_token),
|
||||
|
|
@ -685,12 +685,12 @@ async fn execute_run(state: Arc<AppState>, run_id: String) {
|
|||
emitter,
|
||||
sandbox,
|
||||
registry,
|
||||
lifecycle: LifecycleConfig {
|
||||
lifecycle: LifecycleOptions {
|
||||
setup_commands: Vec::new(),
|
||||
setup_command_timeout_ms: 300_000,
|
||||
devcontainer_phases: Vec::new(),
|
||||
},
|
||||
run_settings: config,
|
||||
run_options: config,
|
||||
hooks: fabro_hooks::HookConfig { hooks },
|
||||
sandbox_env: HashMap::new(),
|
||||
checkpoint: None,
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ pub async fn create_run(
|
|||
|
||||
let persisted = match fabro_workflows::operations::create(
|
||||
&source_input.raw_source,
|
||||
fabro_workflows::operations::RunCreateSettings {
|
||||
fabro_workflows::operations::RunCreateOptions {
|
||||
config,
|
||||
run_dir: Some(run_dir.clone()),
|
||||
run_id: Some(run_id.clone()),
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ use fabro_util::terminal::Styles;
|
|||
use fabro_workflows::event::{EventEmitter, RunNoticeLevel};
|
||||
use fabro_workflows::handler::llm::{AgentApiBackend, AgentCliBackend, BackendRouter};
|
||||
use fabro_workflows::operations::{
|
||||
create_from_graph, start, RunCreateSettings, StartFinalizeConfig, StartOptions,
|
||||
StartPullRequestConfig, StartRetroConfig,
|
||||
create_from_graph, start, RunCreateOptions, StartFinalizeOptions, StartOptions,
|
||||
StartPullRequestConfig, StartRetroOptions,
|
||||
};
|
||||
use fabro_workflows::outcome::StageStatus;
|
||||
use fabro_workflows::pipeline::{
|
||||
|
|
@ -23,7 +23,7 @@ use fabro_workflows::pipeline::{
|
|||
};
|
||||
use fabro_workflows::records::Checkpoint;
|
||||
use fabro_workflows::records::RunRecord;
|
||||
use fabro_workflows::run_settings::{GitCheckpointSettings, LifecycleConfig, RunSettings};
|
||||
use fabro_workflows::run_options::{GitCheckpointOptions, LifecycleOptions, RunOptions};
|
||||
|
||||
use super::detached_support::{DetachedRunBootstrapGuard, DetachedRunCompletionGuard};
|
||||
use super::run::{
|
||||
|
|
@ -107,7 +107,7 @@ struct ResumeContext {
|
|||
/// Kept as Arc so the sandbox event callbacks can emit through it. Listeners
|
||||
/// that need to be added later (e.g. ProgressUI) are registered separately.
|
||||
emitter: Arc<EventEmitter>,
|
||||
settings: RunSettings,
|
||||
settings: RunOptions,
|
||||
setup_commands: Vec<String>,
|
||||
/// Devcontainer lifecycle phases (on_create, post_create, post_start) resolved from config.
|
||||
devcontainer_phases: Vec<(String, Vec<fabro_devcontainer::Command>)>,
|
||||
|
|
@ -236,7 +236,7 @@ async fn prepare_from_checkpoint(
|
|||
);
|
||||
let persisted = match fabro_workflows::operations::create(
|
||||
&source_input.raw_source,
|
||||
RunCreateSettings {
|
||||
RunCreateOptions {
|
||||
config,
|
||||
run_dir: Some(run_dir.clone()),
|
||||
run_id: Some(run_id.clone()),
|
||||
|
|
@ -459,7 +459,7 @@ async fn prepare_from_checkpoint(
|
|||
};
|
||||
let sandbox: Arc<dyn Sandbox> = Arc::new(fabro_agent::ReadBeforeWriteSandbox::new(sandbox));
|
||||
|
||||
let settings = RunSettings {
|
||||
let settings = RunOptions {
|
||||
config: settings_config,
|
||||
run_dir: run_dir.clone(),
|
||||
cancel_token: None,
|
||||
|
|
@ -607,7 +607,7 @@ async fn prepare_from_branch(
|
|||
);
|
||||
let persisted = match fabro_workflows::operations::create(
|
||||
&source_input.raw_source,
|
||||
RunCreateSettings {
|
||||
RunCreateOptions {
|
||||
config,
|
||||
run_dir: Some(run_dir.clone()),
|
||||
run_id: Some(run_id.clone()),
|
||||
|
|
@ -683,7 +683,7 @@ async fn prepare_from_branch(
|
|||
);
|
||||
let persisted = create_from_graph(
|
||||
rec.graph.clone(),
|
||||
RunCreateSettings {
|
||||
RunCreateOptions {
|
||||
config,
|
||||
run_dir: Some(run_dir.clone()),
|
||||
run_id: Some(run_id.clone()),
|
||||
|
|
@ -940,7 +940,7 @@ async fn prepare_from_branch(
|
|||
.unwrap_or_default();
|
||||
setup_commands.extend(sandbox.resume_setup_commands(&run_branch));
|
||||
|
||||
let settings = RunSettings {
|
||||
let settings = RunOptions {
|
||||
config: settings_config,
|
||||
run_dir: run_dir.clone(),
|
||||
cancel_token: None,
|
||||
|
|
@ -952,7 +952,7 @@ async fn prepare_from_branch(
|
|||
.as_deref()
|
||||
.map(PathBuf::from)
|
||||
.or_else(|| Some(resume_repo_path.clone())),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha,
|
||||
run_branch: Some(run_branch),
|
||||
meta_branch: Some(fabro_workflows::git::MetadataStore::branch_name(&run_id)),
|
||||
|
|
@ -1296,7 +1296,7 @@ async fn run_resumed(
|
|||
}
|
||||
}
|
||||
});
|
||||
let lifecycle = LifecycleConfig {
|
||||
let lifecycle = LifecycleOptions {
|
||||
setup_commands,
|
||||
setup_command_timeout_ms: 300_000,
|
||||
devcontainer_phases,
|
||||
|
|
@ -1326,7 +1326,7 @@ async fn run_resumed(
|
|||
sandbox: Arc::clone(&sandbox),
|
||||
registry: Arc::new(registry),
|
||||
lifecycle,
|
||||
run_settings: settings,
|
||||
run_options: settings,
|
||||
hooks: fabro_hooks::HookConfig {
|
||||
hooks: run_cfg
|
||||
.as_ref()
|
||||
|
|
@ -1337,7 +1337,7 @@ async fn run_resumed(
|
|||
checkpoint: Some(checkpoint),
|
||||
seed_context: None,
|
||||
},
|
||||
retro: StartRetroConfig {
|
||||
retro: StartRetroOptions {
|
||||
enabled: !args.no_retro && project_config::is_retro_enabled(),
|
||||
dry_run: dry_run_mode,
|
||||
llm_client: if dry_run_mode {
|
||||
|
|
@ -1348,7 +1348,7 @@ async fn run_resumed(
|
|||
provider: provider_enum,
|
||||
model: model.clone(),
|
||||
},
|
||||
finalize: StartFinalizeConfig {
|
||||
finalize: StartFinalizeOptions {
|
||||
preserve_sandbox: preserve,
|
||||
},
|
||||
pull_request: StartPullRequestConfig {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use fabro_workflows::git::GitSyncStatus;
|
|||
use fabro_workflows::handler::default_registry;
|
||||
use fabro_workflows::handler::llm::{AgentApiBackend, AgentCliBackend, BackendRouter};
|
||||
use fabro_workflows::operations::{
|
||||
start, StartFinalizeConfig, StartOptions, StartPullRequestConfig, StartRetroConfig,
|
||||
start, StartFinalizeOptions, StartOptions, StartPullRequestConfig, StartRetroOptions,
|
||||
};
|
||||
use fabro_workflows::outcome::StageStatus;
|
||||
use fabro_workflows::outcome::{compute_stage_cost, format_cost};
|
||||
|
|
@ -30,7 +30,7 @@ use fabro_workflows::pipeline::{
|
|||
build_conclusion, classify_engine_result, persist_terminal_outcome, Persisted, Validated,
|
||||
};
|
||||
use fabro_workflows::records::Checkpoint;
|
||||
use fabro_workflows::run_settings::{GitCheckpointSettings, LifecycleConfig, RunSettings};
|
||||
use fabro_workflows::run_options::{GitCheckpointOptions, LifecycleOptions, RunOptions};
|
||||
use indicatif::HumanDuration;
|
||||
use std::time::Duration;
|
||||
use tracing::debug;
|
||||
|
|
@ -897,7 +897,7 @@ async fn run_command_impl(
|
|||
|
||||
match fabro_workflows::operations::create(
|
||||
&source_input.raw_source,
|
||||
fabro_workflows::operations::RunCreateSettings {
|
||||
fabro_workflows::operations::RunCreateOptions {
|
||||
config,
|
||||
run_dir: Some(run_dir.clone()),
|
||||
run_id: Some(run_id.clone()),
|
||||
|
|
@ -1488,7 +1488,7 @@ async fn run_command_impl(
|
|||
"worktree_setup_failed",
|
||||
format!("Git worktree setup failed ({e}), running without worktree."),
|
||||
);
|
||||
// Reset so RunSettings does not enable git checkpointing
|
||||
// Reset so RunOptions does not enable git checkpointing
|
||||
worktree_path = None;
|
||||
worktree_branch = None;
|
||||
worktree_base_sha = None;
|
||||
|
|
@ -1636,7 +1636,7 @@ async fn run_command_impl(
|
|||
// 7. Execute
|
||||
// Set up metadata branch for git checkpointing (host or remote — engine fills remote)
|
||||
let git = if worktree_path.is_some() {
|
||||
Some(GitCheckpointSettings {
|
||||
Some(GitCheckpointOptions {
|
||||
base_sha: worktree_base_sha,
|
||||
run_branch: worktree_branch,
|
||||
meta_branch: Some(fabro_workflows::git::MetadataStore::branch_name(&run_id)),
|
||||
|
|
@ -1645,7 +1645,7 @@ async fn run_command_impl(
|
|||
None
|
||||
};
|
||||
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: settings_config,
|
||||
run_dir: run_dir.clone(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1670,7 +1670,7 @@ async fn run_command_impl(
|
|||
};
|
||||
|
||||
// Build lifecycle config for sandbox init, setup commands, and devcontainer phases
|
||||
let lifecycle = LifecycleConfig {
|
||||
let lifecycle = LifecycleOptions {
|
||||
setup_commands,
|
||||
setup_command_timeout_ms: 300_000,
|
||||
devcontainer_phases: if let Some(ref dc) = devcontainer_config {
|
||||
|
|
@ -1703,7 +1703,7 @@ async fn run_command_impl(
|
|||
sandbox: Arc::clone(&sandbox),
|
||||
registry: Arc::new(registry),
|
||||
lifecycle,
|
||||
run_settings: config,
|
||||
run_options: config,
|
||||
hooks: fabro_hooks::HookConfig {
|
||||
hooks: run_cfg
|
||||
.as_ref()
|
||||
|
|
@ -1714,14 +1714,14 @@ async fn run_command_impl(
|
|||
checkpoint: None,
|
||||
seed_context: None,
|
||||
},
|
||||
retro: StartRetroConfig {
|
||||
retro: StartRetroOptions {
|
||||
enabled: !no_retro_flag && project_config::is_retro_enabled(),
|
||||
dry_run: dry_run_mode,
|
||||
llm_client: llm_client.clone(),
|
||||
provider: provider_enum,
|
||||
model: model.clone(),
|
||||
},
|
||||
finalize: StartFinalizeConfig { preserve_sandbox },
|
||||
finalize: StartFinalizeOptions { preserve_sandbox },
|
||||
pull_request: StartPullRequestConfig {
|
||||
pr_config,
|
||||
github_app: github_app.clone(),
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use crate::outcome::{NodeResult, Outcome, StageStatus};
|
|||
use crate::state::RunState;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ExecutorSettings {
|
||||
pub struct ExecutorOptions {
|
||||
pub cancel_token: Option<Arc<AtomicBool>>,
|
||||
pub stall_token: Option<CancellationToken>,
|
||||
pub max_node_visits: Option<usize>,
|
||||
|
|
@ -25,7 +25,7 @@ pub struct ExecutorSettings {
|
|||
pub struct Executor<G: Graph> {
|
||||
handler: Arc<dyn NodeHandler<G>>,
|
||||
lifecycle: Box<dyn RunLifecycle<G>>,
|
||||
settings: ExecutorSettings,
|
||||
settings: ExecutorOptions,
|
||||
}
|
||||
|
||||
enum NextStep {
|
||||
|
|
@ -38,7 +38,7 @@ enum NextStep {
|
|||
pub struct ExecutorBuilder<G: Graph> {
|
||||
handler: Arc<dyn NodeHandler<G>>,
|
||||
lifecycle: Option<Box<dyn RunLifecycle<G>>>,
|
||||
settings: ExecutorSettings,
|
||||
settings: ExecutorOptions,
|
||||
}
|
||||
|
||||
impl<G: Graph + 'static> ExecutorBuilder<G> {
|
||||
|
|
@ -46,7 +46,7 @@ impl<G: Graph + 'static> ExecutorBuilder<G> {
|
|||
Self {
|
||||
handler,
|
||||
lifecycle: None,
|
||||
settings: ExecutorSettings::default(),
|
||||
settings: ExecutorOptions::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub mod test_fixtures;
|
|||
|
||||
pub use context::Context;
|
||||
pub use error::{CoreError, HandlerErrorDetail, Result, VisitLimitSource};
|
||||
pub use executor::{Executor, ExecutorBuilder, ExecutorSettings};
|
||||
pub use executor::{Executor, ExecutorBuilder, ExecutorOptions};
|
||||
pub use graph::{EdgeSelection, EdgeSpec, Graph, NodeSpec};
|
||||
pub use handler::NodeHandler;
|
||||
pub use lifecycle::{
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use crate::operations::{validate, validate_from_file, ValidateOptions};
|
|||
use crate::outcome::{Outcome, OutcomeExt, StageStatus};
|
||||
use crate::pipeline;
|
||||
use crate::pipeline::types::Initialized;
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
use fabro_graphviz::graph::{Graph, Node};
|
||||
|
||||
use super::{EngineServices, Handler};
|
||||
|
|
@ -133,7 +133,7 @@ impl Handler for SubWorkflowHandler {
|
|||
}
|
||||
};
|
||||
|
||||
// Build child RunSettings
|
||||
// Build child RunOptions
|
||||
let visit = crate::run_dir::visit_from_context(context) as u64;
|
||||
let child_logs = run_dir.join(format!("nodes/{}_{visit}/child", node.id));
|
||||
let _ = std::fs::create_dir_all(&child_logs);
|
||||
|
|
@ -143,7 +143,7 @@ impl Handler for SubWorkflowHandler {
|
|||
let child_cancel = Arc::clone(&cancel_token);
|
||||
|
||||
let git_state = services.git_state();
|
||||
let child_config = RunSettings {
|
||||
let child_config = RunOptions {
|
||||
config: fabro_config::FabroConfig::default(),
|
||||
run_dir: child_logs,
|
||||
cancel_token: Some(cancel_token),
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ pub mod records;
|
|||
mod retry;
|
||||
pub(crate) mod run_dir;
|
||||
pub mod run_lookup;
|
||||
pub mod run_settings;
|
||||
pub mod run_options;
|
||||
pub mod run_status;
|
||||
pub mod sandbox_git;
|
||||
#[doc(hidden)]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use crate::graph::WorkflowNode;
|
|||
use crate::outcome::StageUsage;
|
||||
use crate::records::Checkpoint;
|
||||
use crate::run_dir::{write_node_status, write_start_record};
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
|
||||
type WfRunState = RunState<Option<StageUsage>>;
|
||||
type WfNodeResult = NodeResult<Option<StageUsage>>;
|
||||
|
|
@ -25,7 +25,7 @@ pub struct DiskLifecycle {
|
|||
pub run_dir: PathBuf,
|
||||
pub run_id: String,
|
||||
pub graph: Arc<fabro_graphviz::graph::types::Graph>,
|
||||
pub config: Arc<RunSettings>,
|
||||
pub config: Arc<RunOptions>,
|
||||
pub emitter: Arc<EventEmitter>,
|
||||
pub circuit_breaker: Arc<CircuitBreakerLifecycle>,
|
||||
pub checkpoint_enabled: bool,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use crate::graph::WorkflowGraph;
|
|||
use crate::graph::WorkflowNode;
|
||||
use crate::outcome::{Outcome, StageStatus, StageUsage};
|
||||
use crate::run_dir::node_dir;
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
use crate::sandbox_git::{git_checkpoint, git_diff, git_push_host};
|
||||
|
||||
type WfRunState = RunState<Option<StageUsage>>;
|
||||
|
|
@ -35,7 +35,7 @@ pub struct GitLifecycle {
|
|||
pub emitter: Arc<EventEmitter>,
|
||||
pub run_dir: PathBuf,
|
||||
pub run_id: String,
|
||||
pub config: Arc<RunSettings>,
|
||||
pub config: Arc<RunOptions>,
|
||||
pub start_node_id: Option<String>,
|
||||
// Cross-lifecycle data (shared with EventLifecycle)
|
||||
pub checkpoint_git_result: Arc<Mutex<Option<GitCheckpointResult>>>,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ use crate::event::EventEmitter;
|
|||
use crate::graph::WorkflowGraph;
|
||||
use crate::graph::WorkflowNode;
|
||||
use crate::outcome::{Outcome, StageUsage};
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
use fabro_hooks::HookRunner;
|
||||
use fabro_sandbox::Sandbox;
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ impl WorkflowLifecycle {
|
|||
sandbox: Arc<dyn Sandbox>,
|
||||
graph: Arc<fabro_graphviz::graph::types::Graph>,
|
||||
run_dir: PathBuf,
|
||||
config: Arc<RunSettings>,
|
||||
config: Arc<RunOptions>,
|
||||
is_resume: bool,
|
||||
) -> Self {
|
||||
let restarted_from: Arc<Mutex<Option<(String, String)>>> = Arc::new(Mutex::new(None));
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ pub struct ValidateOptions {
|
|||
pub goal_override: Option<String>,
|
||||
}
|
||||
|
||||
pub struct RunCreateSettings {
|
||||
pub struct RunCreateOptions {
|
||||
pub config: FabroConfig,
|
||||
pub run_dir: Option<PathBuf>,
|
||||
pub run_id: Option<String>,
|
||||
|
|
@ -62,7 +62,7 @@ pub fn validate_from_file(path: &Path) -> Result<Validated, FabroError> {
|
|||
}
|
||||
|
||||
/// Parse, transform, validate, normalize config, and persist a run.
|
||||
pub fn create(dot_source: &str, settings: RunCreateSettings) -> Result<Persisted, FabroError> {
|
||||
pub fn create(dot_source: &str, settings: RunCreateOptions) -> Result<Persisted, FabroError> {
|
||||
let validated = preprocess_and_validate(
|
||||
dot_source,
|
||||
settings.base_dir.clone(),
|
||||
|
|
@ -83,7 +83,7 @@ pub fn create(dot_source: &str, settings: RunCreateSettings) -> Result<Persisted
|
|||
/// Read a DOT file, apply file inlining from its parent directory, then create.
|
||||
pub fn create_from_file(
|
||||
path: &Path,
|
||||
mut settings: RunCreateSettings,
|
||||
mut settings: RunCreateOptions,
|
||||
) -> Result<Persisted, FabroError> {
|
||||
let source = std::fs::read_to_string(path)
|
||||
.map_err(|e| FabroError::Parse(format!("Failed to read {}: {e}", path.display())))?;
|
||||
|
|
@ -99,7 +99,7 @@ pub fn create_from_file(
|
|||
#[doc(hidden)]
|
||||
pub fn create_from_graph(
|
||||
mut graph: Graph,
|
||||
settings: RunCreateSettings,
|
||||
settings: RunCreateOptions,
|
||||
) -> Result<Persisted, FabroError> {
|
||||
if let Some(goal_override) = settings.goal_override.as_deref() {
|
||||
apply_goal_override(&mut graph, Some(goal_override));
|
||||
|
|
@ -150,9 +150,9 @@ fn apply_goal_override(graph: &mut Graph, goal_override: Option<&str>) {
|
|||
|
||||
fn persist_validated(
|
||||
validated: Validated,
|
||||
settings: RunCreateSettings,
|
||||
settings: RunCreateOptions,
|
||||
) -> Result<Persisted, FabroError> {
|
||||
let RunCreateSettings {
|
||||
let RunCreateOptions {
|
||||
mut config,
|
||||
run_dir,
|
||||
run_id,
|
||||
|
|
@ -419,7 +419,7 @@ mod tests {
|
|||
}"#;
|
||||
let err = create(
|
||||
dot,
|
||||
RunCreateSettings {
|
||||
RunCreateOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: None,
|
||||
run_id: None,
|
||||
|
|
@ -447,7 +447,7 @@ mod tests {
|
|||
let dir = tempfile::tempdir().unwrap();
|
||||
let persisted = create(
|
||||
MINIMAL_DOT,
|
||||
RunCreateSettings {
|
||||
RunCreateOptions {
|
||||
config: FabroConfig {
|
||||
llm: Some(fabro_config::run::LlmConfig {
|
||||
model: Some("sonnet".to_string()),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ mod start;
|
|||
|
||||
pub use create::{
|
||||
create, create_from_file, create_from_graph, default_run_dir, validate, validate_from_file,
|
||||
RunCreateSettings, ValidateOptions,
|
||||
RunCreateOptions, ValidateOptions,
|
||||
};
|
||||
pub use fork::fork;
|
||||
pub use rewind::{
|
||||
|
|
@ -13,5 +13,5 @@ pub use rewind::{
|
|||
TimelineEntry,
|
||||
};
|
||||
pub use start::{
|
||||
start, StartFinalizeConfig, StartOptions, StartPullRequestConfig, StartRetroConfig, Started,
|
||||
start, StartFinalizeOptions, StartOptions, StartPullRequestConfig, StartRetroOptions, Started,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use crate::pipeline::{
|
|||
self, FinalizeOptions, Finalized, InitOptions, Persisted, PullRequestOptions, RetroOptions,
|
||||
};
|
||||
|
||||
pub struct StartRetroConfig {
|
||||
pub struct StartRetroOptions {
|
||||
pub enabled: bool,
|
||||
pub dry_run: bool,
|
||||
pub llm_client: Option<fabro_llm::client::Client>,
|
||||
|
|
@ -16,7 +16,7 @@ pub struct StartRetroConfig {
|
|||
pub model: String,
|
||||
}
|
||||
|
||||
pub struct StartFinalizeConfig {
|
||||
pub struct StartFinalizeOptions {
|
||||
pub preserve_sandbox: bool,
|
||||
}
|
||||
|
||||
|
|
@ -29,8 +29,8 @@ pub struct StartPullRequestConfig {
|
|||
|
||||
pub struct StartOptions {
|
||||
pub init: InitOptions,
|
||||
pub retro: StartRetroConfig,
|
||||
pub finalize: StartFinalizeConfig,
|
||||
pub retro: StartRetroOptions,
|
||||
pub finalize: StartFinalizeOptions,
|
||||
pub pull_request: StartPullRequestConfig,
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ mod tests {
|
|||
use crate::handler::start::StartHandler;
|
||||
use crate::handler::{Handler, HandlerRegistry};
|
||||
use crate::outcome::Outcome;
|
||||
use crate::run_settings::{LifecycleConfig, RunSettings};
|
||||
use crate::run_options::{LifecycleOptions, RunOptions};
|
||||
|
||||
const MINIMAL_DOT: &str = r#"digraph Test {
|
||||
graph [goal="Build feature"]
|
||||
|
|
@ -353,7 +353,7 @@ mod tests {
|
|||
fn persisted_workflow(dot: &str, run_dir: &std::path::Path) -> Persisted {
|
||||
crate::operations::create(
|
||||
dot,
|
||||
crate::operations::RunCreateSettings {
|
||||
crate::operations::RunCreateOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: Some(run_dir.to_path_buf()),
|
||||
run_id: Some("run-test".to_string()),
|
||||
|
|
@ -369,8 +369,8 @@ mod tests {
|
|||
.unwrap()
|
||||
}
|
||||
|
||||
fn test_settings(run_dir: &std::path::Path) -> RunSettings {
|
||||
RunSettings {
|
||||
fn test_settings(run_dir: &std::path::Path) -> RunOptions {
|
||||
RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -399,7 +399,7 @@ mod tests {
|
|||
sandbox: Arc<dyn Sandbox>,
|
||||
emitter: Arc<EventEmitter>,
|
||||
registry: Arc<HandlerRegistry>,
|
||||
lifecycle: LifecycleConfig,
|
||||
lifecycle: LifecycleOptions,
|
||||
preserve_sandbox: bool,
|
||||
) -> StartOptions {
|
||||
StartOptions {
|
||||
|
|
@ -410,20 +410,20 @@ mod tests {
|
|||
sandbox,
|
||||
registry,
|
||||
lifecycle,
|
||||
run_settings: test_settings(run_dir),
|
||||
run_options: test_settings(run_dir),
|
||||
hooks: fabro_hooks::HookConfig { hooks: vec![] },
|
||||
sandbox_env: HashMap::new(),
|
||||
checkpoint: None,
|
||||
seed_context: None,
|
||||
},
|
||||
retro: StartRetroConfig {
|
||||
retro: StartRetroOptions {
|
||||
enabled: false,
|
||||
dry_run: false,
|
||||
llm_client: None,
|
||||
provider: fabro_llm::Provider::Anthropic,
|
||||
model: "test-model".to_string(),
|
||||
},
|
||||
finalize: StartFinalizeConfig { preserve_sandbox },
|
||||
finalize: StartFinalizeOptions { preserve_sandbox },
|
||||
pull_request: StartPullRequestConfig {
|
||||
pr_config: None,
|
||||
github_app: None,
|
||||
|
|
@ -460,7 +460,7 @@ mod tests {
|
|||
sandbox,
|
||||
emitter,
|
||||
registry,
|
||||
LifecycleConfig {
|
||||
LifecycleOptions {
|
||||
setup_commands: vec!["false".to_string()],
|
||||
setup_command_timeout_ms: 1_000,
|
||||
devcontainer_phases: vec![],
|
||||
|
|
@ -492,7 +492,7 @@ mod tests {
|
|||
sandbox,
|
||||
emitter,
|
||||
registry,
|
||||
LifecycleConfig {
|
||||
LifecycleOptions {
|
||||
setup_commands: vec![],
|
||||
setup_command_timeout_ms: 1_000,
|
||||
devcontainer_phases: vec![],
|
||||
|
|
@ -531,7 +531,7 @@ mod tests {
|
|||
sandbox,
|
||||
emitter,
|
||||
registry,
|
||||
LifecycleConfig {
|
||||
LifecycleOptions {
|
||||
setup_commands: vec![],
|
||||
setup_command_timeout_ms: 1_000,
|
||||
devcontainer_phases: vec![],
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use crate::outcome::{Outcome, OutcomeExt, StageStatus};
|
|||
use crate::pipeline::initialize;
|
||||
use crate::pipeline::types::{InitOptions, Persisted};
|
||||
use crate::records::{Checkpoint, RunRecord};
|
||||
use crate::run_settings::{GitCheckpointSettings, LifecycleConfig, RunSettings};
|
||||
use crate::run_options::{GitCheckpointOptions, LifecycleOptions, RunOptions};
|
||||
use crate::test_support::run_graph;
|
||||
|
||||
fn local_env() -> Arc<dyn Sandbox> {
|
||||
|
|
@ -66,8 +66,8 @@ fn make_registry() -> HandlerRegistry {
|
|||
registry
|
||||
}
|
||||
|
||||
fn test_settings(run_dir: &Path, run_id: &str) -> RunSettings {
|
||||
RunSettings {
|
||||
fn test_settings(run_dir: &Path, run_id: &str) -> RunOptions {
|
||||
RunOptions {
|
||||
run_dir: run_dir.to_path_buf(),
|
||||
cancel_token: None,
|
||||
dry_run: false,
|
||||
|
|
@ -131,8 +131,8 @@ fn persisted_workflow(graph: Graph, source: String, run_dir: &Path, run_id: &str
|
|||
)
|
||||
}
|
||||
|
||||
fn test_lifecycle(setup_commands: Vec<String>) -> LifecycleConfig {
|
||||
LifecycleConfig {
|
||||
fn test_lifecycle(setup_commands: Vec<String>) -> LifecycleOptions {
|
||||
LifecycleOptions {
|
||||
setup_commands,
|
||||
setup_command_timeout_ms: 300_000,
|
||||
devcontainer_phases: Vec::new(),
|
||||
|
|
@ -155,12 +155,12 @@ async fn execute_runs_start_to_exit_and_returns_final_context() {
|
|||
std::env::current_dir().unwrap(),
|
||||
)),
|
||||
registry: Arc::new(default_registry(Arc::new(AutoApproveInterviewer), || None)),
|
||||
lifecycle: LifecycleConfig {
|
||||
lifecycle: LifecycleOptions {
|
||||
setup_commands: vec![],
|
||||
setup_command_timeout_ms: 1_000,
|
||||
devcontainer_phases: vec![],
|
||||
},
|
||||
run_settings: test_settings(&run_dir, "run-test"),
|
||||
run_options: test_settings(&run_dir, "run-test"),
|
||||
hooks: HookConfig { hooks: vec![] },
|
||||
sandbox_env: HashMap::new(),
|
||||
checkpoint: None,
|
||||
|
|
@ -189,8 +189,8 @@ async fn run_with_lifecycle(
|
|||
emitter: Arc<EventEmitter>,
|
||||
sandbox: Arc<dyn Sandbox>,
|
||||
graph: &Graph,
|
||||
settings: RunSettings,
|
||||
lifecycle: LifecycleConfig,
|
||||
settings: RunOptions,
|
||||
lifecycle: LifecycleOptions,
|
||||
) -> Result<Outcome, FabroError> {
|
||||
let run_dir = settings.run_dir.clone();
|
||||
let run_id = settings.run_id.clone();
|
||||
|
|
@ -204,7 +204,7 @@ async fn run_with_lifecycle(
|
|||
sandbox,
|
||||
registry: Arc::new(registry),
|
||||
lifecycle,
|
||||
run_settings: settings,
|
||||
run_options: settings,
|
||||
hooks: HookConfig { hooks: vec![] },
|
||||
sandbox_env: HashMap::new(),
|
||||
checkpoint: None,
|
||||
|
|
@ -505,7 +505,7 @@ async fn execute_conditional_routing_uses_unconditional_success_path() {
|
|||
async fn execute_writes_start_json_and_node_status() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let mut settings = test_settings(dir.path(), "test-run");
|
||||
settings.git = Some(GitCheckpointSettings {
|
||||
settings.git = Some(GitCheckpointOptions {
|
||||
base_sha: Some("abc123".into()),
|
||||
run_branch: Some("fabro/run/test-run".into()),
|
||||
meta_branch: None,
|
||||
|
|
@ -917,7 +917,7 @@ async fn git_checkpoint_skips_start_node() {
|
|||
|
||||
let sandbox: Arc<dyn Sandbox> = Arc::new(fabro_agent::LocalSandbox::new(repo.to_path_buf()));
|
||||
let mut settings = test_settings(run_tmp.path(), "git-cp-test");
|
||||
settings.git = Some(GitCheckpointSettings {
|
||||
settings.git = Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha),
|
||||
run_branch: None,
|
||||
meta_branch: Some(crate::git::MetadataStore::branch_name("git-cp-test")),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use crate::event::{EventEmitter, RunNoticeLevel, WorkflowRunEvent};
|
|||
use crate::outcome::{Outcome, OutcomeExt, StageStatus};
|
||||
use crate::records::Checkpoint;
|
||||
use crate::records::Conclusion;
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
use crate::run_status::{RunStatus, StatusReason};
|
||||
use fabro_hooks::{HookContext, HookEvent, HookRunner};
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ pub fn persist_terminal_outcome(
|
|||
///
|
||||
/// This captures the last diff.patch (written after the final checkpoint) and retro.json.
|
||||
/// Best-effort: errors are logged as warnings.
|
||||
pub async fn write_finalize_commit(config: &RunSettings, run_dir: &Path) {
|
||||
pub async fn write_finalize_commit(config: &RunOptions, run_dir: &Path) {
|
||||
let (Some(meta_branch), Some(repo_path)) = (
|
||||
config.git.as_ref().and_then(|g| g.meta_branch.as_ref()),
|
||||
config.host_repo_path.as_ref(),
|
||||
|
|
@ -299,10 +299,10 @@ mod tests {
|
|||
|
||||
use super::*;
|
||||
use crate::pipeline::types::Retroed;
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
|
||||
fn test_settings(run_dir: &std::path::Path) -> RunSettings {
|
||||
RunSettings {
|
||||
fn test_settings(run_dir: &std::path::Path) -> RunOptions {
|
||||
RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use fabro_hooks::{HookContext, HookDecision, HookEvent, HookRunner};
|
|||
|
||||
use crate::error::FabroError;
|
||||
use crate::event::WorkflowRunEvent;
|
||||
use crate::run_settings::GitCheckpointSettings;
|
||||
use crate::run_options::GitCheckpointOptions;
|
||||
|
||||
use super::types::{InitOptions, Initialized, Persisted};
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ pub async fn initialize(
|
|||
mut options: InitOptions,
|
||||
) -> Result<Initialized, FabroError> {
|
||||
let (graph, source, _diagnostics, run_dir, _run_record) = persisted.into_parts();
|
||||
options.run_settings.run_dir = run_dir;
|
||||
options.run_options.run_dir = run_dir;
|
||||
|
||||
let hook_runner = if options.hooks.hooks.is_empty() {
|
||||
None
|
||||
|
|
@ -48,7 +48,7 @@ pub async fn initialize(
|
|||
|
||||
let hook_ctx = HookContext::new(
|
||||
HookEvent::SandboxReady,
|
||||
options.run_settings.run_id.clone(),
|
||||
options.run_options.run_id.clone(),
|
||||
graph.name.clone(),
|
||||
);
|
||||
let decision = run_hooks(
|
||||
|
|
@ -68,7 +68,7 @@ pub async fn initialize(
|
|||
});
|
||||
|
||||
let has_run_branch = options
|
||||
.run_settings
|
||||
.run_options
|
||||
.git
|
||||
.as_ref()
|
||||
.and_then(|g| g.run_branch.as_ref())
|
||||
|
|
@ -76,25 +76,25 @@ pub async fn initialize(
|
|||
if !has_run_branch {
|
||||
match options
|
||||
.sandbox
|
||||
.setup_git_for_run(&options.run_settings.run_id)
|
||||
.setup_git_for_run(&options.run_options.run_id)
|
||||
.await
|
||||
{
|
||||
Ok(Some(info)) => {
|
||||
let base_sha = options
|
||||
.run_settings
|
||||
.run_options
|
||||
.git
|
||||
.as_ref()
|
||||
.and_then(|g| g.base_sha.clone())
|
||||
.or(Some(info.base_sha));
|
||||
options.run_settings.git = Some(GitCheckpointSettings {
|
||||
options.run_options.git = Some(GitCheckpointOptions {
|
||||
base_sha,
|
||||
run_branch: Some(info.run_branch.clone()),
|
||||
meta_branch: Some(crate::git::MetadataStore::branch_name(
|
||||
&options.run_settings.run_id,
|
||||
&options.run_options.run_id,
|
||||
)),
|
||||
});
|
||||
if options.run_settings.base_branch.is_none() {
|
||||
options.run_settings.base_branch = info.base_branch;
|
||||
if options.run_options.base_branch.is_none() {
|
||||
options.run_options.base_branch = info.base_branch;
|
||||
}
|
||||
}
|
||||
Ok(None) => {}
|
||||
|
|
@ -173,7 +173,7 @@ pub async fn initialize(
|
|||
Ok(Initialized {
|
||||
graph,
|
||||
source,
|
||||
settings: options.run_settings,
|
||||
settings: options.run_options,
|
||||
checkpoint: options.checkpoint,
|
||||
seed_context: options.seed_context,
|
||||
emitter: options.emitter,
|
||||
|
|
@ -199,7 +199,7 @@ mod tests {
|
|||
use crate::handler::default_registry;
|
||||
use crate::pipeline::types::PersistOptions;
|
||||
use crate::records::RunRecord;
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
|
||||
fn simple_graph() -> (Graph, String) {
|
||||
let source = r#"digraph test {
|
||||
|
|
@ -225,8 +225,8 @@ mod tests {
|
|||
(graph, source)
|
||||
}
|
||||
|
||||
fn test_settings(run_dir: &std::path::Path) -> RunSettings {
|
||||
RunSettings {
|
||||
fn test_settings(run_dir: &std::path::Path) -> RunOptions {
|
||||
RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -283,12 +283,12 @@ mod tests {
|
|||
emitter,
|
||||
sandbox,
|
||||
registry,
|
||||
lifecycle: crate::run_settings::LifecycleConfig {
|
||||
lifecycle: crate::run_options::LifecycleOptions {
|
||||
setup_commands: vec![],
|
||||
setup_command_timeout_ms: 1_000,
|
||||
devcontainer_phases: vec![],
|
||||
},
|
||||
run_settings: test_settings(&run_dir),
|
||||
run_options: test_settings(&run_dir),
|
||||
hooks: fabro_hooks::HookConfig { hooks: vec![] },
|
||||
sandbox_env: HashMap::from([("TEST_KEY".to_string(), "value".to_string())]),
|
||||
checkpoint: None,
|
||||
|
|
@ -328,12 +328,12 @@ mod tests {
|
|||
emitter,
|
||||
sandbox,
|
||||
registry,
|
||||
lifecycle: crate::run_settings::LifecycleConfig {
|
||||
lifecycle: crate::run_options::LifecycleOptions {
|
||||
setup_commands: vec![],
|
||||
setup_command_timeout_ms: 1_000,
|
||||
devcontainer_phases: vec![],
|
||||
},
|
||||
run_settings: test_settings(&run_dir),
|
||||
run_options: test_settings(&run_dir),
|
||||
hooks: fabro_hooks::HookConfig { hooks: vec![] },
|
||||
sandbox_env: HashMap::new(),
|
||||
checkpoint: None,
|
||||
|
|
@ -387,12 +387,12 @@ mod tests {
|
|||
emitter,
|
||||
sandbox,
|
||||
registry,
|
||||
lifecycle: crate::run_settings::LifecycleConfig {
|
||||
lifecycle: crate::run_options::LifecycleOptions {
|
||||
setup_commands: vec![],
|
||||
setup_command_timeout_ms: 1_000,
|
||||
devcontainer_phases: vec![],
|
||||
},
|
||||
run_settings: test_settings(&wrong_run_dir),
|
||||
run_options: test_settings(&wrong_run_dir),
|
||||
hooks: fabro_hooks::HookConfig { hooks: vec![] },
|
||||
sandbox_env: HashMap::new(),
|
||||
checkpoint: None,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ pub use initialize::initialize;
|
|||
pub use parse::parse;
|
||||
pub(crate) use persist::persist;
|
||||
pub use pull_request::{
|
||||
build_pr_body, maybe_open_pull_request, pull_request, AutoMergeConfig, PullRequestRecord,
|
||||
build_pr_body, maybe_open_pull_request, pull_request, AutoMergeOptions, PullRequestRecord,
|
||||
};
|
||||
pub use retro::{retro, run_retro};
|
||||
pub use transform::transform;
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ pub async fn build_pr_body(
|
|||
}
|
||||
|
||||
/// Auto-merge configuration for a pull request.
|
||||
pub struct AutoMergeConfig {
|
||||
pub struct AutoMergeOptions {
|
||||
pub merge_strategy: MergeStrategy,
|
||||
}
|
||||
|
||||
|
|
@ -408,7 +408,7 @@ pub async fn maybe_open_pull_request(
|
|||
diff: &str,
|
||||
model: &str,
|
||||
draft: bool,
|
||||
auto_merge: Option<AutoMergeConfig>,
|
||||
auto_merge: Option<AutoMergeOptions>,
|
||||
run_dir: &Path,
|
||||
conclusion: Option<&Conclusion>,
|
||||
) -> Result<Option<PullRequestRecord>, String> {
|
||||
|
|
@ -505,7 +505,7 @@ pub async fn pull_request(concluded: Concluded, options: &PullRequestOptions) ->
|
|||
&options.origin_url,
|
||||
) {
|
||||
let auto_merge = if pr_cfg.auto_merge {
|
||||
Some(AutoMergeConfig {
|
||||
Some(AutoMergeOptions {
|
||||
merge_strategy: pr_cfg.merge_strategy,
|
||||
})
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ mod tests {
|
|||
use crate::event::{EventEmitter, WorkflowRunEvent};
|
||||
use crate::pipeline::types::Executed;
|
||||
use crate::records::Checkpoint;
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
|
||||
fn write_checkpoint(run_dir: &std::path::Path) {
|
||||
let context = Context::new();
|
||||
|
|
@ -176,8 +176,8 @@ mod tests {
|
|||
checkpoint.save(&run_dir.join("checkpoint.json")).unwrap();
|
||||
}
|
||||
|
||||
fn test_settings(run_dir: &std::path::Path) -> RunSettings {
|
||||
RunSettings {
|
||||
fn test_settings(run_dir: &std::path::Path) -> RunOptions {
|
||||
RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use crate::event::EventEmitter;
|
|||
use crate::handler::HandlerRegistry;
|
||||
use crate::outcome::Outcome;
|
||||
use crate::records::{Checkpoint, Conclusion, RunRecord};
|
||||
use crate::run_settings::{LifecycleConfig, RunSettings};
|
||||
use crate::run_options::{LifecycleOptions, RunOptions};
|
||||
use fabro_validate::Severity;
|
||||
|
||||
/// Output of the PARSE phase.
|
||||
|
|
@ -195,8 +195,8 @@ pub struct InitOptions {
|
|||
pub emitter: Arc<EventEmitter>,
|
||||
pub sandbox: Arc<dyn Sandbox>,
|
||||
pub registry: Arc<HandlerRegistry>,
|
||||
pub lifecycle: LifecycleConfig,
|
||||
pub run_settings: RunSettings,
|
||||
pub lifecycle: LifecycleOptions,
|
||||
pub run_options: RunOptions,
|
||||
pub hooks: fabro_hooks::HookConfig,
|
||||
pub sandbox_env: HashMap<String, String>,
|
||||
pub checkpoint: Option<Checkpoint>,
|
||||
|
|
@ -208,7 +208,7 @@ pub struct InitOptions {
|
|||
pub struct Initialized {
|
||||
pub graph: Graph,
|
||||
pub source: String,
|
||||
pub settings: RunSettings,
|
||||
pub settings: RunOptions,
|
||||
pub(crate) checkpoint: Option<Checkpoint>,
|
||||
pub(crate) seed_context: Option<Context>,
|
||||
pub emitter: Arc<EventEmitter>,
|
||||
|
|
@ -224,7 +224,7 @@ pub struct Initialized {
|
|||
pub struct Executed {
|
||||
pub graph: Graph,
|
||||
pub outcome: Result<Outcome, FabroError>,
|
||||
pub settings: RunSettings,
|
||||
pub settings: RunOptions,
|
||||
pub hook_runner: Option<Arc<HookRunner>>,
|
||||
pub emitter: Arc<EventEmitter>,
|
||||
pub sandbox: Arc<dyn Sandbox>,
|
||||
|
|
@ -237,7 +237,7 @@ pub struct Executed {
|
|||
pub struct Retroed {
|
||||
pub graph: Graph,
|
||||
pub outcome: Result<Outcome, FabroError>,
|
||||
pub settings: RunSettings,
|
||||
pub settings: RunOptions,
|
||||
pub hook_runner: Option<Arc<HookRunner>>,
|
||||
pub emitter: Arc<EventEmitter>,
|
||||
pub sandbox: Arc<dyn Sandbox>,
|
||||
|
|
@ -253,7 +253,7 @@ pub struct Concluded {
|
|||
pub conclusion: Conclusion,
|
||||
pub pushed_branch: Option<String>,
|
||||
pub graph: Graph,
|
||||
pub settings: RunSettings,
|
||||
pub settings: RunOptions,
|
||||
pub emitter: Arc<EventEmitter>,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
pub use crate::pipeline::{
|
||||
build_pr_body, maybe_open_pull_request, AutoMergeConfig, PullRequestRecord,
|
||||
build_pr_body, maybe_open_pull_request, AutoMergeOptions, PullRequestRecord,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ use chrono::Utc;
|
|||
|
||||
use crate::context::Context;
|
||||
use crate::outcome::{Outcome, OutcomeExt};
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
|
||||
/// Write start.json at the start of a workflow run. Returns the StartRecord.
|
||||
pub(crate) fn write_start_record(
|
||||
run_dir: &Path,
|
||||
settings: &RunSettings,
|
||||
settings: &RunOptions,
|
||||
) -> crate::records::StartRecord {
|
||||
let git_state = settings.git.as_ref();
|
||||
let record = crate::records::StartRecord {
|
||||
|
|
|
|||
|
|
@ -8,17 +8,17 @@ use fabro_config::run::PullRequestConfig;
|
|||
|
||||
use crate::git::GitAuthor;
|
||||
|
||||
/// Git checkpoint settings for a workflow run.
|
||||
/// Git checkpoint options for a workflow run.
|
||||
#[derive(Clone)]
|
||||
pub struct GitCheckpointSettings {
|
||||
pub struct GitCheckpointOptions {
|
||||
pub base_sha: Option<String>,
|
||||
pub run_branch: Option<String>,
|
||||
pub meta_branch: Option<String>,
|
||||
}
|
||||
|
||||
/// Configuration for a workflow run.
|
||||
/// Options for a workflow run.
|
||||
#[derive(Clone)]
|
||||
pub struct RunSettings {
|
||||
pub struct RunOptions {
|
||||
pub config: FabroConfig,
|
||||
pub run_dir: PathBuf,
|
||||
pub cancel_token: Option<Arc<AtomicBool>>,
|
||||
|
|
@ -37,11 +37,11 @@ pub struct RunSettings {
|
|||
pub host_repo_path: Option<PathBuf>,
|
||||
/// Name of the branch the run was started from (for PR base).
|
||||
pub base_branch: Option<String>,
|
||||
/// Git checkpoint settings; `None` means checkpointing disabled.
|
||||
pub git: Option<GitCheckpointSettings>,
|
||||
/// Git checkpoint options; `None` means checkpointing disabled.
|
||||
pub git: Option<GitCheckpointOptions>,
|
||||
}
|
||||
|
||||
impl RunSettings {
|
||||
impl RunOptions {
|
||||
pub fn checkpoint_exclude_globs(&self) -> &[String] {
|
||||
&self.config.checkpoint.exclude_globs
|
||||
}
|
||||
|
|
@ -60,8 +60,8 @@ impl RunSettings {
|
|||
}
|
||||
}
|
||||
|
||||
/// Configuration for sandbox lifecycle management within the engine.
|
||||
pub struct LifecycleConfig {
|
||||
/// Options for sandbox lifecycle management within the engine.
|
||||
pub struct LifecycleOptions {
|
||||
/// Setup commands to run inside the sandbox after initialization.
|
||||
pub setup_commands: Vec<String>,
|
||||
/// Timeout in milliseconds for each setup command.
|
||||
|
|
@ -10,7 +10,7 @@ use crate::outcome::Outcome;
|
|||
use crate::pipeline;
|
||||
use crate::pipeline::types::Initialized;
|
||||
use crate::records::Checkpoint;
|
||||
use crate::run_settings::RunSettings;
|
||||
use crate::run_options::RunOptions;
|
||||
|
||||
struct InitializedOptions {
|
||||
hook_runner: Option<Arc<fabro_hooks::HookRunner>>,
|
||||
|
|
@ -23,7 +23,7 @@ fn initialized(
|
|||
emitter: Arc<EventEmitter>,
|
||||
sandbox: Arc<dyn Sandbox>,
|
||||
graph: &fabro_graphviz::graph::Graph,
|
||||
settings: &RunSettings,
|
||||
settings: &RunOptions,
|
||||
options: InitializedOptions,
|
||||
) -> Initialized {
|
||||
std::fs::create_dir_all(&settings.run_dir).expect("failed to create run dir");
|
||||
|
|
@ -47,7 +47,7 @@ pub async fn run_graph(
|
|||
emitter: Arc<EventEmitter>,
|
||||
sandbox: Arc<dyn Sandbox>,
|
||||
graph: &fabro_graphviz::graph::Graph,
|
||||
settings: &RunSettings,
|
||||
settings: &RunOptions,
|
||||
) -> Result<Outcome> {
|
||||
let executed = pipeline::execute(initialized(
|
||||
registry,
|
||||
|
|
@ -70,7 +70,7 @@ pub async fn run_graph_with_hooks(
|
|||
emitter: Arc<EventEmitter>,
|
||||
sandbox: Arc<dyn Sandbox>,
|
||||
graph: &fabro_graphviz::graph::Graph,
|
||||
settings: &RunSettings,
|
||||
settings: &RunOptions,
|
||||
hook_runner: Arc<fabro_hooks::HookRunner>,
|
||||
env: Option<HashMap<String, String>>,
|
||||
) -> Result<Outcome> {
|
||||
|
|
@ -95,7 +95,7 @@ pub async fn run_graph_from_checkpoint(
|
|||
emitter: Arc<EventEmitter>,
|
||||
sandbox: Arc<dyn Sandbox>,
|
||||
graph: &fabro_graphviz::graph::Graph,
|
||||
settings: &RunSettings,
|
||||
settings: &RunOptions,
|
||||
checkpoint: &Checkpoint,
|
||||
) -> Result<Outcome> {
|
||||
let executed = pipeline::execute(initialized(
|
||||
|
|
@ -137,7 +137,7 @@ impl WorkflowRunner {
|
|||
pub async fn run(
|
||||
&self,
|
||||
graph: &fabro_graphviz::graph::Graph,
|
||||
settings: &RunSettings,
|
||||
settings: &RunOptions,
|
||||
) -> Result<Outcome> {
|
||||
let registry = self
|
||||
.registry
|
||||
|
|
@ -158,7 +158,7 @@ impl WorkflowRunner {
|
|||
pub async fn run_from_checkpoint(
|
||||
&self,
|
||||
graph: &fabro_graphviz::graph::Graph,
|
||||
settings: &RunSettings,
|
||||
settings: &RunOptions,
|
||||
checkpoint: &Checkpoint,
|
||||
) -> Result<Outcome> {
|
||||
let registry = self
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use fabro_workflows::handler::start::StartHandler;
|
|||
use fabro_workflows::handler::{Handler, HandlerRegistry};
|
||||
use fabro_workflows::outcome::{Outcome, OutcomeExt, StageStatus};
|
||||
use fabro_workflows::records::Checkpoint;
|
||||
use fabro_workflows::run_settings::{GitCheckpointSettings, RunSettings};
|
||||
use fabro_workflows::run_options::{GitCheckpointOptions, RunOptions};
|
||||
use fabro_workflows::test_support::WorkflowRunner;
|
||||
|
||||
async fn create_env() -> DaytonaSandbox {
|
||||
|
|
@ -388,7 +388,7 @@ async fn daytona_pipeline_artifact_offload_and_sync() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), env.clone());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -579,7 +579,7 @@ async fn daytona_git_checkpoint_remote_emits_events() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), env.clone());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -591,7 +591,7 @@ async fn daytona_git_checkpoint_remote_emits_events() {
|
|||
github_app: None,
|
||||
base_branch: None,
|
||||
host_repo_path: Some(dir.path().to_path_buf()),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha),
|
||||
run_branch: Some(branch_name),
|
||||
meta_branch: None,
|
||||
|
|
@ -765,7 +765,7 @@ async fn daytona_parallel_git_branching_e2e() {
|
|||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), Arc::clone(&env));
|
||||
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_tmp.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -777,7 +777,7 @@ async fn daytona_parallel_git_branching_e2e() {
|
|||
github_app: None,
|
||||
base_branch: None,
|
||||
host_repo_path: Some(run_tmp.path().to_path_buf()),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha),
|
||||
run_branch: Some(branch_name),
|
||||
meta_branch: None,
|
||||
|
|
@ -1141,7 +1141,7 @@ async fn daytona_git_checkpoint_with_shadow_branch() {
|
|||
|
||||
let meta_branch = MetadataStore::branch_name(&run_id);
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), env.clone());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1153,7 +1153,7 @@ async fn daytona_git_checkpoint_with_shadow_branch() {
|
|||
github_app: None,
|
||||
base_branch: None,
|
||||
host_repo_path: Some(host_repo.path().to_path_buf()),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha),
|
||||
run_branch: Some(branch_name),
|
||||
meta_branch: Some(meta_branch),
|
||||
|
|
@ -1281,7 +1281,7 @@ async fn daytona_asset_collection() {
|
|||
graph.edges.push(Edge::new("start", "create_assets"));
|
||||
graph.edges.push(Edge::new("create_assets", "exit"));
|
||||
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig {
|
||||
assets: Some(fabro_config::run::AssetsConfig {
|
||||
include: vec!["test-results/**".to_string()],
|
||||
|
|
@ -1537,7 +1537,7 @@ async fn daytona_git_push_run_branch_to_origin() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), env.clone());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1549,7 +1549,7 @@ async fn daytona_git_push_run_branch_to_origin() {
|
|||
github_app: None,
|
||||
base_branch: None,
|
||||
host_repo_path: Some(dir.path().to_path_buf()),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha),
|
||||
run_branch: Some(branch_name.clone()),
|
||||
meta_branch: None,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ use fabro_workflows::handler::wait::WaitHandler;
|
|||
use fabro_workflows::handler::{Handler, HandlerRegistry};
|
||||
use fabro_workflows::outcome::{Outcome, OutcomeExt, StageStatus};
|
||||
use fabro_workflows::records::Checkpoint;
|
||||
use fabro_workflows::run_settings::{GitCheckpointSettings, RunSettings};
|
||||
use fabro_workflows::run_options::{GitCheckpointOptions, RunOptions};
|
||||
use fabro_workflows::stylesheet::{apply_stylesheet, parse_stylesheet};
|
||||
use fabro_workflows::test_support::{run_graph_with_hooks, WorkflowRunner};
|
||||
use fabro_workflows::transform::{
|
||||
|
|
@ -193,7 +193,7 @@ async fn end_to_end_linear_pipeline() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -332,7 +332,7 @@ async fn end_to_end_branching_pipeline() {
|
|||
registry.register("conditional", Box::new(ConditionalHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -452,7 +452,7 @@ async fn end_to_end_human_gate_pipeline() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -548,7 +548,7 @@ async fn human_gate_aborted_input_fails_closed_without_fail_route() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -659,7 +659,7 @@ async fn human_gate_aborted_input_routes_via_outcome_fail_condition() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -772,7 +772,7 @@ async fn goal_gate_routes_to_retry_target_on_failure() {
|
|||
registry.register("always_fail", Box::new(AlwaysFailHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -893,7 +893,7 @@ async fn goal_gate_routes_to_retry_target_when_present() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1205,7 +1205,7 @@ async fn retry_on_failure_then_succeed() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1280,7 +1280,7 @@ async fn pipeline_with_many_nodes() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1602,7 +1602,7 @@ async fn smoke_test_with_mock_codergen_backend() {
|
|||
registry.register("conditional", Box::new(ConditionalHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1703,7 +1703,7 @@ async fn end_to_end_parallel_fan_out_fan_in() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1816,7 +1816,7 @@ async fn resume_from_checkpoint_completes_pipeline() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1915,7 +1915,7 @@ async fn resume_from_checkpoint_preserves_goal_gate_outcomes() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1958,7 +1958,7 @@ async fn graph_goal_in_context() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -1994,7 +1994,7 @@ async fn event_streaming_lifecycle() {
|
|||
let emitter = EventEmitter::new();
|
||||
let events = collect_events(&emitter);
|
||||
let engine = WorkflowRunner::new(make_linear_registry(), Arc::new(emitter), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2074,7 +2074,7 @@ async fn context_flow_between_stages() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2127,7 +2127,7 @@ async fn tool_handler_e2e() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2197,7 +2197,7 @@ async fn auto_approve_interviewer_e2e() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2234,7 +2234,7 @@ async fn codergen_without_backend_simulated() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2339,7 +2339,7 @@ async fn branching_loop_back_on_failure() {
|
|||
}),
|
||||
);
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2422,7 +2422,7 @@ async fn human_gate_loops_back() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2480,7 +2480,7 @@ async fn scenario_ship_a_feature() {
|
|||
Arc::new(emitter),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2566,7 +2566,7 @@ async fn scenario_parallel_expert_review() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2650,7 +2650,7 @@ async fn scenario_node_retries_on_retry_status() {
|
|||
}),
|
||||
);
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2712,7 +2712,7 @@ async fn scenario_loop_restart_resets_context() {
|
|||
}),
|
||||
);
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2780,7 +2780,7 @@ async fn scenario_bug_triage_router() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
registry.register("conditional", Box::new(ConditionalHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2839,7 +2839,7 @@ async fn scenario_crash_recovery() {
|
|||
registry.register("start", Box::new(StartHandler));
|
||||
registry.register("exit", Box::new(ExitHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -2948,7 +2948,7 @@ async fn manager_loop_stop_condition_satisfied_e2e() {
|
|||
registry.register("done_setter", Box::new(DoneSetterHandler));
|
||||
registry.register("stack.manager_loop", Box::new(SubWorkflowHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3025,7 +3025,7 @@ async fn manager_loop_max_cycles_exceeded_e2e() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
registry.register("stack.manager_loop", Box::new(SubWorkflowHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3161,7 +3161,7 @@ async fn conditional_branching_success_fail_paths() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
registry.register("always_fail", Box::new(AlwaysFailHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3214,7 +3214,7 @@ async fn edge_selection_condition_match_wins_over_weight() {
|
|||
registry.register("start", Box::new(StartHandler));
|
||||
registry.register("exit", Box::new(ExitHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3261,7 +3261,7 @@ async fn edge_selection_weight_breaks_ties() {
|
|||
registry.register("start", Box::new(StartHandler));
|
||||
registry.register("exit", Box::new(ExitHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3300,7 +3300,7 @@ async fn edge_selection_lexical_tiebreak() {
|
|||
registry.register("start", Box::new(StartHandler));
|
||||
registry.register("exit", Box::new(ExitHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3358,7 +3358,7 @@ async fn context_updates_visible_across_nodes() {
|
|||
registry.register("conditional", Box::new(ConditionalHandler));
|
||||
registry.register("context_setter", Box::new(ContextSetterHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3402,7 +3402,7 @@ async fn stylesheet_applies_model_override() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3458,7 +3458,7 @@ async fn custom_handler_registration_and_execution() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
registry.register("my_custom", Box::new(CustomHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3529,7 +3529,7 @@ async fn integration_smoke_plan_implement_review_done() {
|
|||
Arc::new(emitter),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3633,7 +3633,7 @@ async fn manager_loop_runs_child_engine_e2e() {
|
|||
registry.register("stack.manager_loop", Box::new(SubWorkflowHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3767,7 +3767,7 @@ async fn manager_loop_context_flows_e2e() {
|
|||
registry.register("stack.manager_loop", Box::new(SubWorkflowHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3840,7 +3840,7 @@ async fn manager_loop_child_dotfile_e2e() {
|
|||
registry.register("stack.manager_loop", Box::new(SubWorkflowHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -3953,7 +3953,7 @@ async fn graph_merge_e2e_through_engine() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4103,7 +4103,7 @@ async fn fidelity_default_is_compact() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4160,7 +4160,7 @@ async fn fidelity_graph_default_applied() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4213,7 +4213,7 @@ async fn fidelity_node_overrides_graph_default() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4272,7 +4272,7 @@ async fn fidelity_edge_overrides_node_and_graph() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4321,7 +4321,7 @@ async fn fidelity_full_produces_empty_preamble() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4380,7 +4380,7 @@ async fn fidelity_truncate_preamble_minimal() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4452,7 +4452,7 @@ async fn fidelity_summary_low_mode() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4519,7 +4519,7 @@ async fn fidelity_summary_medium_mode() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4586,7 +4586,7 @@ async fn fidelity_summary_high_mode() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4646,7 +4646,7 @@ async fn fidelity_full_sets_thread_id_in_context() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4717,7 +4717,7 @@ async fn fidelity_full_nodes_share_thread_id() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4798,7 +4798,7 @@ async fn fidelity_resume_degrades_full_to_summary_high() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4895,7 +4895,7 @@ async fn fidelity_resume_degrade_only_affects_first_hop() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -4979,7 +4979,7 @@ async fn fidelity_resume_no_degrade_when_not_full() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5021,7 +5021,7 @@ async fn fidelity_stored_in_checkpoint_context() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5107,7 +5107,7 @@ async fn fidelity_precedence_multi_node_pipeline() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5175,7 +5175,7 @@ async fn fidelity_compact_preamble_includes_completed_stages_and_context() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5250,7 +5250,7 @@ async fn fidelity_summary_low_excludes_context_values_in_pipeline() {
|
|||
}),
|
||||
);
|
||||
let engine_low = WorkflowRunner::new(registry_low, Arc::new(EventEmitter::new()), local_env());
|
||||
let config_low = RunSettings {
|
||||
let config_low = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir_low.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5317,7 +5317,7 @@ async fn fidelity_summary_low_excludes_context_values_in_pipeline() {
|
|||
}),
|
||||
);
|
||||
let engine_med = WorkflowRunner::new(registry_med, Arc::new(EventEmitter::new()), local_env());
|
||||
let config_med = RunSettings {
|
||||
let config_med = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir_med.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5388,7 +5388,7 @@ async fn fidelity_thread_id_fallback_to_previous_node_in_pipeline() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5442,7 +5442,7 @@ async fn fidelity_thread_id_from_node_class_in_pipeline() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5499,7 +5499,7 @@ async fn fidelity_edge_thread_id_override_in_pipeline() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5557,7 +5557,7 @@ async fn fidelity_full_without_explicit_thread_id_uses_previous_node() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5625,7 +5625,7 @@ async fn fidelity_from_parsed_dot_pipeline() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5673,7 +5673,7 @@ async fn fidelity_checkpoint_roundtrip_preserves_fidelity() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5743,7 +5743,7 @@ async fn fidelity_node_thread_id_overrides_edge_thread_id_in_pipeline() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5830,7 +5830,7 @@ async fn fidelity_resume_preserves_context_values_across_checkpoint() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -5974,7 +5974,7 @@ mod real_llm {
|
|||
use fabro_workflows::handler::HandlerRegistry;
|
||||
use fabro_workflows::outcome::StageStatus;
|
||||
use fabro_workflows::records::Checkpoint;
|
||||
use fabro_workflows::run_settings::RunSettings;
|
||||
use fabro_workflows::run_options::RunOptions;
|
||||
use fabro_workflows::test_support::WorkflowRunner;
|
||||
|
||||
#[tokio::test]
|
||||
|
|
@ -6045,7 +6045,7 @@ mod real_llm {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -6159,7 +6159,7 @@ mod real_llm {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -6298,7 +6298,7 @@ mod real_llm {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -6405,7 +6405,7 @@ mod real_llm {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -6501,7 +6501,7 @@ async fn human_gate_freeform_only_routes_text() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -6631,7 +6631,7 @@ async fn human_gate_freeform_with_fixed_choice_match() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -6746,7 +6746,7 @@ async fn human_gate_freeform_fallback_on_unmatched_text() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -6874,7 +6874,7 @@ async fn human_gate_freeform_sets_allow_freeform_on_question() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -6982,7 +6982,7 @@ async fn human_gate_without_freeform_sets_allow_freeform_false() {
|
|||
registry.register("human", Box::new(HumanHandler::new(interviewer)));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -7219,7 +7219,7 @@ struct HookTestRunner {
|
|||
}
|
||||
|
||||
impl HookTestRunner {
|
||||
async fn run(&self, graph: &Graph, config: &RunSettings) -> Result<Outcome, FabroError> {
|
||||
async fn run(&self, graph: &Graph, config: &RunOptions) -> Result<Outcome, FabroError> {
|
||||
run_graph_with_hooks(
|
||||
make_linear_registry(),
|
||||
Arc::clone(&self.emitter),
|
||||
|
|
@ -7262,8 +7262,8 @@ fn engine_with_hooks_and_events(
|
|||
)
|
||||
}
|
||||
|
||||
fn make_run_config(dir: &std::path::Path) -> RunSettings {
|
||||
RunSettings {
|
||||
fn make_run_config(dir: &std::path::Path) -> RunOptions {
|
||||
RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -8367,7 +8367,7 @@ async fn arc_e2e_with_real_llm() {
|
|||
|
||||
let run_dir = tempfile::tempdir().unwrap();
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -8495,7 +8495,7 @@ async fn run_fidelity_prompt_pipeline(fidelity: &str) -> String {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -8694,7 +8694,7 @@ async fn large_context_values_are_offloaded_to_artifact_store() {
|
|||
let emitter = EventEmitter::new();
|
||||
let events = collect_events(&emitter);
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -8913,7 +8913,7 @@ async fn artifact_pointers_rewritten_for_remote_sandbox() {
|
|||
|
||||
let remote_env = Arc::new(RemoteMockEnv::new("/sandbox"));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), remote_env.clone());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -9043,7 +9043,7 @@ async fn node_dir_uses_visit_count_on_revisit() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -10015,7 +10015,7 @@ async fn full_pipeline_with_cli_backend_node() {
|
|||
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), env);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -10146,7 +10146,7 @@ async fn stylesheet_backend_property_routes_to_cli() {
|
|||
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), env);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -10425,7 +10425,7 @@ async fn git_checkpoint_host_emits_events_and_diff_patch() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), env);
|
||||
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -10437,7 +10437,7 @@ async fn git_checkpoint_host_emits_events_and_diff_patch() {
|
|||
github_app: None,
|
||||
base_branch: None,
|
||||
host_repo_path: Some(worktree_path.clone()),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha.clone()),
|
||||
run_branch: Some("fabro/run/test-docker".to_string()),
|
||||
meta_branch: None,
|
||||
|
|
@ -10628,7 +10628,7 @@ async fn git_checkpoint_host_writes_shadow_branch() {
|
|||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), env);
|
||||
|
||||
let meta_branch = MetadataStore::branch_name(run_id);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -10640,7 +10640,7 @@ async fn git_checkpoint_host_writes_shadow_branch() {
|
|||
github_app: None,
|
||||
base_branch: None,
|
||||
host_repo_path: Some(worktree_path.clone()),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha),
|
||||
run_branch: Some(format!("fabro/run/{run_id}")),
|
||||
meta_branch: Some(meta_branch),
|
||||
|
|
@ -10826,7 +10826,7 @@ async fn parallel_git_branching_host_e2e() {
|
|||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), env);
|
||||
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -10838,7 +10838,7 @@ async fn parallel_git_branching_host_e2e() {
|
|||
github_app: None,
|
||||
base_branch: None,
|
||||
host_repo_path: Some(worktree_path.clone()),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha.clone()),
|
||||
run_branch: Some(run_branch.clone()),
|
||||
meta_branch: None,
|
||||
|
|
@ -11089,7 +11089,7 @@ async fn git_checkpoint_host_skips_empty_diff_patch() {
|
|||
registry.register("exit", Box::new(ExitHandler));
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), env);
|
||||
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: run_dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11101,7 +11101,7 @@ async fn git_checkpoint_host_skips_empty_diff_patch() {
|
|||
github_app: None,
|
||||
base_branch: None,
|
||||
host_repo_path: Some(worktree_path.clone()),
|
||||
git: Some(GitCheckpointSettings {
|
||||
git: Some(GitCheckpointOptions {
|
||||
base_sha: Some(base_sha.clone()),
|
||||
run_branch: Some("fabro/run/empty-diff".to_string()),
|
||||
meta_branch: None,
|
||||
|
|
@ -11471,7 +11471,7 @@ async fn e2e_circuit_breaker_deterministic_self_loop() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11518,7 +11518,7 @@ async fn e2e_circuit_breaker_custom_limit() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11558,7 +11558,7 @@ async fn e2e_circuit_breaker_ignores_transient_failures() {
|
|||
registry.register("test_handler", Box::new(TransientInfraFailHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11605,7 +11605,7 @@ async fn e2e_circuit_breaker_different_reasons_separate_counters() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11645,7 +11645,7 @@ async fn e2e_circuit_breaker_loop_restart() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11707,7 +11707,7 @@ async fn e2e_failure_signature_persisted_in_context() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11771,7 +11771,7 @@ async fn e2e_failure_signature_hint_overrides_reason_in_context() {
|
|||
registry.register("hint_handler", Box::new(SignatureHintHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11827,7 +11827,7 @@ async fn e2e_signature_maps_persist_in_checkpoint() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -11954,7 +11954,7 @@ async fn e2e_circuit_breaker_emits_events_before_abort() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12021,7 +12021,7 @@ async fn e2e_circuit_breaker_does_not_fire_below_limit() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12117,7 +12117,7 @@ async fn e2e_circuit_breaker_multi_stage_impl_verify_cycle() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12214,7 +12214,7 @@ async fn e2e_loop_restart_blocked_for_deterministic_failure() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12254,7 +12254,7 @@ async fn e2e_loop_restart_blocked_for_structural_failure() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12294,7 +12294,7 @@ async fn e2e_loop_restart_blocked_for_budget_exhausted_failure() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12334,7 +12334,7 @@ async fn e2e_loop_restart_blocked_for_canceled_failure() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12371,7 +12371,7 @@ async fn e2e_loop_restart_blocked_for_compilation_loop_failure() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12412,7 +12412,7 @@ async fn e2e_loop_restart_allowed_for_transient_infra() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12516,7 +12516,7 @@ async fn e2e_stall_watchdog_triggers_from_dot_parsed_pipeline() {
|
|||
});
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(emitter), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12572,7 +12572,7 @@ async fn e2e_stall_watchdog_kept_alive_by_handler_events() {
|
|||
);
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12618,7 +12618,7 @@ async fn e2e_stall_watchdog_disabled_with_zero_timeout() {
|
|||
registry.register("slow", Box::new(SlowTestHandler { sleep_ms: 50 }));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12683,7 +12683,7 @@ async fn e2e_stall_watchdog_with_explicit_timeout_override() {
|
|||
registry.register("hanging", Box::new(HangingHandler));
|
||||
|
||||
let engine = WorkflowRunner::new(registry, Arc::new(EventEmitter::new()), local_env());
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
@ -12814,7 +12814,7 @@ async fn asset_collection_local_sandbox_success() {
|
|||
graph.edges.push(Edge::new("start", "create_assets"));
|
||||
graph.edges.push(Edge::new("create_assets", "exit"));
|
||||
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig {
|
||||
assets: Some(fabro_config::run::AssetsConfig {
|
||||
include: vec!["test-results/**".to_string()],
|
||||
|
|
@ -12928,7 +12928,7 @@ async fn asset_collection_local_sandbox_on_failure() {
|
|||
graph.edges.push(Edge::new("start", "create_assets"));
|
||||
graph.edges.push(Edge::new("create_assets", "exit"));
|
||||
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig {
|
||||
assets: Some(fabro_config::run::AssetsConfig {
|
||||
include: vec!["test-results/**".to_string()],
|
||||
|
|
@ -13025,7 +13025,7 @@ async fn asset_collection_docker_sandbox() {
|
|||
graph.edges.push(Edge::new("start", "create_assets"));
|
||||
graph.edges.push(Edge::new("create_assets", "exit"));
|
||||
|
||||
let run_config = RunSettings {
|
||||
let run_config = RunOptions {
|
||||
config: FabroConfig {
|
||||
assets: Some(fabro_config::run::AssetsConfig {
|
||||
include: vec!["test-results/**".to_string()],
|
||||
|
|
@ -13099,7 +13099,7 @@ async fn wait_timer_e2e() {
|
|||
Arc::new(EventEmitter::new()),
|
||||
local_env(),
|
||||
);
|
||||
let config = RunSettings {
|
||||
let config = RunOptions {
|
||||
config: FabroConfig::default(),
|
||||
run_dir: dir.path().to_path_buf(),
|
||||
cancel_token: None,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue