fix(boundary): distinguish trait methods and forwarding edges - #160
Merged
Merged
Conversation
randlee
marked this pull request as ready for review
September 19, 2026 17:41
randlee
added this pull request to stack #165
September 19, 2026 20:09
This was referenced Sep 19, 2026
randlee
force-pushed
the
fix/trait-method-identity
branch
from
September 20, 2026 17:47
99b7ef7 to
cda2487
Compare
rand-lee
force-pushed
the
fix/trait-method-identity
branch
from
September 20, 2026 18:27
cda2487 to
355ed75
Compare
randlee
force-pushed
the
fix/trait-method-identity
branch
from
September 20, 2026 18:42
355ed75 to
0e6bbb2
Compare
randlee
removed this pull request from stack #165
September 20, 2026 18:42
randlee
added this pull request to stack #172
September 20, 2026 18:43
randlee
force-pushed
the
fix/trait-method-identity
branch
from
September 20, 2026 18:48
0e6bbb2 to
89ee19f
Compare
randlee
removed this pull request from stack #172
September 20, 2026 20:19
randlee
added this pull request to stack #183
September 20, 2026 20:19
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.
A type can legitimately have an inherent method and multiple trait implementations with the same method name. The boundary graph previously assigned all of them
<owner>::<method>, discarded subsequent nodes, and combined forwarding edges under whichever implementation appeared first. For example, sc-observability'sTelemetry::emit_spanandSpanEmitter::emit_spanbecame one node, producing misleading inherent self-loop attribution.This child of draft PR159 distinguishes trait methods by implementation identity and preserves qualified forwarding edges. Trait and self generic arguments participate in implementation keys, so distinct generic implementations do not collapse. Unqualified calls retain existing inherent targets, then resolve within the current trait or to a unique candidate; ambiguous calls remain unresolved. Resolved duplicate edges are removed.
Graph compatibility: inherent method IDs remain
<owner>::<method>. Trait method IDs change to<impl-id>::<method>, and generic implementation IDs gain their arguments/self-type discriminator. Downstream graph consumers should follow metadata and containment/target edges rather than assume the old trait method ID shape. JSON fields/schema remain unchanged; the graph schema guide documents the identity correction.Cycle policy is unchanged. This fixes method identity and attribution; it does not suppress owner-level cycles or claim that valid forwarding patterns are lint-clean.
Validation at the reviewed local checkpoint:
cargo test -p sc-lint-boundary: 91 passed. Regressions cover both declaration orders; inherent/typed/legacy coexistence; correct forwarding edges; generic trait/self argument separation; current-trait calls; edge deduplication; preserved type ownership; and continued cycle findings.just lintandjust test: passed.git diff --check: passed.7246f6796a52ecb2d026d735426ae726968a1eb6: graph export now has separate inherent/trait Telemetry emit methods and separate typed/legacy projector and sink methods.Base: frozen PR159 commit
ba2d9bf622c1604e3f017c728040906b90e71bce. Beadslint-pxe, review pending. No consumer source/config edits, publication, tags, or merges. Draft for independent J2 QA.CI status: automatic CI does not run for this child base. The existing workflow filters PR bases to
develop,main,integrate/*,integration/*, andsprint/*, excludingfix/reference-impl-owner; it has no manual-dispatch trigger. No CI configuration changes are included. Local aggregate proof above passed; hosted cross-platform CI is not claimed.