Skip to content

fix(classify): bind uniqueness-stop entry to the hop function (#7268) - #7286

Merged
EffortlessSteven merged 1 commit into
mainfrom
cursor/helper-transfer-uniqueness-stop-7c3a
Oct 10, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
cursor/helper-transfer-uniqueness-stop-7c3a

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Closes #7268.

Summary

The uniqueness-stop branch in ambiguous_helper_entry_called_by_tests used tests_call_name, a name-level check over every workspace function. When A::parse was the resolved hop that calls unique op and B::parse made the name non-unique, a test that called only B::parse(...) credited the hop and rewrote the owner's no_static_path to static_unknown.

This binds that stop-name check to the hop's FunctionSummary the same way extras wrappers already use tests_call_function. Bare unresolved parse( still enters. A call that targets the hop still enters. Relation stays refused.

Swarm / Source Boundary

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

Source-of-truth Links

Proposal: n/a (follow-up finding)
Spec: RIPR-SPEC-0159
ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #7268 (depends on #7263 / #7080; builds on #7270 / #7279)
Acceptance delta: a type-qualified sibling of the uniqueness-stop hop does not rewrite the owner's no_static_path.

Candidate Relationships

Candidate branch: cursor/helper-transfer-uniqueness-stop-7c3a
Stack parent or prerequisite PR: #7263 (landed), #7279 (landed)
Proposed replacement of PR: none
Acceptance retained from a replaced candidate: none

Scope

One classification honesty seam: uniqueness-stop entry identity for a resolved hop.

Scope Classification

  • One production behavior

Production delta:

  • ambiguous_helper_entry_called_by_tests binds the uniqueness-stop name to the hop FunctionSummary when resolution recorded that hop, using tests_call_function plus a Free-only unresolved-name fallback.

Evidence/support delta:

  • Authority and classify pins for B::parse (stay no_static_path), bare parse( (stay static_unknown), and A::parse (stay static_unknown).
  • SPEC-0159, LEARNINGS, traceability, changelog fragment.

Single acceptance criterion:

  • A::parse hops to unique op, twin B::parse exists, tests call only B::parse(...) → owner stays no_static_path.

Non-goals:

Support-tier Impact

  • none

Policy Impact

  • none

Proof

cargo test -p ripr --lib -- uniqueness_stop given_helper_chain_refused -- --test-threads=1

Result: 25 passed, including the new #7268 pins and the retained #7080 / #7270 controls.

What the proof establishes:

  • B::parse does not enter the uniqueness rewrite.
  • Bare parse( on an Impl-qualified hop still enters.
  • A::parse still enters; HelperOwnerCall stays absent.
  • Unique wrapper, receiver, raw-identifier, extras-sibling, and foreign-path controls still hold.

What the proof does not establish:

  • Runtime kill/survive or adequacy of static_unknown.
  • That the helper-chain relation is established.
  • Hosted exact-head CI (not yet run on this published draft).

Claim Boundary

May claim: a type-qualified call to a sibling of the uniqueness-stop hop does not rewrite the owner's no_static_path.

Must not claim: runtime kill/survive; that static_unknown is adequate; that the helper-chain relation is established; #7021; #7272.

Rollback

Revert this commit. Classification of uniqueness-stop hops returns to name-level tests_call_name.

Spec-Test-Code Traceability

Static Language Check

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

CI Economics

n/a — ordinary analyzer honesty PR; no workflow or lane change.

Engineering Check

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

Gates

Focused local proof above. cargo xtask precommit to follow on this published draft. Hosted merge-gate matrix is the required completeness claim.

Open in Web Open in Cursor 

A type-qualified sibling of the uniqueness-stop hop no longer rewrites
the owner's no_static_path. Bare parse( and a call that targets the hop
still enter; relation stays refused.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@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 Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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: 3d2f0d2d-2c77-4e49-abff-850d3de534a0


📥 Commits

Reviewing files that changed from the base of the PR and between 7aafeee and 725adc6.



📒 Files selected for processing (6)
  • .ripr/traceability.toml
  • changelog.d/7268-uniqueness-stop-hop-sibling.md
  • crates/ripr/src/analysis/classifier.rs
  • crates/ripr/src/analysis/classify/helper_transfer.rs
  • docs/LEARNINGS.md
  • docs/specs/RIPR-SPEC-0159-bounded-helper-transfer.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; 2 remain after this review.




Summary by CodeRabbit

  • Bug Fixes
    • Corrected helper-chain analysis so calling a same-named function on a different type no longer counts as calling the specific function that triggered a uniqueness stop. Calls to that function and unresolved bare-name calls continue to count.
  • Documentation
    • Clarified how qualified, bare-name, and receiver calls are treated in helper-chain analysis.
  • Tests
    • Added coverage for these call patterns, including refused helper chains.

Walkthrough

The change updates uniqueness-stop helper-chain entry detection to distinguish a test call to the resolved hop from a call to a qualified sibling. Tests verify the classifier outcomes for sibling, bare, and hop calls. The specification, learning, and changelog record the distinction.

Changes

Uniqueness-stop hop entry

Layer / File(s) Summary
Bind stop-name entry to the hop
crates/ripr/src/analysis/classify/helper_transfer.rs, .ripr/traceability.toml
Entry detection matches calls to the resolved hop or unresolved bare-name calls. Regression tests cover a qualified sibling, a bare call, and a call to the hop.
Verify classifier outcomes
crates/ripr/src/analysis/classifier.rs, .ripr/traceability.toml, docs/specs/RIPR-SPEC-0159-bounded-helper-transfer.md, docs/LEARNINGS.md, changelog.d/7268-uniqueness-stop-hop-sibling.md
Classifier tests verify that a sibling call retains NoStaticPath, while bare and hop calls yield StaticUnknown. The specification, learning, and changelog describe this distinction.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 725ad

No merge-blocking issue is identified; the change is ready for normal validation.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 76.47% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 2 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 The PR addresses the coding requirements in #7268. ambiguous_helper_entry_called_by_tests binds a resolved uniqueness-stop hop to its FunctionSummary, while retaining the Free-only fallback for un…
Out of Scope Changes check Passed The changes stay within #7268. The production change fixes uniqueness-stop entry identity. The added tests, SPEC-0159 updates, learning entry, traceability entry, and changelog document and verify tha…
Title check Passed The title clearly and concisely describes the main change: binding uniqueness-stop entry checks to the hop function.
Description check Passed The description is complete and aligned with the repository template. It documents scope, source links, acceptance criteria, proof results, claim boundaries, rollback, traceability, and known CI limit…

Full details: Docstring Coverage

Explanation

Docstring coverage is 76.47% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 2 files. (4 skipped: 4 unsupported.)


  • Fix all pre-merge checks with AI
✨ 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

A rabbit checks each parse by name,
The hop and sibling are not the same.
Bare calls still enter through the gate,
The tests confirm each call’s state.
I nibble clover, pleased with the change.

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

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 10, 2026 20:51

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

Author self-review (pre-publication)

GitHub cannot request changes from the author; this is a COMMENT disposition, not approval.

reviewed_head_sha: 725adc6d57acf7983f1389946e2e2881d0c453f4
integration_basis: origin/main 7aafeee19229d0b1243e7704ced8135d80d2c053
claim_boundary: a type-qualified sibling of the uniqueness-stop hop does not rewrite the owner's no_static_path. Must not claim runtime kill/survive, that static_unknown is adequate, that HelperOwnerCall is established, #7021, or #7272.
changed_surfaces_and_semantic_owners_inspected:
- analysis/classify/helper_transfer.rs::ambiguous_helper_entry_called_by_tests (authority)
- analysis/classifier.rs::withhold_helper_uniqueness_as_unknown (consumer; class rewrite only)
- RIPR-SPEC-0159, LEARNINGS #7080 entry, traceability, changelog fragment
blocking_findings: none on source/oracle for this head
non_blocking_suggestions: none in-claim
refuted_or_stale_findings: none
proof_and_ci_observed:
- intended red: B::parse credited Some("parse") / StaticUnknown before the bind
- cargo test -p ripr --lib -- uniqueness_stop given_helper_chain_refused: 25 passed (#7268 pins + #7080/#7270/extras/wrapper)
- cargo xtask precommit: pass (head 725adc6d57)
- precommit-v2: cargo clippy -p ripr --all-targets and -p xtask --all-targets: pass
proof_or_review_missing: hosted exact-head required checks and artifacts (not yet observed on this draft-to-ready cycle)
affected_currentness_dimensions: production implementation, test stimulus, test oracle, public claim (spec/learnings/changelog), generated relationships (traceability)
residual_assumptions_and_non_claims:
- Unknown hop impl_context still fail-opens TypePath via tests_call_function; the claim requires qualification that establishes a specific function (Impl { A } vs Impl { B }).
- Empty-hop uniqueness stop (owner name itself non-unique) still uses tests_call_name; out of #7268 acceptance.
- Relation stays refused (test_call_is_shadowed / not a free-function site). Not #7272 reach rewrite.
disposition: REVIEW_INCOMPLETE

Lanes

  • Authority: stop-name bind lives in helper_transfer; extras wrappers already used tests_call_function. No parallel validator. Did not reuse test_call_is_shadowed.
  • Oracle: sibling pin fails on the old tests_call_name path; Free fallback is pinned by Impl-hop + bare parse(; hop call A::parse stays static_unknown; unique wrapper / receiver / r# / extras sibling retained.
  • Rendered behavior: classification class + missing text + HelperOwnerCall absence. No JSON/schema/output-contract change.
  • Contract parity: SPEC-0159 and LEARNINGS updated; no honesty corpus.json (fenced).
  • Platform/package/security: not engaged.
  • Exact-head CI: missing until Ready-triggered hosted jobs finish.

Merge convergence waits on published-head review after required checks.

@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

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T20:53:38.684982Z 725adc6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 725adc6d57

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/ripr/src/analysis/classifier.rs Resolved

@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

  • No native/unsafe seam introduced by this PR. All borrow lifetimes on uniqueness_stop_hop/tests_call_function are bounded to the boolean check and terminate before the Option<&'a str> return. Lane has no actionable memory-lifetime finding.

Verification questions

  • Confirm sister branches in related_tests/activation/owner_pin/reveal unchanged; PR non-goals scope to a single seam. Adjacent systems not enumerated exhaustively.

Refuted

  • Corpus.json gap (Codex P1): the confirmed false-promotion must be in fixtures/evidence-promotion-honesty-corpus/corpus.json, validated with cargo xtask check-evidence-promotion-honesty, per AGENTS.md L247-L250.; refuted because: PR body non-goals fence honesty corpus.json; AGENTS.md corpus rule targets golden-promotion surfaces (re-blessable exposure evidence), not a FunctionSummary-constructed index whose discriminator is uniqueness_qualified_hop_index / uniqueness_stop_does_not_credit_qualified_sibling_of_the_hop. Author reply on the seeded thread documents this; #7263 extras-wrapper sibling landed without a corpus row on the same fence. Not a test-oracle weakness.
  • The hop bind silently over-credits B::parse by checking tests_call_function against the hop FunctionSummary.; refuted because: uniqueness_stop_hop returns the hop whose caller.name matches stop_name. With distinct Impl contexts (A vs B), tests_call_function for the hop only matches tests whose call resolves to A::parse. B::parse(...) does not resolve to the A-typed hop summary; pinned by uniqueness_qualified_hop_index test. Bare parse( falls through to tests_call_unresolved_name which only matches NamedEntryKind::Free; pinned.
  • This Rust analyzer change could expose UB via a JS worker handoff, transferable detach, SharedArrayBuffer race, or postMessage structured-clone aliasing.; refuted because: Change is synchronous Rust inside ripr's analyzer; no JS runtime, no wasm-bindgen, no napi, no worker boundary, no transferable, no SharedArrayBuffer, no postMessage, no structuredClone, no Atomics. FunctionSummary -> ExposureClass flow has no spawn/detach lifecycle and no shared mutable state across threads.
  • The hop bind could extend the lifetime of tests_call_function's borrow of RustIndex past the function return and dangle the returned &str from uniqueness_refusal_callee.; refuted because: tests_call_function / tests_call_unresolved_name / tests_call_matching take &RustIndex and return bool by value; the temporary borrow ends at end of expression. The returned Option<&'a str> is taken from chain.stop_name which is owned by chain (&'a HelperChain); no aliasing into index data is captured in the returned reference.
  • Active-view / resize / detach / ArrayBuffer hazards do not apply to this Rust classifier diff; no JS active-view surface is touched.
  • Binding the uniqueness-stop name to hop.caller via FunctionSummary lookups could enable a type-confusion / OOB if the hop list is built from untrusted input; refuted because: Input is the local RustIndex built by ripr's own parser from crate sources; uniqueness_stop_hop only compares String fields (hop.caller.name vs stop_name) and reuses existing equality-tested helpers. No indexing into raw slices, no unsafe, no allocations of attacker-controlled length.
  • tests-only proof insufficient; hosted exact-head CI is missing on this published draft.; refuted because: PR body §Proof explicitly lists what the local 25-test command does and does not establish; hosted gate matrix is the required completeness claim and is a human/CI responsibility outside the lane boundary. Claim boundary already self-declares hosted CI is not yet run.
  • FunctionSummary reference returned by uniqueness_stop_hop could outlive a re-built index (stale-snapshot analogue); refuted because: &'a FunctionSummary is borrowed from chain: &'a HelperChain; both lifetimes are tied to the same call scope of ambiguous_helper_entry_called_by_tests. tests_call_function/tests_call_unresolved_name/tests_call_name all take &RustIndex fresh; no clone of the FunctionSummary escapes the call. No active-view analogue materializes.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • cargo-test receipt is scheduled-late; from a memory-lifetime angle nothing blocks safe reporting since no unsafe/native code is added.

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.

finding: uniqueness-stop tests_call_name can credit a qualified sibling of the hop

2 participants