feat(engine): same-project parallel task selection — round-robin fill#199
Merged
Conversation
… (INT-2318)
Only one agent ever ran per project. The serializer was not the scheduler
(same-project concurrency has been supported under worktree isolation
since INT-1975, default on) but the DecisionEngine's hard one-task-per-
project rule in heartbeat selection — its justifying comment ('the
scheduler runs at most one worker per project') was stale, and it kept
the heartbeat's KG file-conflict detection (group.length > 1 branch)
permanently dead.
Selection is now round-robin across projects (extracted to the pure,
unit-tested selectTasksRoundRobin): every pass adds at most one task per
project, so no project can monopolize the slots; with sameProjectParallel
later passes fill the remaining slots from the same projects. The flag is
wired from allowSameProjectConcurrent && worktreeMode — selection only
outpaces one-per-project when the scheduler can actually run those tasks
concurrently. File-overlapping tasks within a project are still deferred
by the existing knowledge-graph conflict detection.
Full suite 1398 passed, lint 0, tsc clean.
This was referenced Jul 2, 2026
Merged
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
Only one agent ever ran per project (INT-2318). The serializer was not the scheduler — same-project concurrency has been supported under worktree isolation since INT-1975 (
allowSameProjectConcurrent, default on) — but the DecisionEngine's hard one-task-per-project rule in heartbeat selection. Its justifying comment was stale, and it kept the heartbeat's KG file-conflict detection (group.length > 1branch) permanently dead.selectTasksRoundRobinand made round-robin across projects: every pass adds at most one task per project (fairness preserved — no project monopolizes slots); withsameProjectParallel, later passes fill remaining slots from the same projectsallowSameProjectConcurrent && worktreeMode— selection only outpaces one-per-project when the scheduler can actually run those tasks concurrentlyVerification
6 new unit tests (off/on ordering, maxTasks, skip accounting, no-retry of failed mappings, project-key fallback) · full suite 1398 passed · oxlint 0 · tsc clean
🤖 Generated with Claude Code