Skip to content

fix(rust): closure-adaptor table column requires the call inside its loop - #8560

Merged
EffortlessSteven merged 3 commits into
mainfrom
claude/issue-8012
Oct 18, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
claude/issue-8012

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Closes #8012

argument_sequences (RIPR-SPEC-0265) read a constant-row table column with constant_table_column, so a call after the loop naming the same identifier (e.g. a module const x) was credited with the loop's rows. It now takes the call/assertion site text, requires it to occur exactly once in the test body, and uses constant_table_column_around (as #7972 did for short-circuit). Callers in closure_adaptor.rs, boundary_pairing.rs, activation.rs pass their site.

Proof: new test table_column_is_read_only_for_a_call_inside_its_loop (off-loop refuses, in-loop credits); cargo test -p ripr --lib classify 1407 passed; cargo xtask precommit exit 0. Hosted checks not yet run.

Source-of-truth Links

Governing issue or accepted claim: #8012
Acceptance delta (one sentence): A constant-row table column is credited only to a call that sits inside its own loop, not to a later call naming the same identifier.


Generated by Claude Code

@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 17, 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 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 85 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
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 57b88aab-f788-4482-a9eb-5ecb4340eb48
📥 Commits

Reviewing files that changed from the base of the PR and between ab64ae7 and 0c56bb6.

📒 Files selected for processing: 4
  • changelog.d/8012-closure-adaptor-table-loop.md
  • crates/ripr/src/analysis/classify/activation.rs
  • crates/ripr/src/analysis/classify/boundary_pairing.rs
  • crates/ripr/src/analysis/classify/owner_pin/closure_adaptor.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@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 reviewer attention before upstream: findings remain.

Confirmed findings

  • argument_sequences uses match_indices(site) on test.body without skipping commented-out or string-literal occurrences of the same site text; if a developer comments a call that exactly matches &call.text, the count becomes 2 and the closure silently stops crediting. Unlikely but document or guard via masked-body search.

Refuted

  • constant_table_column_around will still read off-loop rows when site text appears more than once; refuted because: Lane added an explicit uniqueness guard: found.next() returns Some => return None, so duplicate-site bodies bail out instead of reading a table.

@EffortlessSteven EffortlessSteven self-assigned this Oct 17, 2026
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 22:09
@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!

…cate-site negative

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193fZVBGjXWpxEYFUzBGCYt
@EffortlessSteven
EffortlessSteven marked this pull request as draft October 18, 2026 02:15
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 18, 2026 02:15
@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!

@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 reviewer attention before upstream: findings remain.

Confirmed findings

  • Architecture boundary is correct (helper, not caller, owns loop-scope check) and smallest-complete-fix is achieved with one new param. Minor residual: match_indices(site) skips comment/string masking, so commented-out identical site text silently refuses credit rather than masking.

Verification questions

  • Confirm match_indices(site) on test.body does not skip comments or string literals, so a developer who retypes the call text inside a comment inflates the site count and the closure loses its credit silently.
  • Confirm constant_table_column_around is called with at byte offset from match_indices; spec #8012 acceptance is met only if that helper scopes to the enclosing loop body.
  • Confirm argument_sequences uses test.body.match_indices(site) on the raw, unmasked body; commented-out or string-literal occurrences of identical text inflate the count and silently stop crediting.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 18, 2026 02:37
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 18, 2026 02:37
@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!

Copy link
Copy Markdown
Member Author

Ripr Rust Small on GitHub Hosted / Rust gates failed twice on this head (ccbda0f, runs 39089470094 and 39090760991) on one test only: lsp::tests::generic_client_analysis_failure_is_shown_once_and_only_to_generic_clients, which came in with #8642 and is not touched by this PR (diff is closure_adaptor.rs). Same failure is tracked as main-side in #8690. No fix on main yet, so no change is being ported here. The PR's own tests, clippy, check and fmt passed in the same run. Will re-request the run once #8690 is fixed on main.


Generated by Claude Code

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

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 18, 2026 04:53
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 18, 2026 04:53
@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!

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 18, 2026 07:11
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 18, 2026 07:11
@EffortlessSteven
EffortlessSteven merged commit 6fbe7b4 into main Oct 18, 2026
33 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/issue-8012 branch October 18, 2026 07:57
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.

Closure-adaptor run check reads a table column for a call outside its loop

2 participants