fix(tests): stabilize graph path snapshots and skip LLM preflight for non-LLM graphs

- Update 5 more dry_run_examples snapshots to use [GRAPH_PATH] filter
- Skip LLM preflight check when graph has no LLM nodes (fixes
  preflight_allows_pull_request_enabled_without_github_credentials)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-04-15 11:41:17 -04:00
parent 79fee95c97
commit e4f2208255
No known key found for this signature in database
2 changed files with 11 additions and 5 deletions

View file

@ -15,7 +15,7 @@ fn dry_run_branching() {
----- stdout -----
----- stderr -----
Workflow: Branch (6 nodes, 6 edges)
Graph: [TEMP_DIR]/branching.fabro
Graph: [GRAPH_PATH]
Goal: Implement and validate a feature
warning [node: implement]: Node 'implement' has goal_gate=true but no retry_target or fallback_retry_target (goal_gate_has_retry)
@ -52,7 +52,7 @@ fn dry_run_conditions() {
----- stdout -----
----- stderr -----
Workflow: Conditions (5 nodes, 5 edges)
Graph: [TEMP_DIR]/conditions.fabro
Graph: [GRAPH_PATH]
Goal: Test condition evaluation with OR and parentheses
Run: [ULID]
@ -86,7 +86,7 @@ fn dry_run_parallel() {
----- stdout -----
----- stderr -----
Workflow: Parallel (7 nodes, 7 edges)
Graph: [TEMP_DIR]/parallel.fabro
Graph: [GRAPH_PATH]
Goal: Test parallel and fan-in execution
Run: [ULID]
@ -121,7 +121,7 @@ fn dry_run_styled() {
----- stdout -----
----- stderr -----
Workflow: Styled (5 nodes, 4 edges)
Graph: [TEMP_DIR]/styled.fabro
Graph: [GRAPH_PATH]
Goal: Build a styled pipeline
Run: [ULID]
@ -156,7 +156,7 @@ fn dry_run_legacy_tool() {
----- stdout -----
----- stderr -----
Workflow: LegacyTool (3 nodes, 2 edges)
Graph: [TEMP_DIR]/legacy_tool.fabro
Graph: [GRAPH_PATH]
Goal: Verify backwards compatibility with old tool naming
Run: [ULID]

View file

@ -580,11 +580,13 @@ async fn run_llm_check(
.collect::<Vec<_>>();
let auth_issues = result.auth_issues;
let mut model_providers = std::collections::BTreeSet::new();
let mut has_llm_nodes = false;
for node in graph.nodes.values() {
if !is_llm_handler_type(node.handler_type()) {
continue;
}
has_llm_nodes = true;
let node_model = node.model().unwrap_or(&model);
let node_provider = node.provider().unwrap_or(default_provider);
let (resolved_model, resolved_provider) =
@ -601,6 +603,10 @@ async fn run_llm_check(
model_providers.insert((resolved_model, final_provider));
}
if !has_llm_nodes {
return true;
}
if model_providers.is_empty() {
let (resolved_model, resolved_provider) =
if let Some(info) = Catalog::builtin().get(&model) {