Repository navigation
fix(rust): withhold gaps on trait-impl methods no test names - #9595
EffortlessSteven wants to merge 2 commits into
Conversation
A weak gap on a method of impl Trait for Type that no related test calls by name reads as limited under rust_implicit_trait_call_unresolved. Operators, Drop, Iterator and dyn dispatch run the method without spelling it (RIPR-SPEC-0240). A call by name on a concrete type keeps its gap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfeyhVjKnck3hhzL3soJz1
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 17 minutes. View limit details
Comment |
There was a problem hiding this comment.
Code Review
This pull request implements the rust_implicit_trait_call_unresolved limit (RIPR-SPEC-0240) to withhold weak gaps on trait-implementation methods that lack explicit test names (such as operators, drop glue, iteration, or trait objects). It introduces the classification logic in implicit_call.rs, integrates it into the Rust analysis pipeline, bumps the cache schema version to 1.91, and updates the corresponding documentation, tests, and fixtures. Feedback on the changes highlights two key improvements: first, instantiating the RAII cleanup guard immediately after creating the temporary directory in TempRepo::create prevents directory leaks if subsequent file writes fail; second, extracting the last segment of the trait path for trait_ident ensures robust detection of trait objects when they are referred to by their short names.
Bump the sharded and compact classified-seam cache generations (0.98) beside full 1.91, mask comments and strings and read turbofish calls when looking for a named call, keep the gap when a related test is not in the index, match the trait object by its last path segment, and clean the test temp dir on a partial setup failure. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfeyhVjKnck3hhzL3soJz1
Review of record — head 563f833Two independent read-only reviewers on d1e3ecf, plus Gemini inline comments. Correctness / edge cases (blocking found and fixed):
Spec / contract (blocking found and fixed):
Gemini: trait path last segment and RAII guard ordering, both fixed and resolved. Proof on this head: Disposition: no open blocking findings. Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Closing as superseded by #9466 (merged at 605ce3f), which already fixes #9441 under Generated by Claude Code |
Summary
Fixes #9441 (under #9410). A weak gap on a method of
impl Trait for Typethat no related test calls by name now readsstatic_unknownunder the newrust_implicit_trait_call_unresolvedlimit (RIPR-SPEC-0240). Operators,Drop,Iteratoranddyndispatch run the method without spelling it, so name-token proximity cannot support "assertion too weak". Nothing is credited.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: RIPR-SPEC-0240 (new "Trait-impl methods no test names" section)
Governing issue or accepted claim: #9441
Acceptance delta (one sentence): The Rust corpus rows
shape-op-add-impl,shape-drop-impl-side-effectandshape-dyn-trait-method-exactstop being false actionable.Candidate Relationships
Candidate branch: claude/project-thread-9lsalp
Stack parent or prerequisite PR (if any): none. Independent of #9477 and #9488; the cache schema bump (1.90 to 1.91) and the
StaticLimitKindlist will conflict mechanically with whichever merges first.Scope Classification
What changed
The limit (
classify/implicit_call.rs) fires when all hold: the owner id isimpl Trait for Type; reach is the proximity-only reading; no related test is adirect_owner_call; some name-tied test pins a strong exact value; and no related test calls the method name except throughdyn <Trait>. Narrowing came from measurement: a first version drifted 18 goldens (same-named methods on other types,rust_trait_impl_shadowand friends) and 3 true-gap corpus rows, so a call by name on a concrete type and a smoke/relational-only test keep their gap.Corpus effect (555 cases, false verdicts 17 to 14)
false_actionabletoabstained: shape-op-add-impl, shape-drop-impl-side-effect, shape-dyn-trait-method-exact.idealtoabstained(cases acceptlimited): config-default-host, shape-dyn-trait-method-twin-input. They are true gaps whose name-tied test pins an exact value of a different input; telling them apart needs input-to-impl evaluation.shape-iterator-next-collect(abstained before) is unchanged.Proof
Full
cargo test -p ripr: only failures are the offlinefallible_literaltests (need to downloadanyhow). Cache schema 1.90 to 1.91;first_useful_actionsnapshots re-hashed and a boundary_gap CHANGELOG entry added.Claim Boundary
May claim: these trait-impl shapes no longer produce a certain gap. Must not claim: they are credited or that a test pins the method.
Static Language Check
killed,survived,untested,proven, andadequate.Generated by Claude Code