Skip to content

splitOversized can break dependency-linked groups #698

@Iron-Ham

Description

@Iron-Ham

Problem

pipeline.splitOversized (in internal/pipeline/decompose.go) naively chunks groups by position when they exceed MaxTeamSize. It does not consider dependency edges, so it can place dependent tasks in different chunks — creating separate teams with unsatisfiable cross-team dependencies.

This is the exact same class of bug fixed in #697 (cross-team dependency deadlock). The fix in #697 unions tasks along DependsOn edges, which makes large dependency-connected groups more likely to form, increasing the probability of hitting this splitOversized path.

Current risk

Low — MaxTeamSize defaults to 0 (disabled). Only affects users who explicitly configure it.

Proposed fixes

Options (pick one):

  1. Make splitOversized dependency-aware — refuse to split across dependency edges
  2. Skip splitting for groups that contain internal dependencies
  3. Re-run union-find after splitting to detect and re-merge broken dependency chains

Context

Discovered during deep review of #697. Flagged by 5 of 10 review agents.

Files

  • internal/pipeline/decompose.go:146-162 (splitOversized function)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions