Skip to content

fix(arm-selection): inline test use super::* no longer demotes binding arms (#6722) - #11950

Merged
EffortlessSteven merged 1 commit into
mainfrom
cursor/super-glob-binding-arm-c263
Oct 31, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
cursor/super-glob-binding-arm-c263

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Inline #[cfg(test)] mod tests { use super::*; } no longer makes may_name_constant treat every bare lowercase match binding as a possible constant import for the whole file. File-root use super::* still demotes binding-arm selection when it may import another module's items.

Swarm / Source Boundary

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

Source-of-truth Links

Governing issue or accepted claim: #6722

Acceptance delta (one sentence): Inline test modules' use super::* no longer withhold binding-arm selection credit for names the owner file does not actually import as constants.

Closes #6722

Scope Classification

  • One production behavior

Production delta:

  • may_name_constant skips super::* in the text import pass and judges file-root use super::* only via parent_glob_outside_this_file, matching declared_enum_variants.

Evidence/support delta:

  • Unit test may_name_constant_ignores_inline_test_module_super_glob with four cases (inline test glob, file-root glob, declared const, non-super module glob).
  • Changelog fragment changelog.d/6722-super-glob-binding-arm.md.

Non-goals:

  • No corpus/golden refresh (wave fence); no changes to activation.rs or match_transfer.rs callers.

Proof

cargo test -p ripr --lib arm_selection::tests::may_name_constant_ignores_inline_test_module_super_glob
cargo test -p ripr --lib arm_selection
cargo xtask precommit

Proof establishes: may_name_constant and binding-arm demotion behavior for the four pinned shapes. It does not establish verdict-corpus movement or end-to-end ripr check on authored fixtures.

Claim Boundary

  • May claim: typical files with inline test use super::* can credit changed binding arms when tests select them.
  • Must not claim: corpus row updates, guard-binding alias credit on shop-tier-gold-arm-unreached without separate verification, or scope-limited import analysis for all glob forms.
Open in Web Open in Cursor 

…g arms

Mirror declared_enum_variants in may_name_constant: skip super::* in the
text import pass and judge file-root globs via parent_glob_outside_this_file.

Closes #6722

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 31, 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 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 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: 40a99298-b1ad-4879-975a-45564b9ad643
Commits

Reviewing files that changed from the base of the PR and between b15c0f0 and d4b30eb.

Files selected for processing: 2
  • changelog.d/6722-super-glob-binding-arm.md
  • crates/ripr/src/analysis/classify/arm_selection.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

REVIEW_READY (head d4b30eb)

Reviewed: may_name_constant in arm_selection.rs — text import pass, parse fallback, parent_glob_outside_this_file reuse; in-file tests and changelog scope.

Invariants: Declared const/static unchanged; file-root use super::* still fail-closed; non-super module globs unchanged; mirrors existing declared_enum_variants treatment.

Proof: cargo test -p ripr --lib arm_selection (53 pass); cargo xtask precommit (pass on candidate).

Residual: No corpus/golden refresh (intentionally fenced); hosted merge-gate pending.

@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 oracle does not directly pin the parse-failure fallback, so a future change from conservative true to false could evade this regression test.
  • Confirm claim scope is limited to the pinned helper shapes; corpus movement and end-to-end ripr check behavior are not established by the diff or available receipts.
  • Confirm the PR does not pin nested inline-module behavior.

Parked follow-ups

  • The oracle covers one inline test module but not nested inline modules or multiple super-glob import sites.
  • No related sibling helper path was changed, so the change is a narrow classification adjustment rather than a broader activation or transfer-flow modification.
  • The changelog accurately limits the change to inline test modules.

Evidence gaps

  • The added test covers inline and file-root super::* plus declared constants and non-super globs, but its execution receipt is absent.
  • Model proof intent was rejected by deterministic validation.
  • Full behavioral proof is not yet available because the ripr sensor failed and the cargo-test receipt is absent.
  • The advertised focused cargo-test proof has no completed receipt.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Merge-ready (head d4b30eb677)

  • REVIEW_READY self-review on exact head
  • Required checks: green (ub-review success; no failures pending)
  • merge-ready label applied for late qualification
  • Do not merge from this agent run

@EffortlessSteven
EffortlessSteven merged commit 7972ca8 into main Oct 31, 2026
49 checks passed
@EffortlessSteven
EffortlessSteven deleted the cursor/super-glob-binding-arm-c263 branch October 31, 2026 23:19
EffortlessSteven added a commit that referenced this pull request Nov 1, 2026
… LSP order, selector tests) (#11995)

* test(cli): selector recovery tests accept the --format json listing hint (#11844)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmqSMojp5pTTpGza5qp

* fix(lsp): canonical-group order follows stable keys, not snapshot order

#11862 replaced the string-keyed group map with a union-find keyed by root
index, so group order silently followed the order findings are listed in.
list_actionable_items_names_gaps_the_actionable_profile_hides (which documents
canonical-group key order) then failed deterministically on main. Order groups
by the lowest pre-merge key among their members (canonical:<gap> / raw:<anchor>).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmqErVsKLf9se9gRSKv

* fix: repair main after #11950 (verdict-corpus expected rows)

Bless the two Rust verdict-corpus rows that moved limited to gap after
inline test use super::* stopped demoting binding arms (PR 11950).

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>

* fix(process-policy): drop the orphaned run_chain.rs import entry (same change as #11975)

#11924 widened the std::process import in run_chain.rs, orphaning the
`use std::process::Command` allowlist row. Carrying #11975's one-line removal
here so a single PR turns both main-red steps green.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJr6YizPnC777wfxAd9ubU

* test(verdict-corpus): label the eq-divert cases from a reachable mutant, not the equivalent edit

The earlier arm or return shadows both compared constants (5 and 6), so
moving 5 to 6 never changes any output: the edit is behavior-preserving and
the recorded mutant (the edit itself) was equivalent, not 'not equivalent'.
Re-derive truth from a mutant of the same line that is observable (constant 2)
and that the single diverted row cannot notice; relabel replays all four cases
with 0 drift and verdict-corpus check scores 0/5 false verdicts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJr6YizPnC777wfxAd9ubU

---------

Co-authored-by: t <a@b>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
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.

RIPR-SPEC-0229: a use super::* in an inline test module turns off binding-arm selection for the whole file

2 participants