You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(agent,data): task-state-based serialization + planner restore for fast-mode bound tasks
Round 5 of branch-isolation hardening per PR #85 review.
- coordinator: serialization predicate now combines current config AND task
state. Previously, toggling git.create_branches=false mid-pipeline opened
the parallel pool even though restorePersistedBranch kept switching HEAD
on already-bound tasks. Fix: parallel disabled when EITHER
projectUsesSharedBranchIsolation(rootPath) OR
hasActiveBranchBoundTasksForProject(projectId) is true. Applied in both
processAutoQueueAdvance and resolveProjectConcurrency. Until #86
introduces per-task worktrees, any in-flight bound task forces serial.
- data: new hasActiveBranchBoundTasksForProject query. Includes backlog so
a task pre-bound by accept_existing_plan / replan does not let the pool
open before its first stage starts. Includes blocked_external so retry
cycles do not leak parallel concurrency.
- planner: restore is no longer gated by plannerMode. For ANY bound non-fix
task, restorePersistedBranch fires regardless of full/fast mode. Branch
CREATION stays full-mode-only (fast mode never provisions a new branch
by design — see aif-handoff#83). Closes the mode-drift gap where a
fast-mode replan of an already-bound task ran on whatever HEAD happened
to be.
Tests:
- data: 4 cases for hasActiveBranchBoundTasksForProject (no branchName,
in-flight bound, queued backlog bound, terminal bound).
- planner: regression test — fast plannerMode + persisted branchName +
drifted HEAD → planner ends on the persisted branch, not on main.
npm run ai:validate green end-to-end.
0 commit comments