Skip to content

fix(analysis): isolate module import aliases by scope - #3550

Merged
EffortlessSteven merged 2 commits into
mainfrom
codex/module-alias-boundary
Aug 29, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
codex/module-alias-boundary

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #3544. Module import aliases now carry nested-module line ranges and are not resolved inside child modules that did not import them. Existing nearest-binding, ambiguity, block, and mid-line close behavior remains unchanged; nested modules with their own alias retain their own target.

Proof

  • cargo test --locked -p ripr --lib analysis::test_grip_evidence::tests — 249 passed.
  • cargo clippy --locked -p ripr --lib -- -D warnings — pass.
  • cargo fmt --check — pass.
  • git diff --check — pass.

Claim boundary

This repairs static module-alias scope attribution only. It does not add general Rust name resolution, cross-crate reachability, macro expansion, or release readiness.

@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 Aug 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 37 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9f205efe-18bb-49c7-86fc-5a310d531389

📥 Commits

Reviewing files that changed from the base of the PR and between c39f597 and f3c5085.

📒 Files selected for processing (2)
  • crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs
  • crates/ripr/src/analysis/test_grip_evidence/tests.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 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-08-29T02:29:58.696679Z a87b83a Manual request
ℹ️ 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.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

@codex review

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Exact-head substantive review for a87b83a5a: module import bindings now exclude nested-module ranges derived from the existing lexical scan, while nested bindings remain nearest and same-scope ambiguity and partial-line closure still fail closed. The related evidence suite passes 249/249 on Windows; locked ripr-library Clippy, formatting, and diff checks pass. No defect found in this bounded seam. This establishes module-alias scope attribution only; it does not establish general Rust name resolution, release readiness, or publication authority.

@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: a87b83a5a7

ℹ️ 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".

… review)

A one-liner `mod nested { call(); }` records the parent module depth
before its opening brace, so the depth-range nested check missed the
line and module_path_at resolved the parent alias for a call that Rust
would reject without an explicit child import. The scanner now records
every module-opening line, and the import binding marks those lines
nested so inline resolution fails closed instead of strengthening
exposure with wrong-owner evidence.

Regression: the inline one-liner case resolves None on the opening line
and the parent alias after it; with the open-line recording disabled the
new assertion fails (mutation-checked).
@EffortlessSteven
EffortlessSteven merged commit e0be263 into main Aug 29, 2026
23 checks passed
@EffortlessSteven
EffortlessSteven deleted the codex/module-alias-boundary branch August 29, 2026 05:21
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.

fix(analysis): stop module import aliases crossing a module boundary

1 participant