feat(run): devstack-native task-graph runner (spec 31) - #119
Merged
Conversation
The second half of spec 31: run project commands as a dependency graph. - config: optional `tasks:` block on Project (command, run host|exec, service, deps, workdir, env, watch), validated via validator dive. - internal/task: pure DAG planner — transitive closure + Kahn layering, cycle and unknown-task/dep detection, deterministic (sorted) layers. - `devstack run <task...>`: resolves the active project, plans the graph, runs layers in order with independent tasks in parallel (--parallel), streaming each task's output live and name-prefixed (mutex-serialized, race-free). run: host executes on the host; run: exec via `compose exec`. --dry-run prints the plan; --json supported. No flock — touches no shared/ledger state. Monorepo/Turborepo: the turborepo template runs `turbo run` in-container, or map package scripts into tasks: so `devstack run` owns the graph. Tests: planner (linear/diamond/closure/cycle/unknown) + executor order + failure propagation (race-clean). make ci + determinism green. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
Second half of spec 31 / D19: a non-container task graph — run project commands with dependency ordering and parallelism.
What's in
tasks:block on a project (command,run: host|exec,service,deps,workdir,env,watch) — validated via validatordive.internal/task— a pure DAG planner: transitive closure + Kahn layering, with cycle and unknown-task/dep detection; deterministic sorted layers.devstack run <task...>— resolves the active project, plans the graph, and runs layers in order with independent tasks in parallel (--parallel), streaming each task's output live and name-prefixed (mutex-serialized, race-free).run: hostruns on the host toolchain;run: execruns inside a service viacompose exec.--dry-runprints the plan;--jsonsupported. No flock — touches no shared/ledger state.Verified
Monorepo / Turborepo
The
turborepotemplate (PR #118) runsturbo runin-container; or map package scripts intotasks:sodevstack runowns the graph.Tests / gates
Planner (linear / diamond / closure / cycle / unknown) + executor order + failure propagation, race-clean.
make ci(fmt/vet/build/test-race) +make determinismgreen.This completes spec 31. Remaining RFC work: spec 30 Phase 3 (the authoring TUIs).
🤖 Generated with Claude Code