review_diff grades deleted pub members of a pub(crate) type as api_break_deleted (high) #573
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#573
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by a worker during the v0.41.50 train (dogfood triage batch 17) and reproduced by the lead on the installed release, 0.41.49 (
a7ce9603).Reproduction (in this repository):
Actual: the fields
min,max,clampand the methodschemaare reportedseverity: "high",reason: "api_break_deleted". Every other deleted symbol of that file islow/internal_symbol_deleted.Control: at
31b3c0b6the container is crate-private:A
pubmember cannot be more visible than its containing type, so none of the four was reachable from outside the crate.Expected: a deletion is graded by effective visibility: the minimum of the member's own visibility and that of its containing type (and, for a method, of the
impl's self type). These four areinternal_symbol_deleted.Impact: an internal refactor produces high-severity public-API findings. An agent that follows
review_diffseverities spends its review on them, and a reader who learns thathighcan be a false alarm trusts the real ones less.Scope note: the member's recorded
visibilityis correct as written in source (pub). The defect is in the grading, which reads the member's visibility alone. The same question applies to members of a private module's public items; that case is not measured here.