Fix overlapping layer ownership - #19
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe runner now preserves multiple layer memberships per code element, evaluates rules across distinct layer pairs, and applies external-import rules to every matching layer. Reports sort violations deterministically. Documentation and tests describe and verify these semantics. ChangesLayer analysis and reporting
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change updates layer-membership analysis and report ordering, with the stated checks and 174 tests passing; no actionable merge-blocking risk remains beyond normal review. Sequence Diagram(s)sequenceDiagram
participant CodeAnalyzer
participant DeplyRunner
participant ExternalImportRule
CodeAnalyzer->>DeplyRunner: Return dependency results
DeplyRunner->>DeplyRunner: Evaluate distinct source-target layer pairs
DeplyRunner->>ExternalImportRule: Check each file-layer membership
ExternalImportRule-->>DeplyRunner: Return layer-specific violations
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Root cause
DeplyRunnerstored elements in every matchingLayer, butcode_element_to_layerretained only the last match. Dependency and external-import checks therefore depended on collector order and disagreed with element-based rules.Impact
Collector and layer order no longer changes analysis semantics. Overlapping configurations may report multiple violations when multiple membership pairs are explicitly forbidden.
Verification
make checkSummary by CodeRabbit
Bug Fixes
Documentation