Skip to content

fix(core): orient dependency edges in cycle detection (0.1.33) - #127

Merged
EYH0602 merged 1 commit into
feat/reader-turn-overheadfrom
fix/dependency-cycle-direction
Oct 15, 2026
Merged

EYH0602 merged 1 commit into
feat/reader-turn-overheadfrom
fix/dependency-cycle-direction

Conversation

@EYH0602

@EYH0602 EYH0602 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

detect_cycles ran one DFS over Child links (parent → child, downstream) and DependsOn links (dependent → dependency, upstream). Mixing directions:

  • False positive: a cross-branch diamond (X nests A nests C; B depends on X; C depends on B) is reported as ARA110, and ls/find/status refuse the artifact.
  • False negative: a node that depends on its own descendant is a real cycle but was not reported.

The ara-eval large-artifact survey found ARA110 on 58 internal trees (DissClaimer, MSI, Lara-dev, sierra); none has a cycle once edges are oriented consistently.

Fix

In detect_cycles only, orient DependsOn edges from dependency to dependent. Link data, layout and viewer are unchanged; ARA208's redundant-ancestor drop stays.

Verification

  • New tests dependency_diamond_across_branches_is_not_a_cycle and dependency_on_own_descendant_is_a_cycle fail before, pass after; existing cycle tests unchanged.
  • Full workspace tests, cargo fmt --check, cargo clippy -D warnings pass.
  • ARA110 cleared on all 58 affected trees.

Design note: docs/dependency-cycle-direction.md. Version 0.1.33, CHANGELOG Fixed.

detect_cycles mixed parent->child links with dependent->dependency links,
so cross-branch diamonds were reported as ARA110 cycles and a dependency
on one's own descendant was missed. Reverse DependsOn edges for the check
only. Clears ARA110 on all 58 affected internal trees.
@EYH0602
EYH0602 merged commit 9dfef2f into feat/reader-turn-overhead Oct 15, 2026
10 checks passed
@EYH0602
EYH0602 deleted the fix/dependency-cycle-direction branch October 15, 2026 00:38
EYH0602 added a commit that referenced this pull request Oct 17, 2026
Bring the 0.1.33 dependency-cycle direction fix (#127) and its design
record onto the integration branch. #121 squash-merged the earlier
reader-overhead work, so the only conflicts were the workspace version
and the matching CHANGELOG entry; both resolve to the 0.1.33 side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant