Conversation
… safety - Shallow-copy node.runnerOptions to avoid mutating the user-supplied object when propagating the parent abort signal. Reusing a flow definition across multiple runs could leak a stale signal. - Inherit continueOnError from the parent runner when the subflow's runnerOptions does not explicitly set it. - Remove unnecessary type casts (as FlowDefinition<Record<string, unknown>>, etc.) in the subflow executeNode handler. - Add TInput generic to FlowSubflowNode so contextMap receives a typed input parameter instead of unknown, matching FlowStepNode conventions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #406 +/- ##
=======================================
Coverage ? 91.22%
=======================================
Files ? 213
Lines ? 22530
Branches ? 3529
=======================================
Hits ? 20553
Misses ? 1929
Partials ? 48 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #405 — fixes a mutation bug and addresses three minor concerns from code review.
Changes
Fix: runnerOptions mutation — Shallow-copy
node.runnerOptionsbefore writing the abort signal onto it. Previously, reusing aFlowDefinitionacross multipleFlowRunner.run()calls would leak the first run'sAbortSignalinto subsequent runs.Inherit
continueOnError— The child runner now inherits the parent'scontinueOnErrorsetting when the subflow'srunnerOptionsdoesn't explicitly set it. Previously, child flows always defaulted tofalseregardless of the parent.Remove redundant type casts — The
as FlowDefinition<Record<string, unknown>>,as Record<string, unknown>, andas FlowRunnerOptions<Record<string, unknown>>casts in the runner were unnecessary and hid poten3. Remove redundant type casts — Theas Flopu3. **Remove redundant type casts** — Theas FlowDefinition<Record<string, unknown>>re3. **Remove redundaput3. **Remove redundant type casts** — Theas FlowDefinition<Record<string, unknown>>`ngAll All All Allow tests pass (118/118). No new tests needed — existing subflow tests already cover the affected code paths.