pa-01 — Verification
One command
cd pa-01-microservices-decomposition && bash scripts/verify.sh
What the tests prove
| Test | Invariant |
|---|---|
TestCycleDetection | a 3-node dependency cycle is found (and reported as the SCC) |
TestSelfLoopIsCycle | a self-dependency counts as a cycle |
TestAcyclicHasNoCycle | a clean DAG reports no cycles |
TestBlastRadius | transitive dependents are correct; a leaf has an empty radius |
TestFanInOut | afferent/efferent coupling counts are correct |
TestLayeringViolations | a domain→infra edge is flagged against the rule |
All under -race.
What "green" does NOT guarantee
- The graph's truth is your responsibility. The analyzer is sound; garbage edges give confident-but-wrong findings (derive edges from real imports/traces).
- Structure, not temporal coupling. Services that must change together but share no edge aren't caught (add change-coupling analysis).
- No contract checking here. API/event compatibility is pa-02; these checks become CI fitness functions in pa-10.