fix(classifier-match): allow same-direction delegation bus access connections (AADL v2.3 §9.4)#216
Open
avrabe wants to merge 3 commits into
Open
fix(classifier-match): allow same-direction delegation bus access connections (AADL v2.3 §9.4)#216avrabe wants to merge 3 commits into
avrabe wants to merge 3 commits into
Conversation
…nections (AADL v2.3 §9.4) Per AADL v2.3 §9.4 access connections come in two kinds: peer (subcomponent ↔ subcomponent) where directions must oppose, and delegation (enclosing-feature ↔ subcomponent-feature) where the enclosing feature delegates its role inward and directions must MATCH. spar previously applied the peer rule uniformly, causing false-positive errors on valid delegation connections like `bus access eth_ext <-> inner.eth` where both ends are `provides`. Detection: a connection is a delegation iff exactly one `ConnectionEnd.subcomponent` is `None` (the side referencing the enclosing component's own feature). For delegation, mismatched directions now error with fresh wording; for peer connections, same-direction continues to error with the existing wording. User-reported on v0.9.3 with 32 occurrences in real OEM SIP-internal wiring. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
# Conflicts: # artifacts/requirements.yaml # artifacts/verification.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproducer
Expected: no error. Actual on v0.9.3:
classifier_match: connection 'c_eth': both source 'eth_ext' and destination 'eth' are 'provides' — access connections require provides ↔ requires pairing. User reports 32 occurrences in their real OEM SIP-internal wiring model on x86_64-linux.Summary
provides↔requires) uniformly to every access connection, falsely flagging valid delegation connections where both ends areprovides(or bothrequires).check_access_matchinclassifier_match.rsdidn't distinguish peer from delegation; it only checkedsrc_ak == dst_ak.ConnectionEnd.subcomponentisNone" (i.e. that end references the enclosing component's own feature, not a subcomponent's). For delegation, directions must MATCH; for peer, they must oppose. Existing peer-error wording is preserved verbatim (golden-test stable); delegation mismatches use fresh wording.Test plan
bus_access_delegation_both_provides_ok— exact user MWE; no diagnostic.bus_access_delegation_both_requires_ok— same shape, bothrequires; no diagnostic.bus_access_peer_provides_to_requires_ok— peer regression (Provides ↔ Requires) still clean.bus_access_peer_both_provides_errors— peer regression: both-providesstill errors with original wording.bus_access_peer_both_requires_errors— peer regression: both-requiresstill errors with original wording.bus_access_delegation_directions_mismatch_errors— delegationprovides/requiresmismatch errors with new wording.All 38 classifier_match tests pass;
cargo clippy --workspace --all-targets -- -D warningsclean;cargo fmtclean.🤖 Generated with Claude Code