Commit b464e69
committed
Prevent false green validation results when MCP build streams end early
validate_flow already tracked how many nodes were expected, but the final
success path only checked whether a failing event had been seen. An early
end event could therefore return valid=true even when only part of the
flow finished. This change treats that condition as invalid and records a
flow-level error, while keeping the existing fast-fail behavior unchanged.
Constraint: Keep the fix narrowly scoped to validate_flow rather than folding it into broader MCP/session work
Rejected: Wait for PR langflow-ai#12528 to land | it does not close this exact success-path gap on current main
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If validate_flow semantics change again, preserve the invariant that success means every expected component completed
Tested: cd src/lfx && uv sync && uv run pytest tests/unit/mcp/test_validate_flow.py -q
Not-tested: End-to-end MCP validation against a live Langflow server
Related: langflow-ai#127571 parent 9aae6de commit b464e69
2 files changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1145 | 1145 | | |
1146 | 1146 | | |
1147 | 1147 | | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1148 | 1160 | | |
1149 | 1161 | | |
1150 | 1162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
0 commit comments