fix(api): store expanded workflow, not raw body - #46
Open
addadi wants to merge 1 commit into
Open
Conversation
handleCreateRun stored the raw request body as workflow_json, discarding the expanded steps from expandStrategy. With strategy: sequential, applyChain added depends_on to the expanded steps — but those were only used for DB step prepopulation, never persisted in workflow_json. The engine then read the raw body at runtime, saw no depends_on, and dispatched every step as a graph root (no chain, no ordering). When a strategy is present, replace obj.steps with the expanded effective_steps and serialize that as workflow_json, so the chain dependencies persist for normalizeWorkflowRoot to convert into DAG edges. Idempotency-conflict check compares against the stored expanded form. Fixes nullclaw#34 Fixes nullclaw#36
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.
Fixes #34
Fixes #36
handleCreateRunstored the raw request body asworkflow_json, discarding the expanded steps fromexpandStrategy. Withstrategy: sequential,applyChainaddeddepends_onto the expanded steps — but those were only used for DB step prepopulation, never persisted inworkflow_json. The engine then read the raw body at runtime, saw nodepends_on, and dispatched every step as a graph root (no chain, no ordering).When a strategy is present, replace
obj.stepswith the expandedeffective_stepsand serialize that asworkflow_json, so the chain dependencies persist fornormalizeWorkflowRootto convert into DAG edges. The idempotency-conflict check compares against the stored expanded form.Verified: 3-step sequential workflow completes in order (a→b→c) with correct
depends_onstored in the DB. Full suite green (zig build test, 355/355).