fix: call parirty rule for testing layer and not leaf#26
fix: call parirty rule for testing layer and not leaf#26SaschaOnTour wants to merge 20 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the architecture call_parity analyzer to use a boundary-only “touchpoint” semantic (stop traversal once the target layer is reached), expands the rule from two checks (A/B) to four checks (A/B/C/D), and bumps the crate to v1.2.1 with corresponding documentation and tests.
Changes:
- Introduce boundary-only touchpoint computation and cache it per adapter handler to drive all call-parity checks.
- Add Check C (multi-touchpoint) with configurable severity and Check D (handler-count multiplicity mismatch), plus exclusion of
#[deprecated]adapter handlers from A/B/C/D. - Update documentation, changelog, and version metadata to reflect the new semantics and checks.
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/adapters/config/architecture.rs | Documents narrowed call_depth semantics and adds single_touchpoint config + enum. |
| src/adapters/analyzers/architecture/violation.rs | Adds new violation kinds for Checks C and D. |
| src/adapters/analyzers/architecture/tests/compiled.rs | Updates test fixture config to include single_touchpoint. |
| src/adapters/analyzers/architecture/rendering.rs | Extends rendering to support the new call-parity violation variants. |
| src/adapters/analyzers/architecture/compiled.rs | Compiles the new single_touchpoint option into CompiledCallParity. |
| src/adapters/analyzers/architecture/call_parity_rule/touchpoints.rs | Adds boundary-only BFS touchpoint computation implementation. |
| src/adapters/analyzers/architecture/call_parity_rule/tests/touchpoints.rs | Adds unit tests validating boundary stop + depth semantics for touchpoints. |
| src/adapters/analyzers/architecture/call_parity_rule/tests/support.rs | Refactors integration test helpers to build touchpoints once and run A/B/C/D. |
| src/adapters/analyzers/architecture/call_parity_rule/tests/rlm_snapshot.rs | Updates snapshot test config to include single_touchpoint. |
| src/adapters/analyzers/architecture/call_parity_rule/tests/pub_fns.rs | Reuses shared layer fixtures and adds deprecated-attribute detection tests. |
| src/adapters/analyzers/architecture/call_parity_rule/tests/mod.rs | Registers new test modules (check_c, check_d, touchpoints). |
| src/adapters/analyzers/architecture/call_parity_rule/tests/check_d.rs | Adds coverage for multiplicity mismatch behavior (Check D). |
| src/adapters/analyzers/architecture/call_parity_rule/tests/check_c.rs | Adds coverage for multi-touchpoint behavior and severity modes (Check C). |
| src/adapters/analyzers/architecture/call_parity_rule/tests/check_b.rs | Updates Check B tests for boundary semantic and new “post-boundary helper is silent” behavior. |
| src/adapters/analyzers/architecture/call_parity_rule/tests/check_a.rs | Updates Check A tests to use touchpoint cache and deprecated-handler exclusion. |
| src/adapters/analyzers/architecture/call_parity_rule/tests/calls.rs | Adds regression tests for turbofish + inferred-generic call canonicalization. |
| src/adapters/analyzers/architecture/call_parity_rule/pub_fns.rs | Records deprecated on pub fns for handler filtering. |
| src/adapters/analyzers/architecture/call_parity_rule/mod.rs | Centralizes touchpoint-cache build, runs Checks A/B/C/D, and sets per-check severity (C is configurable). |
| src/adapters/analyzers/architecture/call_parity_rule/check_d.rs | Implements Check D (per-target per-adapter handler count divergence). |
| src/adapters/analyzers/architecture/call_parity_rule/check_c.rs | Implements Check C (multi-touchpoint detection, optionally disabled). |
| src/adapters/analyzers/architecture/call_parity_rule/check_b.rs | Rewrites Check B to compare boundary touchpoint coverage and handle orphan vs post-boundary helper. |
| src/adapters/analyzers/architecture/call_parity_rule/check_a.rs | Rewrites Check A to use touchpoint cache (empty set ⇒ no delegation). |
| book/reference-rules.md | Updates documented rule IDs for all call-parity checks (A/B/C/D). |
| book/reference-configuration.md | Documents updated call_depth meaning and new single_touchpoint config. |
| book/adapter-parity.md | Updates rule documentation to boundary semantics + new checks and deprecated-handler exclusion. |
| Cargo.toml | Bumps crate version to 1.2.1. |
| Cargo.lock | Bumps locked crate version to 1.2.1. |
| CHANGELOG.md | Adds 1.2.1 release notes describing semantic change + new checks and tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 30 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 38 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 140 out of 141 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.