fix(flows): update stale on_error:route dry-run test for tinyflows 0.5.1 validation (B14)#4664
Conversation
…5.1 validation (B14) dry_run_flags_tool_call_error_when_on_error_is_route has failed on main since tinyhumansai#4608 bumped vendored tinyflows to 0.5.1, which pulled in a NEW author-time validation (tinyflows a6860bc): a node with on_error:"route" but no outgoing edge on its `error` port is rejected as an invalid graph before a run starts (a route with nowhere to route is a dead end). The test was written in tinyhumansai#4586 — before that rule — with an on_error:"route" node and no error-port edge, so validate_and_migrate_graph now rejects it up front and DryRunWorkflowTool maps the Err to ToolResult::error, failing the test's `assert!(!result.is_error)` before it ever reaches the ok/node_errors checks. The new validation is correct + intentional (tinyflows has its own rejects/accepts_on_error_route_without/with_error_edge tests) — so the fix is the TEST, not the enforcement. Give the test graph a real error-port destination (a no-op oh:noop `recover` sink + a from_port:"error" edge), matching dry_run_passes_when_tool_call_binds_to_upstream_tool_output right above it. The graph is now valid, the dry-run runs, and the missing required `to` arg is detected as intended (ok:false, node_errors:[post]). No production code changed. flows:: 369 pass; tinyflows:: 95 pass; cargo check/fmt clean. Unblocks the Rust Core Coverage / PR CI Gate lane that this single test was reddening on every PR.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA test graph in a Rust test file was updated to add a ChangesTest fix for routed error handling
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
Why the coverage lane was red on every PR
flows::builder_tools::tests::dry_run_flags_tool_call_error_when_on_error_is_routehas failed on cleanmainsince #4608 bumped vendored tinyflows to 0.5.1 — reddening Rust Core Coverage → PR CI Gate on every open PR (repeatedly waved off as "pre-existing").Root cause — a stale test, NOT an enforcement hole
tinyflows 0.5.1 (commit
a6860bc) added a correct author-time rule: a node withon_error:"route"but no outgoing edge on itserrorport is rejected as an invalid graph (a route with nowhere to route is a dead end — tinyflows shipsrejects/accepts_on_error_route_without/with_error_edgefor it).The test was written in #4586, before that rule, with an
on_error:"route"node and no error-port edge. Sovalidate_and_migrate_graphnow rejects it up front andDryRunWorkflowToolmaps theErrtoToolResult::error→ the test's firstassert!(!result.is_error)fails, never reaching theok/node_errorsassertions. The enforcement is fine (better, even).Fix (test-only)
Give the test graph a real error-port destination — a no-op
oh:nooprecoversink + afrom_port:"error"edge (the same convention as the neighboringdry_run_passes_when_tool_call_binds_to_upstream_tool_output). The graph is now valid → the dry-run runs → the missing requiredtoarg is detected as intended (ok:false,node_errors:[post]). No production code changed.Verification
flows::369 pass ·tinyflows::95 pass ·cargo check/fmtclean. This gets the coverage/PR-CI gate green again for all open PRs.Summary by CodeRabbit