Skip to content

fix: call parirty rule for testing layer and not leaf#26

Open
SaschaOnTour wants to merge 20 commits intomainfrom
fix/call-parity
Open

fix: call parirty rule for testing layer and not leaf#26
SaschaOnTour wants to merge 20 commits intomainfrom
fix/call-parity

Conversation

@SaschaOnTour
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/adapters/analyzers/architecture/rendering.rs Outdated
Comment thread src/adapters/analyzers/architecture/call_parity_rule/tests/support.rs Outdated
Comment thread src/adapters/analyzers/architecture/call_parity_rule/tests/check_c.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/adapters/config/architecture.rs
Comment thread src/adapters/config/architecture.rs Outdated
Comment thread book/reference-rules.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/adapters/analyzers/architecture/call_parity_rule/tests/support.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/adapters/report/sarif/mod.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/adapters/report/findings_list/categories.rs
Comment thread src/adapters/report/json/dry.rs
Comment thread src/adapters/report/json/dry.rs
Comment thread src/adapters/report/json/dry.rs
@SaschaOnTour SaschaOnTour requested a review from Copilot April 30, 2026 20:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@SaschaOnTour SaschaOnTour requested a review from Copilot April 30, 2026 20:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 2, 2026 17:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 2, 2026 19:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 2, 2026 20:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 3, 2026 05:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 3, 2026 14:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 3, 2026 16:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 3, 2026 20:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants