Repository navigation
link_is_required: stay required when target cannot bypass optional links - #518
olofsvensson wants to merge 4 commits into
Conversation
Previously, any link whose source had an optional (conditional or explicitly optional) link upstream became optional by default. As a result, unconditional branches that fan out and merge again after a conditional link no longer synchronized at the merge node (ewoksppf #23). Now such a link is optional only if its target can be reached from the start nodes without going through one of the optional links upstream of the source. Otherwise the target can only run when the source runs, so the link stays required. Graphs without start nodes keep the old, conservative behaviour. Links inside conditional or error-handler branches are now required. Links from such branches into a merge node are still optional. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Regression: an error-handler branch that merges back into the normal path, downstream of a conditional link graph LR
start0 -- "a == 1" --> start
start --> A
A --> s
A -. on_error .-> E
s --> t
E --> t
With
|
|
Also this PR makes loading MXPressE much slower. I'm wondering whether I should immediately finish #490 or we post-pone ewoks-kit/ewoksppf#23 for the next release. |
|
My recommendation: leave #518 out of 5.1.0 and postpone ewoks-kit/ewoksppf#23 to the release that includes #490. Mostly because loading MXPressE goes much slower with #518 and it introduces a regression. |
…of-an-optional-link-stay-required-when-the-target-cant-run-without-them
Keep downstream links optional when an upstream error handler can reach the merge target, and reuse graph analysis during validation to reduce repeated reachability work.
|
I tested to ask claude to fix both issues (test workflow and slowness), and it claims to have done so. Please recheck. |
|
I got a strange error from the CI: This job failed before it even started running the project tests. The root cause is in the setup step: The log shows: So the failure is not a test failure in your code; it is an environment/setup failure. The workflow stopped at the Python installation step, so no tests ran. Likely fix: Maybe time to remove Python 3.8 from supported versions? |
|
Suggestion: close this PR in favour of #490 + ewoks-kit/ewoksppf#182. This PR does not fix either problem:
#490 with ewoks-kit/ewoksppf#182 fixes both problems:
One thing left for ewoks-kit/ewoksppf#191: its test imports the deprecated |
|
Ok, I agree, let's close this PR and wait for #490. |
Previously, any link whose source had an optional (conditional or explicitly optional) link upstream became optional by default. As a result, unconditional branches that fan out and merge again after a conditional link no longer synchronized at the merge node (ewoksppf 23).
Now such a link is optional only if its target can be reached from the start nodes without going through one of the optional links upstream of the source. Otherwise the target can only run when the source runs, so the link stays required. Graphs without start nodes keep the old, conservative behaviour.
Links inside conditional or error-handler branches are now required. Links from such branches into a merge node are still optional.
Created with the help of claude opus 5.5.