feat(rig-2y5.2): Core DAG Orchestrator Implementation#65
Merged
thoreinstein merged 6 commits intorig-v1from Feb 28, 2026
Merged
feat(rig-2y5.2): Core DAG Orchestrator Implementation#65thoreinstein merged 6 commits intorig-v1from
thoreinstein merged 6 commits intorig-v1from
Conversation
… Dolt persistence
…ram in DAG orchestrator - Fix goroutine leak: Execute loop now drains all in-flight goroutines before exiting on failure instead of breaking immediately - Fix silent error discard: UpdateExecutionStatus failure on the error path now returned via errors.CombineErrors instead of being discarded - Remove unused results param from runNode (dead code + race hazard) - Replace buggy skipRemaining (graph-walk from ready queue missed unreachable nodes) with skipUnprocessed (launched set tracks what ran) - Add mock test for failure propagation and downstream skip behavior - Add mock test for diamond DAG (A->B,C->D) concurrent execution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…anagement in DAG orchestrator
Contributor
There was a problem hiding this comment.
Pull request overview
Implements a core DAG orchestrator in pkg/orchestration to execute workflow nodes concurrently while persisting execution/node state transitions via the Dolt-backed DatabaseManager.
Changes:
- Added
Orchestratorexecution engine with dependency scheduling, failure propagation, and panic recovery. - Added
ValidateWorkflow(Kahn’s algorithm) and integrated validation into workflow definition persistence. - Enhanced DB state-transition persistence (row locking via
SELECT … FOR UPDATE) and added orchestrator unit + Dolt-backed integration tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| pkg/orchestration/orchestrator.go | New DAG execution engine, validation helper, and node execution simulation. |
| pkg/orchestration/orchestrator_test.go | New unit + integration tests for orchestrator execution and validation. |
| pkg/orchestration/database.go | Adds DAG validation on save, introduces CreateExecutionWithInitialStates, and makes status transitions transactional with row locks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Replace leaking ctx-cancellation goroutine with in-loop ctx.Err() check - Move RUNNING transition after all preflight checks (validate + stateMap) - Add ValidateWorkflow call in Execute before running - Assign node/edge IDs before ValidateWorkflow in SaveWorkflowDefinition - Use context.WithoutCancel for cleanup on failure/cancellation paths - Panic recovery now marks panicked node as FAILED - Gate IsAvailable logging behind Verbose flag Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Prevent double-decrement of activeNodes on panic with decremented flag - Validate empty and duplicate node IDs in ValidateWorkflow - Wrap tx.Commit() errors in UpdateExecutionStatus and UpdateNodeStatus - Add tests for context cancellation and panic recovery - Add ValidateWorkflow test cases for empty/duplicate node IDs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
This PR implements the Core DAG Orchestrator in
pkg/orchestrationas part of ticket rig-2y5.2.Key Changes:
pkg/orchestration/orchestrator.gowith support for concurrent node execution and dependency management.FOR UPDATE) for status transitions.Verification: