Cycles at code and ownership boundaries
What This Concept Is
A strongly connected component is a maximal group whose members can all reach each other. It identifies mutual dependency, not merely the existence of one edge. Collapsing code units into owners answers a different question from looking for cycles between individual files.
Why It Matters Here
A module boundary can require coordinated changes even when the source graph has no cycle. Conversely, private internal cycles may be acceptable within one owner while cross-owner cycles violate your intended structure. Choose the graph that matches the decision.
Concrete Example
Let A.api import B.helper, and B.api import A.helper, with no further edges. There is no file-level cycle: neither helper leads back. After grouping by owner, A depends on B and B depends on A. The owner graph has the SCC (A,B). That result shows two-way ownership dependency, not proof of runtime deadlock.
A chain A to B to C has no owner cycle. Adding C to A creates one SCC containing all three. Reporting only the last back edge hides the larger group affected by the repair. An internal A.api to A.helper edge is omitted from the owner graph; it must not generate a false cross-module cycle.
Common Confusion / Misconception
An undirected connection is not mutual reachability. A self-dependency prohibition also needs a positive-length path: the existence of node A does not mean A depends on itself. The downloadable model reports SCC groups, not every possible cyclic path, avoiding an explosive enumeration of redundant cycles.
How To Use It
Compare node-level and owner-level graphs. Find the policy violation first, then consider dependency inversion, moving an orchestration responsibility, changing ownership, or accepting a justified coupling. Inversion changes who names a contract; it does not make runtime calls disappear. Run behavior tests after a structural repair.
Check Yourself
Why can owner grouping introduce a cycle absent from the source graph? Does a directed path A to B establish an SCC? Why can a huge shared module reduce reported cycles while making change harder?
Mini Drill or Application
Predict SCCs for a chain, a two-owner cycle and two disconnected cycles. Add duplicate edges and ensure the answer is unchanged. Rename owners consistently and verify that only labels change. Repair one cycle in your sample application and explain where the orchestration now lives.
Read This Only If Stuck
Fundamentals of Software Architecture — coupling and modularity. ArchUnit's user guide describes architecture and cycle checks for Java; this graph lab does not substitute for analysis of compiled application dependencies.