Repository navigation
fix(classify): a helper behind a tested caller is not reachable_unrevealed on proximity tests alone (#12900) - #13740
Conversation
…ealed on proximity tests alone (#12900) When every related test is a proximity guess (same file, name token, module), the owner is not a trait-impl method, and a chain of production callers (at most six hops, by callee name) leads to a function a test or test helper calls, the nearby tests are not shown to run the owner. Their missing assertion is no evidence the change goes unnoticed, so the finding reads weakly_exposed instead of reachable_unrevealed. An unexercised sibling caller (compile_time_marker_test_no_observation) or a test-side decoy does not count, so those positive gaps stay. Five-crate cargo-mutants corpus (rust-hex, semver, strsim-rs, bytesize, humantime; diff mode, one ripr check per mutant): positive gaps 58 true / 140 false -> 50 true / 73 false (precision 29.3% -> 40.7%); no mutant gained or lost `exposed`. Goldens: 0 drift. Verdict corpus: false verdicts 0/853; two rows re-blessed (lib-quickcheck-roundtrip- involution gap -> limited; spec0171-ex05 stays limited, class reachable_unrevealed -> weakly_exposed on a discriminated row). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLWWvfDccRQ8dqZ1tHL
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
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 18 minutes. View limit details
|
- Run the caller walk only on final stages that could read reachable_unrevealed (observe No on weak, proximity-only reach). - Do not follow a caller name more than three production functions define, so a common name (`new`, `get`, `len`) cannot stand in for a path; drop the dead `::` suffix match (CallFact::name is bare). - Record an evidence line when the rule applies, so the class and its stages agree in the output. - Move the new items off `is_trait_impl_method`'s doc comment; add a negative test for test-module and ambiguous callers. Corpus: 50 true / 79 false positive gaps (was 58 / 140); goldens 0 drift; verdict corpus false verdicts 0/853. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLWWvfDccRQ8dqZ1tHL
…sion (#12900) The flag (and its evidence line) now also requires the shared decision to read reachable_unrevealed, so the line never sits beside an infection_unknown, propagation_unknown or static_unknown class. Adds an end-to-end ClassifiedProbeEvidence test: a helper behind a caller a test calls reads weakly_exposed with the line; with no such caller it stays reachable_unrevealed with none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLWWvfDccRQ8dqZ1tHL
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Source review of a342f7c. Two fresh-context reviewers covered it: a full pass on 2d873eb and a delta pass on f5edaa3. The owner then read the complete diff.
Inspected:
- The semantic owner:
ClassifiedProbeEvidence::classifyand the flag on its final stages. - The caller walk: BFS bounds, link ambiguity, production-only links.
- Consumers of a demoted
weakly_exposedfinding: missing-evidence text, next steps,confidence_score, gap admission. The actionability gate is not widened. - The test oracles: three reach unit tests and one end-to-end evidence test, each with a discriminating negative.
Findings from both passes were repaired:
- The note on
is_trait_impl_methodwas displaced; it is moved back. - The walk ran eagerly; it is now lazy.
- Common names over-matched; caller names with more than 3 production definitions are no longer followed.
- The demoted finding had no evidence line; one is added.
- That line could sit beside an infection_unknown class; the flag is now tied to the shared decision.
Local proof on a342f7c:
cargo xtask precommitexit 0.cargo xtask goldens check: 0 drift entries.cargo xtask verdict-corpus checkexit 0: false verdicts 0/853, contradictions 0/1042.- Analysis lib tests pass.
Five-crate corpus: false positive gaps 140 → 79 and true 58 → 50, with no mutant gaining or losing exposed.
Hosted qualification is still to run.
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! |
…12900) Review follow-ups (Devin on a342f7c): - A test-side helper is a caller-walk endpoint only when a registered test calls it; a dead `#[cfg(test)]` helper is no evidence. - The demotion converts the class in place, so the RIPR-SPEC-0228 field-assignment guard still abstains to static_unknown when no field read is established. - Negative control for a dead helper added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLWWvfDccRQ8dqZ1tHL
ripr static exposure checkCommit Took 70s. |
|
|
A production caller in a dependent package is the cross-package wrapper case from #10127, which keeps reachable_unrevealed and names its transitive-reach limit. Only callers in the owner's own workspace package now link the chain. Same-package wrapper tests in cross_package_wrapper_reach now expect weakly_exposed: a test that calls the owner's own tested wrapper is a tested caller chain, so the nearby tests' missing assertion is no evidence of an unnoticed change. The spec0171-ex05 dependent row returns to its main expectation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLWWvfDccRQ8dqZ1tHL
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Delta since 62f3707: hosted CI found the caller-chain rule also fired through wrappers in a dependent package, which is the #10127 cross-package case. Links now must sit in the owner's own workspace package (package_prefix), so another-package wrappers keep reachable_unrevealed plus the transitive-reach limit (a_test_through_a_wrapper_in_another_package_names_the_reach_limit and a_deep_wrapper_chain_in_another_package_names_the_reach_limit pass again, and the namesake dependent case keeps its gap). The five same-package wrapper tests now expect weakly_exposed: the test calls the owner's own wrapper with an exact assertion, so the nearby-test gap was the false positive this PR removes; none read exposed. The spec0171-ex05 dependent verdict row returns to its main expectation.
Local evidence on this head: cargo test -p ripr --lib 18386 passed; --test cross_package_wrapper_reach 11 passed; goldens drift 0; verdict corpus 0/853 false verdicts, no drift; cargo xtask precommit exit 0. Five-crate corpus unchanged at 50 true / 79 false positive gaps (baseline 58 / 140), no mutant gained or lost exposed. The cli_reference_doc failure on the prior run was main drift fixed by #13811.
Generated by Claude Code
|
The Rust jobs on 45dc049 fail at compile time with Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Delta since 45dc049: a clean merge of current main (which now includes the #13848 compile fix), because the pull-request merge ref stayed on a base from before that fix and every Rust job failed at E0004. No conflicts and no change to this PR's files beyond main's own. cargo check -p ripr --lib --tests passes on the merged head. The source review and local evidence recorded on 45dc049 still hold for this PR's diff.
Generated by Claude Code
Requested by Steven Zimmerman · project thread
Summary
A finding now reads
weakly_exposedinstead ofreachable_unrevealedwhen all of these hold:The nearby tests are not shown to run the owner, so their missing assertion is no evidence that the change goes unnoticed. An evidence line records when this rule applies.
These still count as positive gaps: a caller no test runs (
compile_time_marker_test_no_observation), a test-side decoy (theinherent_receiver_*shadow fixtures), and a common name such asnew,getorlen.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Proposal: none
Spec: RIPR-SPEC-0219 (verdict corpus), RIPR-SPEC-0108 (honesty)
ADR: none
Plan item: #12900 precision
Governing issue or accepted claim: #12900
Acceptance delta (one sentence): A Rust helper reached only through a tested production caller chain, with proximity-only related tests, no longer reads as a positive
reachable_unrevealedgap, cutting false positive gaps on the five-crate cargo-mutants corpus from 140 to 79 with no newexposedverdicts.Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication): claude/project-thread-msez58
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): n/a. This complements #13069 (repo-mode public-parent/private-helper witness) and #12766/#12769 (abstention); no files are shared.
Scope
classifier/evidence.rs: a newproximity_reach_of_named_ownerflag, computed on the final stages only when observe isNo.ClassifiedProbeEvidence::classifyapplies it toReachableUnrevealedonly, and it adds an evidence line.classify/reach.rs: newowner_tested_through_production_caller, plus three unit tests:Scope Classification
Production delta:
reachable_unrevealed→weakly_exposedin the case above. It never touchesexposed,no_static_pathor oracle credit.Evidence/support delta:
Single acceptance criterion:
Non-goals:
test_grip_evidence.rs) does not get this flag. Demotion only lowers a claim, and this PR is scoped to diff mode; follow-up noted on eval(spot-check): replacement-readiness scoreboard — only ~11% of runtime-missed mutants get a positive ungripped call, 48% of mutants have no seam #12900.Evidence
Five-crate corpus, rebuilt locally:
benchmarks/mutation_spot_check/README.md;ripr check --diffrun;No mutant gained or lost
exposed.The 8 true gaps that moved are all boundary misses (
>→>=and similar) on semver'smatches_*helpers. Tests do run these helpers throughmatches, soweakly_exposeddescribes them better.Sweep of the link-ambiguity bound (how many production definitions of a caller name the walk still follows):
Remaining false positives: 45
no_static_path(40 of them are the private-helper "No static test path" case that #13069 owns), 34reachable_unrevealed, most of them trait-impl methods.Local checks on f5edaa3:
cargo xtask goldens check: 0 drift entries.cargo test -p ripr --lib analysis::: 10,620 pass.cargo xtask check-static-language: pass.cargo xtask verdict-corpus check: false verdicts 0/853, contradictions 0/1042. Two rows moved and were re-blessed:lib-quickcheck-roundtrip-involution(truth partially_discriminated):reachable_unrevealed→weakly_exposed, verdict gap → limited (ideal → abstained).maskis called byencode, which the quickcheck property calls, so the honest class is weak.spec0171-ex05-custom-lib-path-dependent(truth discriminated):reachable_unrevealed→weakly_exposed. The verdict stays limited, and a false positive class is removed.cargo xtask precommit: passed on 2d873eb; rerun on f5edaa3 in progress.Review: an independent fresh-context review of 2d873eb found no blockers, plus four should-fix or nit items, all addressed in f5edaa3. A delta review of f5edaa3 is running.
🤖 Generated with Claude Code
https://claude.ai/code/session_01UNUoLWWvfDccRQ8dqZ1tHL