Skip to content

Comments

Add Status.RECOVERED#958

Draft
LanderOtto wants to merge 1 commit intomasterfrom
recovered-status
Draft

Add Status.RECOVERED#958
LanderOtto wants to merge 1 commit intomasterfrom
recovered-status

Conversation

@LanderOtto
Copy link
Collaborator

This commit introduces Status.RECOVERED to support recovery workflows, specifically those involving LoopCombinatorStep.

Before this commit, LoopCombinatorStep terminated only when all input ports received an IterationTerminationToken containing the iteration's prefix tag and a TerminationToken. Now, the RECOVERED status can be used within a TerminationToken to trigger termination for every step execution (including LoopCombinatorStep), behaving similarly to CANCELLED and FAILED statuses. (logic within _reduce_statuses function)

Note that while the internal termination is triggered by RECOVERED, the step propagates a TerminationToken with Status.COMPLETED to the output ports (logic within _get_status method). This ensures that the logic for abrupt termination is managed by the recovery workflow structure (e.g., via InterWorkflowPort boundary rules) rather than the step itself.

…ws, specifically those involving `LoopCombinatorStep`.

Before this commit, `LoopCombinatorStep` terminated only when all input ports received an `IterationTerminationToken` containing the iteration's prefix tag and a `TerminationToken`. Now, the `RECOVERED` status can be used within a `TerminationToken` to trigger termination for every step execution (including `LoopCombinatorStep`), behaving similarly to `CANCELLED` and `FAILED` statuses.

Note that while the internal termination is triggered by `RECOVERED`, the step propagates a `TerminationToken` with `Status.COMPLETED` to the output ports. This ensures that the logic for abrupt termination is managed by the recovery workflow structure (e.g., via `InterWorkflowPort` boundary rules) rather than the step itself.
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.64%. Comparing base (3653a82) to head (61336f0).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
streamflow/workflow/step.py 0.00% 2 Missing and 2 partials ⚠️
streamflow/workflow/port.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #958      +/-   ##
==========================================
- Coverage   73.66%   73.64%   -0.03%     
==========================================
  Files          90       90              
  Lines       12223    12228       +5     
  Branches     2161     2163       +2     
==========================================
+ Hits         9004     9005       +1     
- Misses       2704     2706       +2     
- Partials      515      517       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant