Skip to content

fix(classify): a helper behind a tested caller is not reachable_unrevealed on proximity tests alone (#12900) - #13740

Merged
EffortlessSteven merged 6 commits into
mainfrom
claude/project-thread-msez58
Nov 8, 2026
Merged

EffortlessSteven merged 6 commits into
mainfrom
claude/project-thread-msez58

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven Zimmerman · project thread

Summary

  • A finding now reads weakly_exposed instead of reachable_unrevealed when all of these hold:

    • every related test is a proximity guess (same file, name token or module);
    • the owner is not a trait-impl method;
    • a chain of production callers leads to a function that a test or test helper calls. The chain is at most 6 hops, matched by callee name, and does not follow a name that more than 3 production functions define.

    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 (the inherent_receiver_* shadow fixtures), and a common name such as new, get or len.

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-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_unrevealed gap, cutting false positive gaps on the five-crate cargo-mutants corpus from 140 to 79 with no new exposed verdicts.

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 new proximity_reach_of_named_owner flag, computed on the final stages only when observe is No. ClassifiedProbeEvidence::classify applies it to ReachableUnrevealed only, and it adds an evidence line.
  • classify/reach.rs: new owner_tested_through_production_caller, plus three unit tests:
    • positive: a two-hop chain;
    • negative: a caller no test runs, and an owner with no caller;
    • negative: a caller in a test module, and an ambiguous caller name.

Scope Classification

  • One production behavior

Production delta:

  • reachable_unrevealed → weakly_exposed in the case above. It never touches exposed, no_static_path or oracle credit.

Evidence/support delta:

  • Two verdict-corpus rows re-blessed; changelog fragment.

Single acceptance criterion:

  • Corpus positive precision rises while false verdicts stay at 0.

Non-goals:

Evidence

Five-crate corpus, rebuilt locally:

  • cargo-mutants 27.1.0 at the revisions in benchmarks/mutation_spot_check/README.md;
  • each mutant applied and checked with one ripr check --diff run;
  • 1,647 mutants with a caught or missed outcome.
true positive gaps (missed) false positive gaps (caught) precision
main 0c2d378 58 140 29.3%
this PR (f5edaa3) 50 79 38.8%

No mutant gained or lost exposed.

The 8 true gaps that moved are all boundary misses (>→>= and similar) on semver's matches_* helpers. Tests do run these helpers through matches, so weakly_exposed describes them better.

Sweep of the link-ambiguity bound (how many production definitions of a caller name the walk still follows):

bound false positive gaps true positive gaps
1 119 58
2 112 58
3 (chosen) 79 50
≥5 73 50

Remaining false positives: 45 no_static_path (40 of them are the private-helper "No static test path" case that #13069 owns), 34 reachable_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). mask is called by encode, 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

…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
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 152 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: f6405e1b-ee3a-4f30-b4ae-fb59ef1fd4e1
Commits

Reviewing files that changed from the base of the PR and between ab93e28 and 3c43a35.

Files selected for processing: 7

  • changelog.d/helper-behind-tested-caller-precision-12900.md
  • crates/ripr/src/analysis/classifier/evidence.rs
  • crates/ripr/src/analysis/classifier/finding.rs
  • crates/ripr/src/analysis/classify/mod.rs
  • crates/ripr/src/analysis/classify/reach.rs
  • crates/ripr/tests/cross_package_wrapper_reach.rs
  • fixtures/rust-verdict-corpus/expected/rows/lib-quickcheck-roundtrip-involution.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven EffortlessSteven self-assigned this Nov 8, 2026
- 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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::classify and the flag on its final stages.
  • The caller walk: BFS bounds, link ambiguity, production-only links.
  • Consumers of a demoted weakly_exposed finding: 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_method was 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 precommit exit 0.
  • cargo xtask goldens check: 0 drift entries.
  • cargo xtask verdict-corpus check exit 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

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 8, 2026 16:45
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 potential issues.

Devin Review

…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
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

ripr static exposure check

Commit 3c43a3522f0d · run · advisory, static evidence only (not a mutation run).

#ripr agent static-advisory base=ab93e28c665bdc75242bc33f4db3a21854126f04 findings=57 gaps=12 propagation_unknown=3 reachable_unrevealed=2 static_unknown=24 weakly_exposed=28
weakly_exposed|crates/ripr/src/analysis/classify/reach.rs:671|.functions()|missing=No strong discriminator was detected|test=t1|id=probe:crates_ripr_src_analysis_classify_reach.rs:call_deletion:4cd748b4
weakly_exposed|crates/ripr/src/analysis/classify/reach.rs:667|return false|missing=-|test=t1|id=probe:crates_ripr_src_analysis_classify_reach.rs:return_value:d7ef288c
weakly_exposed|crates/ripr/src/analysis/classify/reach.rs:672|.iter()|missing=No strong discriminator was detected|test=t1|id=probe:crates_ripr_src_analysis_classify_reach.rs:call_deletion:4593752f
weakly_exposed|crates/ripr/src/analysis/classify/reach.rs:677|*definitions.entry(function.name.as_str()).or_default() += 1;|missing=No strong discriminator was detected|test=t1|id=probe:crates_ripr_src_analysis_classify_reach.rs:call_deletion:1827f677
weakly_exposed|crates/ripr/src/analysis/classify/reach.rs:684|.tests()|missing=No strong discriminator was detected|test=t1|id=probe:crates_ripr_src_analysis_classify_reach.rs:call_deletion:e0dfb714
weakly_exposed|crates/ripr/src/analysis/classify/reach.rs:685|.iter()|missing=No strong discriminator was detected|test=t1|id=probe:crates_ripr_src_analysis_classify_reach.rs:call_deletion:4593752f.2
t1=crates/ripr/src/analysis/classify/reach.rs:1096 helper_behind_a_tested_public_entry_is_tested_through_a_caller unknown miss=assertion_inert
+6 more gaps not shown; `--format json` lists all
limits=propagation_unknown:3,static_unknown:24,weakly_exposed:18
next=ripr explain --root . --base ab93e28c665bdc75242bc33f4db3a21854126f04 --committed --mode draft --format agent probe:crates_ripr_src_analysis_classify_reach.rs:call_deletion:4cd748b4
verify=refused|outcome=complete_with_findings|findings=57|exposed=0|reason=gaps_remain

Took 70s.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

merge-ready is set, but no qualification run exists for head 62f3707f: it was pushed after the label was applied, or the label event was dropped. Remove and re-apply merge-ready to request it again.

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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

The Rust jobs on 45dc049 fail at compile time with E0004: non-exhaustive patterns: &OutputFormat::MissedTxt in crates/ripr/src/output/format.rs:450. That is main drift from the #13666 and #13720 combination, not this PR's code; #13848 is the open one-line fix. Admit PR Candidate also failed because four review threads were unresolved; they are now resolved, each after its reply. I'll re-apply merge-ready once #13848 lands so the qualification run compiles.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs focused proof failure resolved before upstream.

Test proof

  • Focused HEAD proof failed (exit 101): cargo test --locked --package ripr --test agent_command_journey. This is a current failure, not a red/green witness.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants