mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-12 23:02:41 +00:00
Restore exactly-one terminal node validation per spec
The spec says "exactly one" exit node in the shape table (line 184), exit handler docs (line 648), and test criteria (line 1834). The lint rule table (line 1437) says "at least one" but is the minority. The previous commit incorrectly reverted this — the terminal node change was not causing the test failures (all three were from retry-on-Fail). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6406fccd19
commit
9f9b461971
1 changed files with 13 additions and 1 deletions
|
|
@ -94,12 +94,24 @@ impl LintRule for TerminalNodeRule {
|
|||
return vec![Diagnostic {
|
||||
rule: self.name().to_string(),
|
||||
severity: Severity::Error,
|
||||
message: "Pipeline must have at least one terminal node (shape=Msquare or id exit/end)".to_string(),
|
||||
message: "Pipeline must have exactly one terminal node (shape=Msquare or id exit/end)".to_string(),
|
||||
node_id: None,
|
||||
edge: None,
|
||||
fix: Some("Add a node with shape=Msquare or id 'exit'/'end'".to_string()),
|
||||
}];
|
||||
}
|
||||
if terminal_count > 1 {
|
||||
return vec![Diagnostic {
|
||||
rule: self.name().to_string(),
|
||||
severity: Severity::Error,
|
||||
message: format!(
|
||||
"Pipeline must have exactly one terminal node, found {terminal_count}"
|
||||
),
|
||||
node_id: None,
|
||||
edge: None,
|
||||
fix: Some("Remove extra terminal nodes so exactly one remains".to_string()),
|
||||
}];
|
||||
}
|
||||
Vec::new()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue