feat: Conditional Execution - Option 1 - #2651
Open
camielvs wants to merge 1 commit into
Open
Conversation
🎩 PreviewA preview build has been created at: |
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8 tasks
camielvs
force-pushed
the
feat--Conditional-execution
branch
from
August 20, 2026 17:28
55706d9 to
de8e0ac
Compare
camielvs
force-pushed
the
08-20-feat_conditional_execution_-_option_1
branch
from
August 20, 2026 17:28
f7393e4 to
9cd7b00
Compare
8 tasks
camielvs
force-pushed
the
08-20-feat_conditional_execution_-_option_1
branch
from
August 20, 2026 17:51
9cd7b00 to
e672615
Compare
8 tasks
camielvs
force-pushed
the
08-20-feat_conditional_execution_-_option_1
branch
from
August 20, 2026 18:38
e672615 to
eaf0eb1
Compare
camielvs
force-pushed
the
feat--Conditional-execution
branch
from
August 20, 2026 18:38
de8e0ac to
bbfc2a7
Compare
camielvs
force-pushed
the
08-20-feat_conditional_execution_-_option_1
branch
from
August 20, 2026 19:21
eaf0eb1 to
d1187a7
Compare
camielvs
force-pushed
the
feat--Conditional-execution
branch
from
August 20, 2026 19:21
bbfc2a7 to
7a522e2
Compare
camielvs
force-pushed
the
08-20-feat_conditional_execution_-_option_1
branch
from
August 20, 2026 19:25
d1187a7 to
7175eea
Compare
camielvs
force-pushed
the
feat--Conditional-execution
branch
from
August 20, 2026 19:25
7a522e2 to
e4c7524
Compare
camielvs
force-pushed
the
08-20-feat_conditional_execution_-_option_1
branch
from
August 20, 2026 19:30
7175eea to
8907780
Compare
camielvs
force-pushed
the
feat--Conditional-execution
branch
from
August 20, 2026 19:30
e4c7524 to
2b3d892
Compare
camielvs
force-pushed
the
08-20-feat_conditional_execution_-_option_1
branch
from
August 20, 2026 19:32
8907780 to
e0c36ea
Compare
camielvs
force-pushed
the
08-20-feat_conditional_execution_-_option_1
branch
from
August 20, 2026 21:47
e0c36ea to
f920c2c
Compare
camielvs
force-pushed
the
feat--Conditional-execution
branch
from
August 20, 2026 21:47
2b3d892 to
9c91bfc
Compare
3 tasks
camielvs
commented
Aug 21, 2026
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.

Description
Implements Option 1 — Derived. Two alternatives were prototyped alongside it (#2652, #2654); this is the one we settled on. Also a general pass over the UI, UX and frontend architecture of the feature.
The question these options were answering
TaskSpec.isEnableddecides whether a task runs. It either holds a literal ("false") or points at an upstream value — a graph input, or another task's output.The editor needs to know one thing the spec doesn't record: whether the user wants the conditional UI on this task at all — the extra handle on the node, the condition control in the Config panel. A task with no
isEnabledlooks exactly like a task that was never meant to be conditional, so where does that piece of state live?The three answers
isConditionalannotation on the task, fully decoupled fromisEnabled. The annotation controls the UI;isEnabledcontrols the backend.isEnabledvalue — a literal on the task, or a connection to the reserved port.Why derived
Two sources of truth drift, and this one drifts immediately. Pipelines don't only come from our editor — they come from the SDK, from other tools, from hand-written YAML. Those have
isEnabledset and no annotation, so the annotation version opens them showing no condition and no edge: the connection is right there in the file and invisible on the canvas. The fix would be to backfill the annotation on import, which is deriving it anyway, one round trip late.It keeps editor state out of the user's pipeline. Conditional-ness is already expressed by
isEnabled. An annotation would write a second copy of it into the file for something we can compute.Most tasks aren't conditional. Always-on avoids the state problem, but it spends vertical space on every node and adds a concept to every task for the benefit of the few that use it. A switch keeps it opt-in and keeps ordinary nodes looking ordinary.
One question, one answer.
isTaskConditional(task, spec)is what the node, the panel and serialization all ask, so they can't disagree.The honest cost: deriving couples the switch to the value. Turning it on has to write something (
"true"— Always), and turning it off has to clear it, so "conditional but not configured yet" isn't a state we can represent. We think that's fine — Always is a sensible starting point, and the alternative was the drift above.Also in here
"false"would leave the task silently disabled after the user deliberately removed the condition.Related Issue and Pull requests
Stacked on #2574. Alternatives: #2652 (annotation), #2654 (always-on). Followed by #2657, which finishes the UI.
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
The
conditional-executionflag gates all of this.isEnabledfollows in the YAML.isEnabledis cleared and no stray annotation is written.isEnabledto a reference (e.g. one produced by the SDK) and confirm the editor shows both the conditional UI and the edge without us having written anything into the file first.Additional Comments