Skip to content

feat(monorepo): topological release ordering with cycle detection error #418

@BryanFRD

Description

@BryanFRD

Package
Which package does this affect? [x] cli [ ] schema [x] docs [ ] ci

Problem / Motivation
src/monorepo.rs handles dependsOn as a flat list. There's no documented cycle behaviour, no test asserting that cycles produce a useful error rather than a silent stack overflow / incorrect order / panic.

For a release tool, "what happens with a cycle?" must be a deterministic, helpful error.

Proposed solution
Acceptance criteria

  • Tarjan SCC detection over the package dependency graph.
  • Clear error message pointing at the cycle: cycle detected: pkg-a → pkg-b → pkg-c → pkg-a.
  • Fixture in tests/fixtures/monorepo/cycle/ with two packages depending on each other.
  • Test asserts a clean error exit code, no panic, no partial release.
  • Document cycle behaviour in the docs site monorepo page.

Alternatives considered
None considered explicitly — this is the natural shape.

Additional context
Severity: P2

Category: cli/monorepo

Kit / UI candidate: No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priorityfeatureNew feature or capability

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions