Skip to content

test(analysis): pin #7103 nested super import twin resolution (Closes #7103) - #12518

Merged
EffortlessSteven merged 3 commits into
mainfrom
cursor/fix-7103-twin-super-self-fa81
Nov 2, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
cursor/fix-7103-twin-super-self-fa81

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #7103
Acceptance delta (one sentence): Nested 'use super::rows' import twin is pinned by unit test.

Closes #7103

Summary

Claim

Posted on #7103: "Cursor claim: verifying #7103 against main, then fixing if still open."
No competing open PRs or recent agent claims were found.

Main verification

The issue’s core fix—resolve super / self / crate against the test module before building the twin path—is already on main from #7093 (26967b1f5a0):

  • Resolver: crates/ripr/src/analysis/classify/related_tests.rs 6582–6648
  • Issue-body / pricing nested shape: same file 7238–7262 (pricing::tests + super::retail)

What was still missing: an explicit regression for the #8059 inner::rows import repro from the issue comment (named use super::rows, not only the price_quote fixtures).

Intentionally out of scope (called out in the issue comment, not the import-twin resolver):

  • Integration test local fn rows shadowing a glob (import_defeats)
  • Qualified super::rows(...) calls without a binding use (different relation path)

Local gates

Command Result
cargo fmt --check pass
cargo xtask precommit fail — inherited #12466 E0061 at crates/ripr/src/app/test_stub.rs:1160 (not patched per your instructions)

Proof limits

This establishes nested import twin resolution is pinned in unit tests and matches current resolver behavior on main. It does not prove full CI/precommit green or fix the integration-test / qualified-call repros in the issue comment.


Opened on behalf of cloud agent bc-cfbbabfe (bc-cfbbabfe-41c7-58d7-8744-ef435a63fa81).


Devin Review

Governing issue or accepted claim: #7103

Acceptance delta (one sentence): Named use super::rows from a nested test module resolves the nested same-name twin and is covered by unit test plus resolver fix.

Closes #7103

Summary

Claim

Pin #8059/#7103 nested import shape: inner::tests with use super::rows must treat the import as binding inner::rows, not the file-root twin.

Changes

Local gates (head cb67716ae6 after push)

Command Result
cargo test -p ripr --lib a_test_import_of_a_same_name_twin_does_not_reach_the_owner pass
cargo clippy -p ripr --all-targets -- -D warnings pass
cargo xtask precommit pass (after merge with current main)

Proof limits

Establishes nested import twin resolution for the named super::item shape and pins it in unit tests. Does not prove full hosted CI green until checks complete on the new head. Integration-test shadowing / qualified-call repros from the issue comment remain out of scope.

Non-goals

Open in Web Open in Cursor 

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 55 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 8643dec6-7125-4d60-8482-545f30a7042c
Commits

Reviewing files that changed from the base of the PR and between eef8dad and cb67716.

Files selected for processing: 1
  • crates/ripr/src/analysis/classify/related_tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Code Review

This pull request adds a new test case in related_tests.rs to verify that a named import from a nested module correctly resolves and attributes credit to the nested owner. The review feedback suggests simplifying the initialization of the rows_module vector by using the vec! macro directly to reduce boilerplate.

@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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Decision

  • Needs focused proof failure resolved before upstream.

Verification questions

  • Confirm the new test pins named super::rows resolution to the root owner and rejects the nested owner, matching the stated acceptance delta.

Test proof

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

Parked follow-ups

  • The regression exercises only the named import path, leaving the PR's explicitly excluded local-shadow and qualified-call scenarios outside this test's guarantee.

Evidence gaps

  • Executable validation of the new regression is not established because the cargo-test receipt is absent and the ripr sensor failed.
  • Model proof intent was rejected by deterministic validation.
  • The PR's claimed green behavior is not established by an available test receipt: cargo-test remains pending and ripr failed with exit code 2.
  • The intended assertions were not confirmed by completed test evidence in this packet.
  • Runtime proof of the new regression test is currently missing; ripr failed with exit code 2.

Add regression checks for the #8059 inner::rows review repro: a test
module nested under inner must resolve super::rows against inner::rows,
not the file-root twin. Production resolution landed in #7093; this pins
the nested-module shape called out in #7103.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/fix-7103-twin-super-self-fa81 branch from 70f72d7 to bc8fc9a Compare November 2, 2026 12:47

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

Verification questions

  • Confirm the regression asserts that named super::rows in inner::tests credits src/lib.rs::rows and does not credit src/lib.rs::inner::rows.
  • Confirm the test encodes the intended owner distinction: a nested super::rows import should credit the nested owner and not the file-root owner.

Parked follow-ups

  • The PR's exclusions remain intentionally uncovered by this unit regression.
  • The acceptance delta is bounded to named import resolution; local-shadow and qualified-call scenarios remain explicitly outside this regression.
  • The test pins only the named-import scenario and does not establish the explicitly excluded local-shadow or qualified-call behaviors.

Evidence gaps

  • No completed cargo-test receipt establishes that the newly added regression passes.
  • Runtime red/green proof for the new regression is absent.
  • Executable validation of the added regression is unavailable in this packet because the cargo-test receipt is absent and the ripr sensor failed.
  • Model proof intent was rejected by deterministic validation.
  • The new regression is directionally consistent with the stated acceptance delta, but its runtime result is not established in the available packet.

cursoragent and others added 2 commits November 2, 2026 15:12
Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Named imports like `use super::rows` store only the qualifier prefix in
the import path, so `imported` is empty after `super` while `segments`
still resolves to the parent module. Do not fail-open on empty `imported`
when the module path is already resolved (#8059 review).

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@EffortlessSteven
EffortlessSteven merged commit 80678bd into main Nov 2, 2026
92 of 93 checks passed
@EffortlessSteven
EffortlessSteven deleted the cursor/fix-7103-twin-super-self-fa81 branch November 2, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Same-name twin import rule does not resolve super/self against the test module

2 participants