Repository navigation
test(analysis): pin #7103 nested super import twin resolution (Closes #7103) - #12518
Conversation
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
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. View limit details
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Decision
- Needs focused proof failure resolved before upstream.
Verification questions
- Confirm the new test pins named
super::rowsresolution 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>
70f72d7 to
bc8fc9a
Compare
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the regression asserts that named
super::rowsininner::testscreditssrc/lib.rs::rowsand does not creditsrc/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.
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>
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/crateagainst the test module before building the twin path—is already onmainfrom #7093 (26967b1f5a0):crates/ripr/src/analysis/classify/related_tests.rs6582–6648pricing::tests+super::retail)What was still missing: an explicit regression for the #8059
inner::rowsimport repro from the issue comment (nameduse super::rows, not only theprice_quotefixtures).Intentionally out of scope (called out in the issue comment, not the import-twin resolver):
fn rowsshadowing a glob (import_defeats)super::rows(...)calls without a bindinguse(different relation path)Local gates
cargo fmt --checkcargo xtask precommit#12466E0061 atcrates/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).
Governing issue or accepted claim: #7103
Acceptance delta (one sentence): Named
use super::rowsfrom 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/
#7103nested import shape:inner::testswithuse super::rowsmust treat the import as bindinginner::rows, not the file-root twin.Changes
a_test_import_of_a_same_name_twin_does_not_reach_the_ownerfor therowsrepro.test_imports_same_name_twinno longer fail-opens when a named import stores only the qualifier prefix (super) andimportedis empty after resolution whilesegmentsalready names the parent module (Same-name twin import rule does not resolve super/self against the test module #7103 / fix(field-observation): a test pinning one element of a returned array observes that element's field (#7858) #8059).Local gates (head
cb67716ae6after push)cargo test -p ripr --lib a_test_import_of_a_same_name_twin_does_not_reach_the_ownercargo clippy -p ripr --all-targets -- -D warningscargo xtask precommitmain)Proof limits
Establishes nested import twin resolution for the named
super::itemshape 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
app/test_stub.rsE0061 carry (inherited; fixed on mergedmain).owner_return_pin_*golden re-bless (fix(xtask): prepare serde_json for owner_return_pin_json golden checks #12605 VM drift).