feat(dag): dynamic workflow engine with bridge completion + runtime - #70
Closed
LeXwDeX wants to merge 2 commits into
Closed
feat(dag): dynamic workflow engine with bridge completion + runtime#70LeXwDeX wants to merge 2 commits into
LeXwDeX wants to merge 2 commits into
Conversation
added 2 commits
July 2, 2026 14:10
…ntime Phase 0-6 complete: - Core: pure scheduling logic (graph, layering, transitions, replan, required-validator) - Core: CQRS read-model (store, projector, sql tables, migration, probe) - Schema: 15 EventV2 definitions (dag-event.ts) + durable-event-manifest registration - Opencode: Dag.Service + layer + .node (LayerNode), EventV2Bridge-backed - Opencode: runtime (scheduling, spawn, eval, recovery, worktree-manager, templates) - Opencode: workflow tool (start/extend/control) - HTTP API: DagApi group (6 endpoints) + dagHandlers + server.ts wiring - TUI: sidebar DAG indicator + full-screen inspector route - SDK regenerated Bug fixes applied: - scheduling: failed nodes no longer counted as 'done' (separate failed Set) - scheduling: parallel forkDetach for 4 event subscriptions (was serial-blocked) - handlers: Effect.die -> notFound()/InvalidRequestError (500 -> 404/400) - spawn: model resolution requires both modelID+providerID (no empty fallback) - spawn: prompt resolved via resolveTemplate (was hardcoded empty text) - Removed dead core/dag/dag.ts (duplicate Service tag, zero consumers) All packages typecheck green. 80 tests pass (49 core + 31 opencode).
Phase 0 (dag-node-completion-semantics, 17/17 tasks complete): - spawn.ts: replace failure-only catchCause with Effect.gen success path that extracts output text and publishes NodeCompleted on prompt resolution - Fixes F1: successful nodes now publish NodeCompleted, preventing the scheduling loop deadlock that froze every workflow after first layer - 4 new completion tests (success/failure/empty-output/idempotency) OpenSpec changes (architecture analysis captured as specs): - dag-node-completion-semantics: completion contract (Level 1 text output) - dag-scheduler-durability: restart recovery + saga rehydration (Phase 2) - dag-scheduling-correctness: 6 internal bugs (race/replan/pause/cleanup) (Phase 2) - dag-structured-output: Level 2 data flow (structured output/input_mapping) (Phase 2) - dag-runtime-wiring spec relaxed: permits spawn.ts completion bridge - dag-runtime-wiring proposal: marks completion-semantics as prerequisite Boundary: Level 1 output is plain text; input_mapping field references (nodeID.output.field) resolve to undefined until Level 2 lands.
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 freeto 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.
What
Lands the DAG workflow engine on dev: the core graph/layering/transition/replan primitives in
packages/core/src/dag/, plus the opencode runtime layer (eval/scheduling/spawn/recovery/worktree-manager) with HTTP API wiring, TUI plugin hooks, and a durable SQL-backed store with migrations. OpenSpec planning artifacts covering runtime wiring, structured output, scheduling correctness, scheduler durability, and node completion semantics are included for review traceability.Two commits:
c8e7b676fd feat(dag): add DAG workflow engine with HTTP API, TUI plugins, and runtimeba9118668b fix(dag): bridge node completion + OpenSpec architecture analysisVerification baseline (before PR gate)
packages/core/test/dag-core.test.tsvalidates graph construction, transition rules, replan, required-validator and projector behavior.packages/opencode/src/server/routes/instance/httpapi/.Why this PR now
This is the second branch the user asked to land on dev (the first being
fix/elicitation-calltoolPR #69 which is already merged). It unblocks the DAG scheduling/correctness and runtime-wiring work tracked in OpenSpec changes underopenspec/changes/dag-*.Notes
./packages/sdk/js/script/build.ts.