diff --git a/Cargo.lock b/Cargo.lock index dc30db55..644b3657 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2797,7 +2797,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchestrator-cli" -version = "0.6.18" +version = "0.6.19" dependencies = [ "animus-control-protocol", "animus-log-storage-protocol", diff --git a/crates/orchestrator-cli/Cargo.toml b/crates/orchestrator-cli/Cargo.toml index 188a1dc0..cdf86e07 100644 --- a/crates/orchestrator-cli/Cargo.toml +++ b/crates/orchestrator-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "orchestrator-cli" -version = "0.6.18" +version = "0.6.19" edition = "2021" license = "Elastic-2.0" default-run = "animus" diff --git a/crates/orchestrator-config/src/workflow_config/yaml_scaffold.rs b/crates/orchestrator-config/src/workflow_config/yaml_scaffold.rs index 83166863..4de05271 100644 --- a/crates/orchestrator-config/src/workflow_config/yaml_scaffold.rs +++ b/crates/orchestrator-config/src/workflow_config/yaml_scaffold.rs @@ -4,6 +4,9 @@ use std::path::{Path, PathBuf}; use anyhow::{Context, Result}; use animus_config_protocol::parse::yaml_workflows_dir; +// Only the test-only `default_workflow_template_files` consumes these template +// name constants; gate the import so non-test builds don't warn on unused imports. +#[cfg(any(test, feature = "test-utils"))] use animus_config_protocol::yaml_types::{ DEFAULT_WORKFLOW_TEMPLATE_FILE_NAME, HOTFIX_WORKFLOW_TEMPLATE_FILE_NAME, RESEARCH_WORKFLOW_TEMPLATE_FILE_NAME, STANDARD_WORKFLOW_TEMPLATE_FILE_NAME, diff --git a/crates/orchestrator-core/src/workflow/phase_plan.rs b/crates/orchestrator-core/src/workflow/phase_plan.rs index e6ea65c0..7724a3fc 100644 --- a/crates/orchestrator-core/src/workflow/phase_plan.rs +++ b/crates/orchestrator-core/src/workflow/phase_plan.rs @@ -79,10 +79,21 @@ pub fn resolve_phase_plan_for_workflow_ref( crate::resolve_pack_registry(root).map(|registry| registry.has_pack_overlays()).unwrap_or(false); let has_legacy_workflow_config = crate::legacy_workflow_config_paths(root).iter().any(|candidate| candidate.exists()); - if !has_yaml_workflows && !has_pack_workflows && !workflow_config_path.exists() && !has_legacy_workflow_config { + // An installed `config_source` plugin (e.g. config-postgres reading team_*, + // or config-yaml reading author YAML) is an authoritative config source even + // when no `.animus/workflows/*.yaml`, pack, or compiled cache exists on disk. + // Mirror `load_workflow_config`'s own gate (loading.rs) so config_source-only + // projects (no on-disk YAML) can still resolve workflows. + let has_config_source = orchestrator_config::config_source_client::config_source_installed(root); + if !has_config_source + && !has_yaml_workflows + && !has_pack_workflows + && !workflow_config_path.exists() + && !has_legacy_workflow_config + { let requested = requested_workflow_ref.as_deref().or(normalized_workflow_ref.as_deref()).unwrap_or(""); return Err(anyhow!( - "workflow '{requested}' is not available until the project defines workflows in .animus/workflows.yaml or .animus/workflows/*.yaml, or installs a pack" + "workflow '{requested}' is not available until the project defines workflows in .animus/workflows.yaml or .animus/workflows/*.yaml, installs a pack, or installs a config_source plugin" )); }