[feature] wire dev-task collision DAG at cell-PM delegation (sequencing S2)

Pure dev_task_collision_edges in sequencing.py turns a parent's surfaced
siblings into (depends_on_id, task_id) pairs via SequencingService. TaskService.
wire_sibling_collision_dag wires them through add_dependency (idempotent). The
choreographer calls it after each dev-task delegate so the sibling collision DAG
is built incrementally as the cell PM decomposes — file-overlap serializes,
migration chains, shared-last; stable (priority, sequence) ordering keeps edges
from flipping into reverse cycles on re-runs.
This commit is contained in:
Renn F
2026-06-28 04:11:38 +02:00
parent c9fd735a32
commit 12621a3608
5 changed files with 259 additions and 1 deletions
@@ -4874,6 +4874,16 @@ class Choreographer:
siblings = await self.task.get_subtasks(parent_task_id)
next_seq = len([s for s in siblings if s.id != new_task.id])
await self.task.set_sequence(new_task.id, next_seq)
# Wire the dev-task collision DAG (multi-level sequencing edge kind 3):
# run the deterministic analyzer over the parent's surfaced siblings
# and add_dependency each collision edge so a later dev task stays
# PENDING until the sibling it collides with completes (PR merged) —
# the cross-dev ordering the assignee-keyed spawn barrier could not
# guarantee (live 2026-06-27 out-of-order break). Incremental +
# idempotent: re-run after every delegate; add_dependency dedupes, and
# dev_task_collision_edges orders by (priority, sequence) so re-runs
# only add edges (never flip an existing pair's order into a cycle).
await self.task.wire_sibling_collision_dag(parent_task_id)
# Thread the parent's existing session links onto the
# new subtask so the assigned agent (dev/qa/doc) lands in the
# group chat the PM has already been talking in. Pre-gateway