Milestone 4: parallel execution - scheduler, worktrees, integrator (Tasks 19-21)#7
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…asks 19-21) Task 19 - engine/scheduler.ts: dependency-graph scheduler. Runs tasks as a DAG with bounded concurrency (config.maxParallel), starts a task only once deps are unblocking, and skips dependents (transitively) of unsatisfied prerequisites. Validates the graph up front (duplicate/missing/self refs, cycles). Seams for per-task workspaces and resume reuse. session.runGoal now delegates ordering + parallelism to it (replacing the sequential pass). Task 20 - workspace/worktrees.ts: GitWorktreeManager gives each concurrent task an isolated git worktree on its own branch (cut from a base ref), commits its changes for integration, and tears the worktree down. git is injected (workspace/git.ts) for testing. Task 21 - engine/integrator.ts: merges the per-task branches in a dedicated integration worktree, aborts + surfaces conflicts (with file paths) instead of force-resolving, and runs full verification on the integrated tree. Wired into runGoal behind opts.repoDir (+ config.useWorktrees). Adds 13 tests (119 total), incl. real-git worktree + integrator suites; typecheck clean.
This was referenced Jun 13, 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.
This pull request was created by @kiro-agent on behalf of @inhaq 👻
Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro Web
Summary
Completes Milestone 4 (Parallel execution) — Tasks 19, 20, 21.
Task 19 — Dependency-graph scheduler (
engine/scheduler.ts)config.maxParallel); a task starts only once every dependency reaches an unblocking state, and dependents of an unsatisfied prerequisite are skipped transitively (nothing builds on a broken base).session.runGoalnow delegates ordering + parallelism to the scheduler (replacing the sequential pass), with seams for per-task workspaces and resume reuse.Task 20 — Isolated worktrees (
workspace/worktrees.ts)GitWorktreeManagergives each concurrent task its own git worktree on a dedicated branch cut from a base ref, commits its changes for integration, and tears the worktree down. git is injected (workspace/git.ts) so it's unit-testable and verified for real.Task 21 — Integrator (
engine/integrator.ts)okis true only when all merges were clean AND verification passed. Wired intorunGoalbehindopts.repoDir(+config.useWorktrees).Testing
npm run typecheckclean.npm test: 119 passing (+13). Scheduler: ordering, parallelism-cap (peak ≤ max), transitive skip, resume reuse, graph validation. Worktrees + integrator run against real temp git repos: isolation, per-branch commit, clean multi-file merge + verification, and a real merge conflict surfaced with the offending file.Note on end-to-end wiring
The worktree+integration path in
runGoalis exercised at the module level with real git. A fullrunGoalend-to-end with worktrees needs a runner that actually writes files to the worktree (a real CLI/HTTP backend); the mock actors used in session tests don't touch the filesystem, so that combination isn't asserted here.Summary by CodeRabbit
Release Notes