Skip to content

fix(classify): a constant owner tail completes its return propagation witness (#6617) - #7687

Merged
EffortlessSteven merged 3 commits into
mainfrom
claude/project-thread-phlb60
Oct 13, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
claude/project-thread-phlb60

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Before: fn answer() -> u32 { 40 + 2 } with assert_eq!(answer(), 42) read weakly_exposed, a false actionable gap. A literal has no semantic tokens, so no propagation witness paired the changed tail with the owner's return sink, and propagation stayed weak.

After: when the owner's whole body is one literal-only expression and that expression is the changed one, a DirectReturn witness completes and the exact pin reads exposed. Every other shape gets no witness (fail closed).

How: constant_tail_witness in classify/propagation_witness.rs is wired into classifier/evidence.rs as a fallback after current_path_witness and the rule-7a adapter. It requires all of the following:

  • a return_value probe on the owner;
  • an owner body that is one tail expression with no statement;
  • a tail built only from literals, unary and binary operators and parentheses;
  • tail text equal to the probe expression, on the probe's line;
  • an owner return sink with that same text on that line.

This is the missing piece for #6617, whose rebased patches land in a follow-up PR.

Swarm / Source Boundary

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

Source-of-truth Links

Spec: RIPR-SPEC-0197, new "Constant owner tails (#6617)" section; rule 7a text amended.
Governing issue or accepted claim: #6617 (blocker named in issue comment 6139068561)
Acceptance delta (one sentence): an exact pin on a constant owner tail reads exposed instead of a false gap.

Candidate Relationships

Candidate branch: claude/project-thread-phlb60. Prerequisite for landing #6617's rebased relation and associated-pin patches.

Scope Classification

  • One production behavior

Production delta:

  • propagation_witness.rs: constant_tail_witness and constant_owner_tail_line.
  • evidence.rs: one fallback in the witness chain.

Evidence/support delta:

  • New tests/constant_tail_propagation.rs with two integration tests.
  • Two new unit tests.
  • Two assertions changed in tests/fallible_owner_return.rs (see Decision).
  • Spec text, traceability and a changelog fragment.

Non-goals:

  • return <literal>; and multi-line tails still abstain.
  • current_path_witness, semantic_tokens and the rule-7a receipt are unchanged.

Decision (recorded per project rules)

The rule-7a refusal controls in tests/fallible_owner_return.rs asserted propagate != yes as a proxy for "a refused receipt grants nothing". Their fixture owner is fn answer() -> u8 { 7 }, which is a constant tail, so its propagation is now established on its own.

The controls now assert that a refused receipt grants no observation credit (discriminate != yes), and they keep classification != exposed. No verdict changes: every refusal case still reads below exposed. The SPEC-0197 rule-7a text and its inverted-oracle row now say "receipt-bound propagation witness". These are static acceptance controls, not runtime-execution controls.

Support-tier Impact

  • none

Policy Impact

  • none

Proof

cargo test -p ripr --test constant_tail_propagation      # 2 passed
cargo test -p ripr --lib constant_                       # incl. 2 new unit tests, pass
cargo test -p ripr --test '*' --no-fail-fast             # all integration suites pass
cargo test -p ripr --lib                                 # 10276 passed; 7 failed (known sandbox root/permission tests)
cargo xtask verdict-corpus check-all                     # no drift; Rust 57/437, oracle 31/34, overclaim 0
cargo xtask check-spec-format / check-traceability / precommit   # pass

Comparing the same crates with and without this change:

  • Moves from weakly_exposed to exposed: exact pins on 40 + 2, 43, -(1 << 3), "ripr", a const fn, an impl method and a single-line fn.
  • Witness now completes but the verdict stays weakly_exposed: a weak > 0 oracle, trait-default and cfg-twin pins of another value, and an un-awaited async fn.

Review of record (pre-publication, head 8f137dd)

An adversarial reviewer agent (correctness and fail-closed soundness) built the candidate and ran 17 crates with and without the change.

  • Blocking findings: none. No case establishes the witness wrongly, and no case over-credits. The allowed nodes only operate on primitive or &str literals, so no user operator impl can run.
  • Non-blocking test findings, both fixed in 6bfde6e:
    • The integration negative control was vacuous, so it was removed; the unit tests cover the statement guard.
    • The unit test's other-owner case passed empty sinks; it now uses real sinks.
  • Missing: external review bots have not run yet.

Claim Boundary

May claim: a changed constant owner tail propagates to the owner's return. Must not claim: any oracle credit, any change to relation or activation, or propagation for any other literal shape.

Rollback

Revert the squash commit.

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK


Generated by Claude Code

… witness (#6617)

A body that is exactly one literal-only expression returns that value, but a
literal has no semantic tokens, so no witness paired it with its sink and an
exact pin read as a false weakly_exposed gap. constant_tail_witness completes a
DirectReturn witness for that exact shape only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK
…ghten constant-tail controls

The rule-7a fixture's owner is the constant tail `7`, whose propagation is now
established on its own (#6617). Refused receipts still grant no observation
credit and no exposed verdict, which is what the controls now check.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK
@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!

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 13, 2026 12:00
@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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

The included review limit has been reached and this organization has disabled usage-based review continuation. Wait for reviews to reset or ask a billing admin to change After included review limits.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f2afb002-60bd-4f26-89d1-423f9ae17e96
📥 Commits

Reviewing files that changed from the base of the PR and between 6bfde6e and 96e44a1.

📒 Files selected for processing (8)
  • fixtures/owner_return_pin_fallible_literal_inverted/expected/CHANGELOG.md
  • fixtures/owner_return_pin_fallible_literal_inverted/expected/check.json
  • fixtures/owner_return_pin_fallible_literal_inverted/expected/human-full.txt
  • fixtures/owner_return_pin_fallible_literal_inverted/expected/human.txt
  • fixtures/owner_return_pin_fallible_literal_message_escape/expected/CHANGELOG.md
  • fixtures/owner_return_pin_fallible_literal_message_escape/expected/check.json
  • fixtures/owner_return_pin_fallible_literal_message_escape/expected/human-full.txt
  • fixtures/owner_return_pin_fallible_literal_message_escape/expected/human.txt

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 7c0c3d40-d4cb-4919-88f8-da751b104d2d
📥 Commits

Reviewing files that changed from the base of the PR and between c861474 and 6bfde6e.

📒 Files selected for processing (8)
  • .ripr/traceability.toml
  • changelog.d/6617-constant-owner-tail-propagation.md
  • crates/ripr/src/analysis/classifier/evidence.rs
  • crates/ripr/src/analysis/classify/mod.rs
  • crates/ripr/src/analysis/classify/propagation_witness.rs
  • crates/ripr/tests/constant_tail_propagation.rs
  • crates/ripr/tests/fallible_owner_return.rs
  • docs/specs/RIPR-SPEC-0197-owner-return-pins.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Summary by CodeRabbit

  • New Features
    • Return-value checks now recognize propagation through a function body made up entirely of literals, arithmetic or unary operators, and parentheses. Matching exact-pin cases can now be classified as exposed instead of showing a false weakly_exposed gap.
  • Behavior
    • This propagation does not strengthen a weak assertion oracle. Bodies containing names, calls, casts, closures, macros, blocks, branches, or preceding statements do not qualify.

Walkthrough

A constant-only function tail can now establish direct-return propagation when its expression and line match the return-value probe and sink. The change adds evidence-gathering integration, unit and integration tests, and updates the specification and changelog.

Changes

Constant Tail Propagation

Layer / File(s) Summary
Define and test the constant-tail witness
docs/specs/RIPR-SPEC-0197-owner-return-pins.md, crates/ripr/src/analysis/classify/propagation_witness.rs, .ripr/traceability.toml
Adds a witness for a statement-free tail composed only of literals, unary or binary operators, and parentheses. It requires matching owner, line, normalized expression text, and return sink. Unit tests cover accepted syntax and rejected syntax or mismatches.
Add the witness to evidence gathering
crates/ripr/src/analysis/classify/mod.rs, crates/ripr/src/analysis/classifier/evidence.rs
Exports constant_tail_witness and tries it after current-path and fallible-literal witness lookups, before returned-ledger lookup.
Verify and document propagation behavior
crates/ripr/tests/constant_tail_propagation.rs, crates/ripr/tests/fallible_owner_return.rs, docs/specs/RIPR-SPEC-0197-owner-return-pins.md, changelog.d/6617-constant-owner-tail-propagation.md, .ripr/traceability.toml
Integration tests cover exact pins and a weak oracle. Refusal tests now check discrimination separately from propagation. The specification and changelog describe the witness conditions and limitations.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Sequence Diagram(s)

sequenceDiagram
  participant Evidence as ClassifiedProbeEvidence::gather
  participant Witness as constant_tail_witness
  participant Owner as FunctionSummary
  participant Sinks as FlowSinkFact
  Evidence->>Witness: pass resolved owner and current flow sinks
  Witness->>Owner: inspect function body and tail line
  Witness->>Sinks: match owner, line, and normalized return text
  Witness-->>Evidence: return direct-return witness or None
Loading
Merge Risk: ⚪ Minimal · up to 6bfde

The change lets exact pins on literal-only function tails read as exposed instead of weakly exposed. It does not strengthen weak oracles. No concrete merge-blocking risk was identified.

Security architecture risk: 🔵 Low · up to 6bfde

The inspected change narrowly accepts evidence for literal-only function tails while preserving owner matching and weak-oracle safeguards. No security concern was established, but the unavailable full PR baseline limits confidence in the overall comparison.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The supported effect of the inspected fallback is on propagation evidence and resulting classification of eligible return-value probes in analyzed source. Its implementation parses supplied owner text and constructs evidence; it does not grant execution, credential or cross-service authority.

Trust Boundaries and Controls

  • observed — Source-derived evidence does not automatically authorize an exposed classification. Direct-witness validation checks digest, schema, owner, probe family, delta, expression and edge completeness. Classification additionally requires affirmative reach, infection and discrimination, so complete constant-tail propagation alone cannot strengthen a weak oracle.

Resilience and Maintainability Implications

  • observed — Refusal tests retain assertions against exposed classification and discrimination credit for ineffective or unbound oracles. Warm-analysis tests assert the same refusal after configuration, lockfile, source-role or oracle mutation, distinguishing receipt authority from independently established constant-tail propagation. These assertions were inspected, not executed.
Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 55.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 5 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main production change: completing return propagation for a constant owner tail.
Description check Passed The description is mostly complete and directly matches the implementation. It documents the behavior, scope, source-of-truth spec, tests, proof results, claim boundary, rollback, and engineering chec…
Full details: Docstring Coverage

Explanation

Docstring coverage is 55.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 5 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

I’m a rabbit; I check each tail,
For literals that match the trail.
A name or call? No witness shown.
A weak oracle keeps its own.
I hop away; the tests are sown.

Comment @coderabbitai help to get the list of available commands.

@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 one verification check before upstream.

Verification questions

  • Confirm red/green: 4 positive cases in exact_pin_on_a_constant_owner_tail_is_exposed plus weak_oracle_on_a_constant_owner_tail_keeps_its_gap toggle the classification; fallible_owner_return refusal controls now check discriminate!=yes so the new tail propagation does not silently flip them green.

Refuted

  • Adding a fourth fallback in the evidence.rs .or_else chain could extend any previously-borrowed value past its lifetime; refuted because: Each or_else branch is invoked on owned Option values produced by prior branches; the new constant_tail_witness only borrows probe, owner, and flow_sinks, all of which are passed by reference from the surrounding context for the whole call. No new aliasing or lifetime extension is introduced.
  • No resizable buffer, ArrayBuffer, TypedArray, Vec/slice resize, or detach/transfer path is touched by this PR; active-view invariants do not apply.
  • constant_tail_witness could mis-bind a sink via a stale length snapshot, exposing an active-view-style bug where the sink's stored line/text no longer reflects the current AST region.; refuted because: The witness joins on (owner.id, kind=ReturnValue, line == probe.location.line, normalized text == probe.expression) and re-derives tail_line from owner.body via constant_owner_tail_line. There is no cached length or capacity; the only 'snapshot' is the immutable FunctionSummary.body String and probe.location.line, both freshly read per call. The unit test constant_tail_witness_binds_owner_line_and_sink explicitly asserts that a probe on a different line, of a different family, or against a different owner yields None. Active-view framing does not apply.
  • A constant owner tail could mis-bind across a worker handoff because literals have no semantic tokens and any GC or detach could move the sink; refuted because: No worker, no detach, no async boundary exists in the changed code path; sink identity is normalized from the same source text as the probe, lookup keys on owner.id/kind/line/text, and bodies are owned &str. Memory crossing is inapplicable to this Rust analyzer surface.
  • constant_tail_witness_binds_owner_line_and_sink positive case is tautological because sinks are derived from the same probe via local_flow_sinks; refuted because: Same test asserts three negative branches (wrong line, wrong family, wrong owner) using distinct probes, so the positive path is not the sole discriminator; the unit test plus four integration cases together cover the witness's truth table.
  • Sibling path: return <literal>; statement form should also complete a DirectReturn witness under the same rule.; refuted because: PR body and SPEC-0197 list return <literal>; and multi-line tails as explicit non-goals; constant_owner_tail_line requires list.statements().next().is_none() and only the tail expression, so statement form fails closed by construction.
  • The new constant_tail_witness duplicates the role of current_path_witness and could over-credit when both succeed.; refuted because: constant_tail_witness requires the body to contain only LITERAL/BIN_EXPR/PREFIX_EXPR/PAREN_EXPR nodes — shapes current_path_witness's semantic-token pairing cannot match. Fail-closed on any non-constant shape and on line/text mismatch, so overlap is empty.

Parked follow-ups

  • Parked follow-ups are tracked in the PR body: return <literal>; statements, multi-line tails, relation/activation changes, and oracle-strength work (#6764/#6670) are explicitly out of scope for this PR.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

#6617)

fn answer() -> u8 { 7 } is a constant owner tail, so both fixtures now
carry a complete return propagation witness. The verdict stays
weakly_exposed because the discriminator is still weak; only the
propagate stage and the weak verdict's confidence move.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 13, 2026 13:07
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 13, 2026 13:07
@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!

@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.

Confirmed findings

  • Lane ub-worker-handoff has no applicable surface in this diff. Logging a no-finding per posture: surface is Rust parser/AST plus golden fixtures; no JS worker, async, GC, detach, or transfer boundary is touched or relevant.

Verification questions

  • Confirm fallible owner return controls now assert discriminate!=yes, but the inverted fixture and message-escape fixture still rely on confidence 0.66→0.92 only; no new dedicated test pins the new refuse-discrimination invariant on a non-constant-tail fallible owner.
  • Confirm constant_owner_tail_line uses SyntaxKind match on LITERAL/BIN_EXPR/PREFIX_EXPR/PAREN_EXPR; no literal-kind validation, so a b"bytes" byte string or c-string literal in tail could be accepted if all literals are permitted by SyntaxKind::LITERAL.
  • Confirm negative integration cases for non-constant-tail shapes (statement/name/call/cast/closure/macro/block/branch) rely on the unit-test matrix in propagation_witness.rs::constant_owner_tail_is_the_whole_literal_only_body, not on a crates/ripr/tests/... integration test.
  • Confirm constant_tail_witness's AST whitelist (LITERAL|BIN_EXPR|PREFIX_EXPR|PAREN_EXPR) plus tail-expr/no-statement guard is encoded in constant_owner_tail_line; sibling shapes (return ;, multi-statement, blocks, branches, macros, closures, casts, method calls, names) are not exercised by an integration test in this PR.

Refuted

  • Refusal controls in fallible_owner_return.rs migrated from propagate!=yes to discriminate!=yes could be vacuous or non-discriminating because the rule-7a owner is fn answer()->u8{7}, a constant tail, so propagate now flips to yes unconditionally and propagate!=yes would silently fail; refuted because: Rule 7a spec text and inverted-oracle row now say 'receipt-bound propagation witness' and explicitly exclude the constant-tail route. discriminate is the observation-credit channel; refusing a receipt must not credit zero observation; the new assertion targets that exact invariant.
  • No sibling helper callers of fallible_literal_witness or current_path_witness exist beyond the evidence fallback chain, so adding constant_tail_witness implies it is the only new witness caller.; refuted because: Substantive search across classify/propagation_witness.rs and classifier/evidence.rs finds constant_tail_witness referenced only at the single new .or_else site; callers of current_path_witness and fallible_literal_witness remain inside the same chain.
  • Weak-oracle assertion only exercises assert!(answer() > 0); other weak-oracle shapes (!= 0, < 100, > 41) could keep their gap differently or even flip classification.; refuted because: The propagation witness is oracle-agnostic; classification is driven by the ripr pipeline whose oracle-strength logic is unchanged per the PR's non-goals. The single > 0 case is sufficient to prove the claim that propagation does not silently elevate a weak oracle to exposed. Additional shapes are low marginal value and the spec explicitly excludes general oracle-strength work (#6764/#6670).
  • A constant owner tail could be weaponized to upgrade a refusal-shaped witness into an exposed verdict, leaking silent state via the JSON output (info disclosure / overclaim).; refuted because: Verdict comes from the existing classifier, not from the propagation witness in isolation. The unit + integration tests assert the verdict stays non-exposed when the discriminator is weak. The witness only flips propagate from weak to yes; discriminate remains weak and overall classification remains weakly_exposed. PR body and spec text explicitly state: 'The witness settles propagation only; relation, activation and oracle strength keep their own rules.'.
  • constant_tail_witness could mis-bind a sink via a stale length snapshot or stale source text, exposing an active-view-style bug where the sink's stored line/text no longer reflects the current AST region; refuted because: No resizable buffer, Vec/slice resize, or detach/transfer path is touched. The sink lookup uses FlowSinkFact as provided by the surrounding context for the whole call; line and text are read directly from the sink struct, not snapshotted. The witness requires tail_line==probe.location.line and identity matches both probe and sink text, so a stale sink whose text no longer matches the tail's normalized text is filtered out by the equality check.

Evidence gaps

  • Two blocked checks (miri, cargo-allow) remain unrun; ripr ran and failed with exit code 2, so the propagation witness route is unverified at runtime in this packet.
  • Model proof intent was rejected by deterministic validation.

Copy link
Copy Markdown
Member Author

Review of record

Head: 96e44a1d43d9877e54cb3970add9093d37d588a8

Angles

  • Correctness and edge cases (independent agent). Before/after runs across 17 crates found no wrong witness and no over-credit. The witness accepts only a statement-free tail made of LITERAL, BIN_EXPR, PREFIX_EXPR and PAREN_EXPR nodes, bound to the owner, line and sink text. Names, calls, casts, closures, macros, blocks, branches, return lit; and multi-line tails all abstain, which fails closed. Byte-string and C-string literals are constants, so accepting them is correct.
  • Tests and regressions. Unit tests pin the shape whitelist and the owner/line/family/sink binding with negatives. Integration tests cover four exact-pin positives (exposed) and a weak oracle (stays weakly_exposed). The full --test '*' suite passes.
  • Spec and contract. SPEC-0197 has a new "Constant owner tails" section. Rule-7a text now says "receipt-bound propagation witness". Traceability is updated.
  • Corpus and goldens. The verdict corpus does not move (Rust 57/437, oracle 31/34, overclaim 0/34).
    • Two rule-7a goldens (owner_return_pin_fallible_literal_inverted, _message_escape) were re-blessed in 96e44a1.
    • Their owner fn answer() -> u8 { 7 } is a constant tail, so propagate moves from weak to yes and the weak verdict's confidence from 0.66 to 0.92.
    • The verdict stays weakly_exposed because the discriminator is still weak.

Findings and resolutions

  • Hosted goldens drift on 6bfde6e. Intended. Re-blessed with a SPEC-0197 reason. goldens, fixtures, verdict-corpus check-all and precommit pass locally.
  • Rule-7a refusal controls in fallible_owner_return.rs. They asserted propagate != yes, which no longer holds for a constant-tail owner. They now assert discriminate != yes, which is the observation-credit invariant rule 7a guards. The classification != exposed assertions are unchanged.
  • The Verification Questions bot asked for red/green. On main, fn answer() -> u32 { 40 + 2 } with assert_eq!(answer(), 42) reads weakly_exposed ("No complete owner-bound propagation witness"). With this change it reads exposed.
  • External bots. CodeRabbit and Devin returned no actionable findings. Gemini was over quota, so its review is missing.

Checks: Rust gates passed on this head.

Nothing blocking.


Generated by Claude Code

@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.

reviewed_head_sha: 96e44a1
integration_basis: 118cdd5
claim_boundary: A constant owner tail completes its return propagation witness (#6617)
changed_surfaces_and_semantic_owners_inspected:

  • crates/ripr/src/analysis/classify/propagation_witness.rs (ripr/analysis)
  • crates/ripr/src/analysis/classifier/evidence.rs (ripr/analysis)
  • crates/ripr/tests/constant_tail_propagation.rs (integration tests)
  • crates/ripr/tests/fallible_owner_return.rs (regression assertions)
  • docs/specs/RIPR-SPEC-0197-owner-return-pins.md (spec and traceability)
  • fixtures (re-blessed rule-7a fixtures)
    blocking_findings: none
    non_blocking_suggestions: none
    refuted_or_stale_findings: none
    proof_and_ci_observed:
  • Ripr Rust Small Result: pass (commit 96e44a1)
  • Ripr Rust Small on GitHub Hosted / Rust gates: pass (59m 16s)
  • windows-advisory-subset: pass
  • Rust-only feature lane: pass
  • build and inspect Linux x64 wheel: pass
  • All 21 checks passed or skipped cleanly
    proof_or_review_missing: none
    affected_currentness_dimensions: none
    residual_assumptions_and_non_claims: settles propagation only; relation, activation and oracle strength keep their own rules.
    disposition: REVIEW_READY

@EffortlessSteven
EffortlessSteven merged commit e390d3a into main Oct 13, 2026
35 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-phlb60 branch October 13, 2026 20:50
EffortlessSteven added a commit that referenced this pull request Oct 14, 2026
…ed type (#6617) (#7738)

* analysis(related_tests): admit inherent type-path calls on a package-narrowed index (#6617)

Relation half only; NOT shippable alone: on authored-old-deps it flips
no_static_path (limited) to reachable_unrevealed (gap) because of
run-wide trusted-macro ambiguity and the missing associated-fn owner pin.

* feat(owner_pin): associated-function T::name() owner-return pin (#6617)

An inherent associated function `Gauge::reading()` can now be pinned by
`assert_eq!(Gauge::reading(), 42)` in a test that imports `Gauge` at file
level from the owner's crate. With the constant-owner-tail propagation
witness (#7687), `old-deps-type-path-direct-import` moves limited ->
credited, its ideal verdict; no other corpus row moves.

- PinCall::Associated { type_name } in pin_call for (Inherent, no self):
  T one CamelCase identifier declared exactly once (struct/enum/union),
  no mod/trait/type of that name in the index.
- CallShape::Associated(T) for `T::name(..)`; disjoint from the #6974
  module-path CallShape::Path (path_call_prefix rejects CamelCase).
- other_definition_competes takes CallKind plus main's #6544 per-test
  identity; for Associated, free fns do not compete (RIPR-SPEC-0172),
  every other fn of the name does. The identity applies to bare calls only.
- Test side reuses the RIPR-SPEC-0197 manifest authority
  (krate_root_names_owner_crate / MemberCrates::import_names); direct
  file-level `use <krate>::...::T;` only; alias, glob, brace, other roots
  refuse; library_may_export_other(T) refuses foreign re-exports.
- Whole-value field pins stay refused for associated owners.

Decision: bare_call_names_only_a_module_level_function's B2 intent (a
bare `decode(..)` never pins the associated `Codec::decode`) is asserted
directly: the associated pin is established and admits nothing for the
bare call; the free-function half is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK

* fix(owner_pin): an associated-function pin admits only `use <krate>::T;`

A longer import path was checked only at its root and last segment, so
`use meter::fs::Gauge;` through `pub use fastscore as fs;` could credit a
test that calls another crate's `Gauge::reading()`. Refuse any middle
segment; the corpus case and the spec example both use the direct form.

Also: the refusal matrix now asserts an established pin with no
admitted assertion (it accepted a pin that never established), Draft
admission indexes a `trait`, `mod` or `type` of the owner type's name
so Draft matches Full, and the dependent-scope doc names the #6617
type-path exception.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK

* test(owner_pin): use ? in the manifest pin helper (clippy::question_mark)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK

* docs(changelog): longer import paths refuse the associated pin (#6617)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK

* fix(owner_pin): a cfg-gated associated owner refuses its pin (#7724)

With the cfg off, `T::name()` can reach an external trait default the
index never sees, so the associated branch now applies the bare call's
#7082 check: a cfg on the owner fn, its `impl`, an enclosing module or
its file refuses. SPEC-0172 now names the #6617 narrowed-index exception
in its precondition and implementation mapping.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DhTE9QaZFAYeqtp9XRAGK

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants