Skip to content

fix(verdicts): scope private macro bindings to their crate; pin inline receivers and sole early returns - #6909

Merged
EffortlessSteven merged 18 commits into
mainfrom
claude/trustworthy-verdicts-7p322x
Oct 7, 2026
Merged

EffortlessSteven merged 18 commits into
mainfrom
claude/trustworthy-verdicts-7p322x

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Before: in humantime, a bench's #[macro_use] extern crate bencher; made every assert_eq! in the library's tests/*.rs "unestablished", even though benches and integration tests are separate crates. In bytesize, assert_eq!(41992187.5, ByteSize::gb(43).as_kib()) was not credited because the receiver was built inline rather than bound with let. A changed early return None; was never pinned, even when it was the only None the function can return.

After: three changes, each fail-closed where ripr cannot tell.

  • Crate-local macro bindings. A private use/glob, #[macro_use] extern crate, #[no_implicit_prelude] or a non-exported macro_rules! only makes assert_eq! ambiguous for tests in its own Cargo target. A target is recognized as src/lib.rs, src/main.rs, src/bin/*.rs, or tests//benches//examples/*.rs/build.rs beside an indexed src/. The following stay workspace-wide:

    • exported or pub bindings, sites in macro arguments, and unparsed files;
    • any file another crate can also compile (an include! fragment or a module below one, or a non-root file under a tests/*.rs root such as a shared tests/common/mod.rs);
    • every file while any include! or #[path] in the workspace is unresolved.

    The dependent-scope (named) path routes a withheld file by root only when its own path is src/lib.rs, src/main.rs or src/bin/*.rs, so named mode keeps matching full mode.

  • Inline receivers. T::ctor(..).method(..) is typed exactly like let r = T::ctor(..); r.method(..), under the same constructor-signature rules.

  • Sole early returns. A changed return None; / return Err(..); is pinned only when all of these hold:

    • it is the body's one source of that value, and every other exit and the tail build one Some(..)/Ok(..);
    • there is no ?, no unbounded macro, and no return inside a closure, an async/const block or a nested fn;
    • the changed value evaluates unconditionally;
    • the pinned value is exactly None (or an Err(..) call).

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 (owner-return pins), updated.
Governing issue or accepted claim: #5352 (refs, not closes: the private-helper reach part, where parse_unit is reached only through parse_duration, is not addressed here).
Acceptance delta (one sentence): crate-local bindings no longer refuse other crates' assertions, and two exact-pin shapes from the agent-as-user run are credited, with no new false exposed.

Candidate Relationships

Candidate branch: claude/trustworthy-verdicts-7p322x, restarted from main after #5359 merged.
Stack parent or prerequisite PR: none (#5359 is merged).

Scope

  • Owner-pin macro-binding scope (analysis/syntax/owner_pin.rs, analysis/classify/owner_pin.rs), receiver typing, and the return-path gate.

Scope Classification

  • One production behavior

Production delta: fewer false refusals and two newly pinned shapes. Every unknown routing case stays workspace-wide.

Evidence/support delta: discriminating unit tests, a real-composition include! test, an end-to-end early-return pin test, named==full dependent-scope parity, and a re-blessed verdict corpus.

Single acceptance criterion: each new credit path has a negative that fails if the path is made permissive.

Non-goals: reach through public entry points to private helpers (#5352 remainder); Cargo [lib]/[[bin]]/[[test]] path relocation (not read; a relocated root is unrecognized and stays workspace-wide); owner-body shadows of vec!/format! (#6900, pre-existing).

Support-tier Impact

  • changes a README, release, docs, CLI, JSON, editor, CI, or package claim

Claim/proof notes: docs/PUBLIC_PROOF.md and metrics/public-proof/verdict-corpus.json refreshed. Changelog: changelog.d/5352-crate-local-macro-scope.md.

Policy Impact

  • none

Proof

At 9eaf47a:

cargo xtask precommit                          # pass
cargo test -p ripr --lib owner_pin             # 46 passed
cargo test -p ripr --lib language::rust        # 186 passed (incl. dependent-scope named==full)
cargo test -p ripr --test owner_pin_execution  # 17 passed
cargo xtask goldens check                      # pass, no fixture changed
cargo xtask verdict-corpus check               # pass, 62/203

Verdict corpus: false verdicts 64 → 62/203, false actionable 58 → 56/106, ideal 81 → 83. Only bytesize-as-kib-div and bytesize-as-mb-div move (weakly_exposed/false_actionable → exposed/ideal), and the inline-receiver change is what flips them. No row moved toward a false verdict.

Discrimination checked by mutation: forcing the Exact("None") gate to always match, dropping the conditional-Err refusal, or dropping the unresolved-include rule each fails its new test.

Review

Separate exact-head reviews (no cargo; reading plus traced repros):

  • Round 1 (8823fd2): BLOCKING from both reviewers, on soundness and on tests/spec.
    • Fail-open shapes: an include! fragment at tests/common.rs was charged to itself as a root, and a shared tests/common/mod.rs routed only to its first owner.
    • Also raised: withheld any-name parity, nested-fn returns, and missing negatives.
    • Fixed in ddc0d99.
  • Round 2 (ddc0d99): BLOCKING. Module children of an ambiguous include fragment composed under the fragment as a root, and the withheld path diverged. Fixed in 17e57d1: any unresolved include! disables routing, and there is a real-composition test.
  • Round 3 (17e57d1): BLOCKING. return Err(if .. { A } else { B }) passed the early gate. Fixed in 9eaf47a, which also hardens unresolvable #[path]. The macro-scope work was found sound.

A review of record on this exact head follows before merge.

Claim Boundary

May claim: private bindings in one Cargo target no longer refuse another target's assertions, inline-constructed receivers pin like bound ones, and a sole early None/Err is pinned. Must not claim: reach through public wrappers to private helpers, or Cargo target relocation awareness.

Rollback

Revert the squash commit. No cache schema change: the new fields are not persisted.

Spec-Test-Code Traceability

  • Spec: docs/specs/RIPR-SPEC-0197-owner-return-pins.md
  • Tests: classify/owner_pin/tests.rs (a_crate_local_binding_in_another_target_does_not_reach_the_test, a_crate_local_site_another_crate_can_compile_stays_workspace_wide, a_module_child_of_an_ambiguous_include_fragment_stays_workspace_wide, a_withheld_crate_roots_private_glob_is_routed_by_root, an_inline_constructor_types_the_receiver_like_a_binding, an_early_return_is_pinned_when_it_is_the_only_source_of_its_value, an_early_err_return_needs_to_be_the_only_err_source, an_early_return_pin_admits_only_the_value_that_return_produces), language/rust/mod.rs (dependent-scope parity), language/rust/dependent_scope.rs
  • Code: analysis/syntax/owner_pin.rs, analysis/classify/owner_pin.rs
  • Golden outputs: fixtures/rust-verdict-corpus/expected/report.*

Static Language Check

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

CI Economics

n/a

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented.

Gates

  • cargo fmt --check
  • cargo xtask precommit

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT


Generated by Claude Code

claude added 9 commits October 6, 2026 13:24
…by root (#5352)

Dependent-scope narrowing withholds unindexed files and folded every
macro-binding site they hold into the workspace-wide set. With crate-local
scoping, a private glob in another crate's src/lib.rs no longer refuses this
crate's tests in the full closure, so the named mode diverged. Withheld files
that are themselves src/lib.rs, src/main.rs or src/bin/*.rs roots now route
their crate-local sites by root; other withheld files stay workspace-wide.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT
…b flip to ideal; 64 -> 62/203)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT
…and sole early-return pins (#5352)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT
…te can compile the file (#5352)

Review found two fail-open shapes: an include! fragment at a recognized
target path (tests/common.rs) was charged to itself as a crate root, and a
shared tests/common/mod.rs composes under its first owner only. target_root
now refuses to name a root for include targets, files with an include edge,
non-root files under a tests/*.rs root, and edge-less files while any
include! is unresolved. Also: withheld crate-root any-name sites still make
local empty-macro names ambiguous (named mode matches full); a return in a
nested fn no longer counts as the owner's; end-to-end and Err-mirror
negatives for the early-return gate.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT
…orkspace-wide (#5352)

Re-review found that a module child of an include fragment left without a
parent (two includers, cfg conflict, edge cap, unindexed target) composed
under the fragment as if it were a crate root, and the withheld path
diverged the same way. target_root now names no root while any include! is
unresolved, nor for a file under a recorded include target. A real
composition test (two binaries including src/lib.rs) refuses the shadowed
assert_eq!, and fails without the fix.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT
…solvable #[path] keeps sites workspace-wide (#5352)

Final review: return Err(if .. { A } else { B }) passed the early-return
gate, so a pin on A credited a changed B it never evaluates. The gate now
applies the tail path's conditional-evaluation refusal. An unresolvable
#[path] (cfg_attr, non-literal) records no module edge, so its target could
look like a root; target_root now names no root while one exists.

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

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 103732b2-4c80-4b78-a606-3b6343779a03
📥 Commits

Reviewing files that changed from the base of the PR and between 87fd7f0 and a0e7bd7.

📒 Files selected for processing (9)
  • crates/ripr/src/analysis/classify/owner_pin.rs
  • crates/ripr/src/analysis/classify/owner_pin/tests.rs
  • crates/ripr/src/analysis/language/rust/mod.rs
  • crates/ripr/src/analysis/syntax/mod.rs
  • crates/ripr/src/analysis/syntax/owner_pin.rs
  • docs/PUBLIC_PROOF.md
  • fixtures/rust-verdict-corpus/expected/report.json
  • fixtures/rust-verdict-corpus/expected/report.md
  • metrics/public-proof/verdict-corpus.json
🔗 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; 3 remain after this review.


Summary by CodeRabbit

  • Bug Fixes
    • Improved recognition of eligible early returns and values constructed inline before method calls, while continuing to reject ambiguous cases.
    • Limited private macro ambiguity to tests in the same recognized crate; uncertain and cross-crate cases remain conservatively handled.
    • Corrected two bytesize division verdicts, reducing incorrect and false-actionable results in the reported corpus.
  • Documentation
    • Updated published verdict summaries and aggregate metrics to reflect the corrected results.

Walkthrough

Owner-pin analysis now scopes crate-local macro bindings to recognized Cargo target crates. It also recognizes supported inline constructor receivers and qualifying early-return pins. The verdict corpus and reports reflect updated classifications for two bytesize cases.

Changes

Owner-pin analysis and verdict updates

Layer / File(s) Summary
Track and route macro-binding scope
crates/ripr/src/analysis/syntax/owner_pin.rs, crates/ripr/src/analysis/classify/owner_pin.rs, crates/ripr/src/analysis/classify/owner_pin/tests.rs, crates/ripr/src/analysis/language/rust/*, docs/specs/RIPR-SPEC-0197-owner-return-pins.md
Macro-binding sites record crate locality. Owner-pin analysis applies crate-local bindings to tests in recognized target roots and retains workspace-wide ambiguity for unresolved or cross-crate cases. Tests and the spec cover these boundaries.
Recognize inline receivers and early returns
crates/ripr/src/analysis/classify/owner_pin.rs, crates/ripr/src/analysis/classify/owner_pin/tests.rs, crates/ripr/src/analysis/syntax/owner_pin.rs, crates/ripr/src/analysis/syntax/mod.rs, docs/specs/RIPR-SPEC-0197-owner-return-pins.md
Owner-pin checks support certain inline constructor receivers and exact-value pins on qualifying early return None or return Err(..) paths. Tests and the spec describe supported and rejected cases.
Update verdict records and reports
fixtures/rust-verdict-corpus/expected/*, metrics/public-proof/verdict-corpus.json, docs/PUBLIC_PROOF.md, changelog.d/5352-crate-local-macro-scope.md
The two bytesize cases change from gap and weak exposure to credited and exposed, with ideal outcomes. Aggregate and upstream metrics, public-proof figures, and the changelog are updated.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant MacroBindingScan
  participant trusted_macro_sites_in
  participant OwnerPinSyntax
  MacroBindingScan->>trusted_macro_sites_in: provide macro-binding sites and target-root context
  trusted_macro_sites_in-->>OwnerPinSyntax: return global, file-scoped, and crate-root bindings
  OwnerPinSyntax->>OwnerPinSyntax: select applicable bindings for a test root
Loading

Merge Risk: ⚪ Minimal · up to a0e7b

No actionable issue remains from this review; the change is mergeable after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to a0e7b

Inline receiver support can misidentify which method an assertion exercises when an inherent constructor shadows a standard trait function. This can produce misleading test-evidence conclusions. The identified exposure concerns analysis results, not increased privileges or deployment authority.

Retained concerns

  • Medium · architecture · inferred: New inline receiver admission extends a pre-existing constructor-name assumption to additional assertion shapes. An inherent T::default() or T::from(..) can return a different, unindexed external type, yet constructor_returns_self accepts the name without inspecting that signature. A same-named method on the returned type can therefore be credited as evidence for T's owner method even though that owner is not called. Indexed competing definitions and foreign imports of T are checked, but those controls do not establish the actual constructor result type.
Security review details

Security Blast Radius

  • inferred — The identified concern requires control over analyzed Rust declarations and assertions. Its demonstrated source-level reach is incorrect owner-evidence admission, which can feed discriminator confirmation. No tenant, credential, data-store or privileged execution consequence was established.

Security Findings and Attack Paths

  • inferred — A repository author can supply an inherent constructor named default or from that returns an external type, followed by an inline call whose method name matches an indexed owner. The new call-shape path can infer the original type incorrectly and supply owner-pin credit. The constructor shortcut predates this PR; admitting inline calls expands its effective exposure. This path was assessed statically, not verified by execution.

Trust Boundaries and Controls

  • observed — Admission retains assertion-context checks, expected-value gates, receiver-owner matching, prelude-method exclusions and trait-scope checks. Named receiver types reject foreign imports, aliases and renames. These controls constrain the concern but do not validate the result signature of inherently defined default or from functions.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 54 functions across 6 files. (4 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 summarizes the three main changes: crate-local macro scoping, inline receiver pinning, and sole early-return pinning. It is specific, though somewhat long.
Description check ✅ Passed The description is detailed and follows the template’s main sections. It explains scope, proof, claim boundaries, rollback, and traceability. Some template fields and gate results are omitted, and the…
Full details: Docstring Coverage

Explanation

Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 54 functions across 6 files. (4 skipped: 4 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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks each crate-root trail,
And keeps far macro scopes in scale.
A constructor meets its method call,
A careful return pins just one value.
Two bytesize rows now tell a new tale.

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

gemini-code-assist[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

claude added 2 commits October 6, 2026 16:17
…n lexical fallback (#5352)

Review of record: target_root rescanned every indexed file per call
(unresolved-#[path] check and package src lookup), and disclosure called it
for every file per memo key, quadratic on large workspaces. TargetRoots now
computes the workspace flags and src directories once per OwnerPinSyntax and
memoizes each file's root; disclosure resolves a site's root only for
crate-local sites. A lexical-fallback file records no module declarations,
so it also disables routing. New test covers the #[path] and fallback rules.

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

Only #[macro_use] extern crate is crate-local. An unresolved
#[macro_use] mod may #[macro_export] its macros, which another crate
reaches through a glob, so its site keeps refusing every test. The
include-fragment test now matches the MacroBinding refusal and has a
non-shadowing control.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT
…word module name in the test (#5352)

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

Copy link
Copy Markdown
Member Author

Review of record — head bdce949e2

Disposition: no blocking findings remain. The PR is ready to mark Ready and merge once required CI is green.

Method: independent reviewer agents, separate from the author, over four rounds. Each round checked the exact head it was given. Bot reviews (CodeRabbit, Gemini) were treated as leads and verified against source.

Round Head Angles Blocking findings Resolution
1 8823fd2 correctness and soundness (wrong credit), tests and regressions, spec and contract crate-local routing could credit across include! fragments and tests/ shared modules; early-return gate accepted ? and non-leaving returns ddc0d99: include target, include edge and tests/ non-root files stay workspace-wide; returns_leave_the_function; ? refuses
2 ddc0d99 soundness of root routing on a real build_index composition an unresolved (ambiguous) include leaves a fragment's module children looking like a crate root 17e57d1: any unresolved include disables routing workspace-wide; real-composition test
3 17e57d1 early-return edge cases; module resolution a conditional Err(..) could be a second source; an unresolvable #[path] records no edge 9eaf47a: conditional if/match sources refuse; an Unknown #[path] disables routing
4 (record) 9eaf47a soundness, performance none blocking; perf: target_root rescanned the index per call 838aecb: TargetRoots computes inputs once and memoizes per file; lexical-fallback files also disable routing
CodeRabbit 838aecb correctness an unresolved #[macro_use] mod was marked crate-local but may #[macro_export] c8a9742: only #[macro_use] extern crate is crate-local; discriminating test case
Final c8a9742 A: memo staleness (one OwnerPinSyntax per RustIndex, verified at language/rust/mod.rs construction sites), decision equivalence, MacroUse placements (inner attr, cfg_attr); B: revert discrimination none two nits fixed in bdce949 (doc comment placement; mod gen → mod generated, since gen is an edition-2024 keyword)

Discrimination: every behavioral fix was confirmed by reverting it locally and watching its test fail. The MacroUse case was re-confirmed with mod generated.

Local evidence on the final code:

  • owner-pin lib tests: 47 passed;
  • language::rust: 186 passed;
  • owner_pin_execution: 17 passed;
  • goldens: clean;
  • verdict corpus: 62/203 false verdicts, down from 64; the two bytesize division cases are fixed;
  • cargo xtask precommit: exit 0.

Declined bot suggestions, all fail-closed under-credit and replied on their threads, are tracked in #6916:

  • nested src/bin/<name>/main.rs;
  • path-qualified inline receivers;
  • an empty tail after an explicit return.

Out of scope here: #6900 (pre-existing vec!/format! shadow). The private-helper reach half of #5352 stays open.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 6, 2026 17:43
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@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 1 potential issue.

Devin Review

…named scope (#5352)

Conflict with #6773 in classify/owner_pin.rs resolved as a union:
ReturnPathGate keeps both Exact (early None) and CloneReceiver; an inline
Constructed receiver under CloneReceiver falls to admits() and refuses.

Devin review on #6909: a withheld crate root with
#[cfg_attr(.., path = ..)] was routed by root in named mode while the full
index sees the Unknown path and disables routing. composes_modules is now
a lexical superset (any path or cfg_attr attribute, spaced # [ ], and
include !), so such a file is admitted and both modes decide alike.

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

Review of the merge: the private-glob parity case would pass vacuously if
e/src/lib.rs were admitted; the cfg_attr case now asserts the file is
admitted.

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

Copy link
Copy Markdown
Member Author

Review of record, addendum: head 87fd7f069

This supersedes the disposition for bdce949e2. No blocking findings.

Changes since bdce949e2:

  • Merged main (34e4cf56c). The conflict with fix(verdicts): drop spurious typed-let probes, credit pinned bitwise returns and Clone fields (#6676, #6675, #6692) #6773 in classify/owner_pin.rs is resolved as a union: ReturnPathGate keeps both Exact and CloneReceiver. A Constructed call under CloneReceiver falls through to admits(), which returns false, so it refuses.
  • Devin finding (red): a withheld crate root with #[cfg_attr(.., path = ..)] was routed by root in named mode, while the full index disables routing. Fixed at admission: composes_modules is now a lexical superset covering any path/cfg_attr attribute, a spaced # [ ], and include !. A named == full parity case was added. Reverting the old body fails it.
  • The parity test now asserts which crate root is withheld or admitted, so the private-glob case cannot pass vacuously.

Independent review on the merge head (1d55ad14d):

  • Angles: conflict-resolution soundness across every ReturnPathGate/CallShape arm; composes_modules superset, panic and complexity; whether the parity test discriminates.
  • Result: no blocking findings; 120 targeted tests pass.
  • Non-blocking parity gaps, filed as rust: named dependent scope can keep crate-root routing on where the full index turns it off #6919. The reviewer could not construct a wrong credit from any of them:
    • a lexical-fallback (unparseable) withheld file;
    • a comment, non-ASCII whitespace or :: in the attribute head;
    • a #[path] pointing at a withheld root.

Local evidence on the merged tree:

  • owner-pin: 58 passed;
  • language::rust: 186 passed;
  • owner_pin_execution: 17 passed;
  • goldens: clean;
  • verdict corpus: 62/203;
  • cargo xtask precommit: exit 0 at 87fd7f069. An earlier run timed out on a lock while another cargo job held it; that was an instrument timeout and the rerun passed.

CodeRabbit reports no actionable comments on 87fd7f069. The Devin thread has been answered.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 6, 2026 18:50
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 6, 2026 18:50
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

claude added 2 commits October 6, 2026 19:34
Conflicts with #5416 resolved by keeping both rules: the disclosure site
prefers a real rebinding (definition or use) and still skips crate-local
sites another recognized root holds; withheld root sites stay a fallback.
Verdict corpus re-blessed on the merged tree: 63 -> 61/203 (bytesize
as_kib/as_mb only); public proof refreshed.

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

Copy link
Copy Markdown
Member Author

Review of record, addendum 2: head a0e7bd726

No blocking findings. The only change since 87fd7f069 is a merge of main (#5416, #6906, #6911). Main had moved into a conflict, so the Ready transition at 18:51 started no required check.

Conflict resolution in classify/owner_pin.rs, against #5416's "a real rebinding outranks a may-rebind site". Both rules are kept:

  • workspace_macro_binding_site returns the first definition or use it finds, else the first other site. It still skips crate-local sites held by another recognized root.
  • The withheld root sites remain the fallback before the test-local site.

The decision path (refusal) is untouched, so admission is unchanged. Only which site the refusal names can differ.

Merge fallout: main's new binding_refusal test fixture had to name crate_local: false.

Corpus: re-blessed on the merged tree, 63 → 61/203 false verdicts. Only bytesize-as-kib-div and bytesize-as-mb-div move (to ideal). public-proof --check is clean.

Local evidence:

  • owner-pin: 62 passed;
  • language::rust: 186 passed;
  • owner_pin_execution: 17 passed;
  • goldens: clean;
  • cargo xtask precommit: exit 0.

Merges clean against current main.


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 reviewer attention before upstream: findings remain.

Confirmed findings

  • Lane scope mismatch: no ArrayBuffer/TypedArray/resizable buffer / active view / detach / transfer surface exists in this Rust-analyzer diff. The PR only touches ripr's owner-pin analysis and verdict corpus. Reporting a lane finding would be a false premise.

Refuted

  • Memoizing target_root in RefCell<BTreeMap<PathBuf, Option>> with concurrent reads from parallel admission paths could panic on already-borrowed RefCell or expose interior-mutability aliasing at the FFI/native seam.; refuted because: TargetRoots::root takes &self and borrows the memo mutably only inside the synchronous function body. The callers in crate_names_for and workspace_macro_binding_site are not held in parallel across the memo write, and no &Path reference escapes the borrow. OnceCell::get_or_init returns &TargetRoots without aliasing the inner RefCell. The analyzer is single-threaded on this path (refusal is called serially per assertion per the existing call sites). No UB seam introduced.
  • A Box::from(slice) or Box::<[u8]>::from(slice) inside the new constructed_receiver / owner_call_shape path could silently truncate on allocation failure and return Some(receiver) for a partial prefix, producing a wrong handoff of receiver text across a worker boundary.; refuted because: The new path uses &str slicing on the already-parsed operand (no heap allocation) and only returns substrings; the existing whole_word_offsets and constructor_call_span are unchanged. No Box::from call exists in the diff, and on allocation failure rust's default aborts rather than returning a partial string. The handoff-of-partial-text risk does not apply.
  • a returned Box::from(slice) / Box::<[u8]>::from(slice) allocation could fail and change the pin answer; refuted because: not raised by the current diff, the seeded thread, or any sibling-path on this lane; rip analysis is text/AST, no allocation-failure mode applies.

Parked follow-ups

  • nested src/bin//main.rs binaries and path-qualified constructor types are out of scope and tracked as follow-ups; not inlined here.
  • withheld_crate_root only recognizes src/lib.rs, src/main.rs, src/bin/*.rs; tests/benches/examples/build.rs crate roots are not routed for withheld files. A withheld tests/common/mod.rs is therefore workspace-wide (correct, fail-closed), but a withheld tests/alpha.rs is also workspace-wide, which can under-credit a crate-private binding in a withheld integration test. Acceptable since withheld means 'not indexed', and under-credit is the safe failure.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Generated-file conflicts only; verdict corpus re-blessed on the merged tree:
63 -> 61/204 (bytesize as_kib/as_mb only); public proof refreshed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uxn5yB6WzCtdDGnyxDJbhT
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 6, 2026 21:54
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 6, 2026 21:54

Copy link
Copy Markdown
Member Author

Review of record, addendum 3: head a1d8bd9c2

No blocking findings. The only change since a0e7bd726 (Ripr Rust Small Result green) is a merge of main that brings in #6786 and other merges. Every conflict was in a generated file. The verdict corpus and public proof were regenerated on the merged tree: 63 → 61/204, and still only bytesize-as-kib-div and bytesize-as-mb-div move.

Local results:

  • owner-pin: 62 passed;
  • language::rust: 186 passed;
  • owner_pin_execution: 17 passed;
  • goldens: clean;
  • public-proof --check: clean;
  • cargo xtask precommit: exit 0.

The head merges cleanly into current main. Toggled Draft→Ready for the required check.


Generated by Claude Code

@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

  • crates/ripr/src/analysis/classify/owner_pin.rs:174 — target_root recognized arm omits nested src/bin/<name>/main.rs; absence is by design (fails closed), but the docs/spec does not list this as a limit while the older Gemini comment did. Mirror the PR's 'Limits' note into RIPR-SPEC-0197 alongside the crate-local paragraph.

Verification questions

  • Confirm memoization correctness for TargetRoots lives behind OnceCell + RefCell<BTreeMap>. Architecturally safe (single-threaded refusal path, no &Path escape), but the lane cannot witness without cargo-test; request as proof_intent.

Refuted

  • A Box::from(slice) or Box::<[u8]>::from(slice) inside the new constructed_receiver / owner_call_shape path could silently drop data on allocation failure.; refuted because: Neither the PR diff, the seeded thread (after EffortlessSteven addendum 1-3 and the github-actions decision), nor any active finding raises this objection. The synthesized path operates on &str references via mask_comments_and_strings / matching_close; no Box::from is present. Constructed as a false premise per lane policy; any future mention must be refuted, not emitted as a finding.
  • Lane scope mismatch: PR diff is Rust owner-pin analysis + verdict corpus updates only; no ArrayBuffer/TypedArray/resizable buffer/active view/transfer surface exists.
  • No JS-backed memory or worker-handoff seam exists in this diff. Targeted check: crates/ripr/src/analysis/classify/owner_pin.rs, crates/ripr/src/analysis/syntax/owner_pin.rs, crates/ripr/src/analysis/language/rust/dependent_scope.rs, crates/ripr/src/analysis/language/rust/mod.rs. No unsafe, no Box::from(slice), no Arc<[u8]>, no ArrayBuffer/TypedArray/SharedArrayBuffer/detach/transfer/postMessage.
  • Empty-tail after a trailing if/else with a hidden None is intentionally refused (under-credit, not wrong credit); author's reply is on the record.
  • A Box::from(slice) or Box::<[u8]>::from(slice) inside constructed_receiver / owner_call_shape could panic on allocation failure or unwrap raw bytes.; refuted because: No Box::from or slice-to-Box conversion exists in the changed paths. owner_call_shape and constructed_receiver operate on &'a str slices with mask_comments_and_strings + matching_close. The analyzer is single-threaded on this path. No allocation-failure UB seam introduced.
  • Box::from(slice) allocation failure does not return None; recoverable fallback claims are dropped.
  • No native/FFI/unsafe surface is touched: this is a pure Rust analyzer diff in crates/ripr. memory-lifetime lane has no real seam to audit.
  • TargetRoots memoization or crate-local macro routing introduces an aliasing/interior-mutability race analogous to a resizable-buffer detach hazard.; refuted because: Lane mismatch: ci-treatry is pure Rust analysis with synchronous RefCell borrows that do not overlap, OnceCell::get_or_init returns &TargetRoots without aliasing the inner cell, and no &Path reference escapes the borrow. The shared PR thread already records refuted by github-actions.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • Mutation-discrimination check is asserted by the PR (forcing Exact(None) gate to always match, dropping conditional-Err refusal, or dropping unresolved-include rule each fails its new test) but not captured as a self-test artifact in this diff.

Copy link
Copy Markdown
Member Author

On the github-actions review's finding about the nested src/bin/<name>/main.rs limit: RIPR-SPEC-0197 already states it at lines 430 and 438. Recognized roots are listed exhaustively (src/lib.rs, src/main.rs, src/bin/*.rs, …), and "any file or test whose root is not recognized stay[s] workspace-wide", so a nested binary root is covered by that rule.

Recognizing nested binaries, and naming them in the spec, is tracked in #6916. No change in this PR. The mutation-discrimination note is recorded in the review of record: each fix was reverted locally and its test failed.


Generated by Claude Code

…rdicts-7p322x

# Conflicts:
#	docs/PUBLIC_PROOF.md
#	fixtures/rust-verdict-corpus/expected/report.json
#	fixtures/rust-verdict-corpus/expected/report.md
#	metrics/public-proof/verdict-corpus.json
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 6, 2026 23:39
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 6, 2026 23:39

Copy link
Copy Markdown
Member Author

Review of record, addendum 4: head fdecb1c53

This head merges main (#6930, #6796). Only generated files conflicted. I took main's copies and regenerated them on the merged tree: the verdict corpus is 57/204 false here against 59/204 on main, and the public proof was refreshed. No source conflicts, so the reviewed code dimensions are unchanged.

Checked on this head: owner_pin + language::rust lib tests (248 passed), owner_pin_execution (17 passed), goldens check, verdict-corpus check, public-proof --check, and cargo xtask precommit (exit 0). Findings: none new.


Generated by Claude Code

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

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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