Repository navigation
refactor(workflow-executor): resolve a decision condition by its source type - #2067
Merged
christophebrun-forest merged 2 commits intoNov 6, 2026
Conversation
…ce type A condition carries an optional sourceType, absent meaning get-data, so later source kinds plug in their own resolver. No behaviour change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 new issue
|
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (2)
🛟 Help
|
… schema A null or absent sourceType parses to get-data, resolution is an exhaustive switch, and the unresolved-condition warning names the source type. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
christophebrun-forest
merged commit Nov 6, 2026
faacdaf
into
feature/prd-988-use-sub-workflow-end-as-a-decision-condition-input
40 checks passed
christophebrun-forest
deleted the
feature/prd-2028-executor-resolve-a-sub-workflows-end-as-a
branch
November 6, 2026 13:50
This was referenced Nov 6, 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.

Part of PRD-2028 (first of two PRs). No behaviour change.
Why
A deterministic Decision condition can only read a Get Data step today: the source resolution filters on
ReadRecordsteps. PRD-2028 adds a Sub-workflow's End as a source, and PRD-995 / PRD-996 will add more kinds. This PR makes the resolution take a source kind first, so each kind brings its own resolver.What
DeterministicConditionSchemaaccepts an optionalsourceType, limited to'get-data'for now. Absent ornullparses to'get-data', which is all an older orchestrator sends, so the parsed type is never optional.ConditionStepExecutor.resolveConditionValueis an exhaustiveswitchonsourceType: adding a kind to the enum fails to compile until its case exists. The Get Data code moves unchanged intoresolveGetDataValue.sourceType, since the reason depends on which resolver ran.Contract and rollout
sourceType: 'sub-workflow'for an End source. That value and its resolver come in the next PR.sourceTypeit does not know (InvalidStepDefinitionError). An executor predating this PR does not: zod strips the unknown key, so it would read a Sub-workflow End condition as a Get Data one, find the source not reached, and route to the fallback. The executor-version floor in PRD-2029 is what keeps a new source kind off those executors.Tests
Existing executor tests pass unchanged in substance; their deterministic steps now go through
ConditionStepDefinitionSchema, like a real step does. Added:nullsourceTypeas'get-data', keeps an explicit one, and rejects an unknown kind;InvalidStepDefinitionError;'get-data'resolves like an absent one.🤖 Generated with Claude Code
Note
Resolve deterministic conditions by
sourceTypein workflow executorsourceTypefield to deterministic conditions, validated againstCONDITION_SOURCE_TYPES(onlyget-data) in step-definition.ts. Missing or null values default toget-data.ConditionStepExecutor.resolveConditionValuenow dispatches onsourceTypein condition-step-executor.ts; the existing lookup is renamed toresolveGetDataValue.sourceTypeto the server condition type in server-types.ts and updates docs and tests.sourceTypenow throwsInvalidStepDefinitionError, and schema parsing normalizes absent/nullsourceTypetoget-data, which shows up in parsed-condition assertions.Macroscope summarized 62740af.