Skip to content

caddyfile: fix importGraph self-loop and stale-edge bugs - #7971

Merged
steadytao merged 2 commits into
masterfrom
fix-import-graph-cycles-and-stale-edges
Sep 2, 2026
Merged

steadytao merged 2 commits into
masterfrom
fix-import-graph-cycles-and-stale-edges

Conversation

@mohammed90

Copy link
Copy Markdown
Member
  • willCycle now reports a cycle when from == to, so addEdge rejects self-loops (a self-importing file was previously accepted).
  • removeNode now drops the removed node's outgoing edges and any incoming edges pointing at it, keeping the adjacency map consistent.

Assistance Disclosure

Test was generated by copilot/Claude 4.7; fixed by the same.

Related to #7227

- willCycle now reports a cycle when from == to, so addEdge rejects
  self-loops (a self-importing file was previously accepted).
- removeNode now drops the removed node's outgoing edges and any
  incoming edges pointing at it, keeping the adjacency map consistent.

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
@mohammed90 mohammed90 added the bug 🐞 Something isn't working label Aug 30, 2026

@steadytao steadytao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@steadytao
steadytao merged commit 2cb7ebc into master Sep 2, 2026
31 checks passed
@steadytao
steadytao deleted the fix-import-graph-cycles-and-stale-edges branch September 2, 2026 21:48
@steadytao steadytao added this to the v2.11.5 milestone Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants