Skip to content

fix(syntax): inner-loop breaks, while true and aliased process exits end the test before assertions (#8983) - #10489

Merged
EffortlessSteven merged 4 commits into
mainfrom
claude/project-thread-4g2cqz-8983c
Oct 26, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
claude/project-thread-4g2cqz-8983c

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Before: an assertion after a root loop whose only break belongs to an inner loop, after while true, or after an aliased/imported std::process::exit|abort was still admitted as running, so the finding could be credited exposed although the assertion can never execute.

After: those shapes diverge at the root statement, so later assertions are not admitted. Live controls (loop with its own break, labeled break targeting the root loop) still admit.

Governing issue or accepted claim: #8983

Acceptance delta: closes the root-statement divergence residuals of #8983 (inner-loop break, while true, use std::process::{exit}/renamed module). Remaining: non-root divergence, loop { if false { break; } }, swallowed macro, #10389/#10445.

How: root_divergence_start in syntax/owner_pin.rs now uses loop_is_left_by_break (ownership by nearest loop or label, stops at closures/async) and StdProcessNames (resolves file use leaves and module binds). dead_context_assertion_admission matrix grows to 456 rows (6 dead + 2 live contexts). Removal control: without the production change, loop_outer_inner_break, while_true, exit_use_leaf, exit_renamed_module fail; exit_qualified and exit_use_process are pins that already held. SPEC-0197 updated. Rust verdict corpus unchanged at 3/676.


Generated by Claude Code

…end the test for assertion admission (#8983)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAoMKstQhYv56x2g6gEHZG
@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 ready for review October 25, 2026 22: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!

@coderabbitai

coderabbitai Bot commented Oct 25, 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 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 182 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: 7cdaca05-dac0-431f-a655-932f39cf5d6d
Commits

Reviewing files that changed from the base of the PR and between 13bdbe7 and dfd20b6.

Files selected for processing: 4
  • changelog.d/8983-divergence-before-assertion.md
  • crates/ripr/src/analysis/syntax/owner_pin.rs
  • crates/ripr/tests/dead_context_assertion_admission.rs
  • docs/specs/RIPR-SPEC-0197-owner-return-pins.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

Copy link
Copy Markdown
Contributor

merge-ready was requested, but this PR conflicts with main (head 1b5f875c), so GitHub creates no test-merge ref and no qualification run can start. Merge main into the branch and resolve the conflicts, then remove and re-apply merge-ready.

Copy link
Copy Markdown
Member Author

Review of record (pre-CI part), head 1b5f875

Angles: correctness of break ownership, over/under-match direction, tests/oracle grip, spec parity, perf.

  • Correctness: unlabeled break is owned by the nearest loop; labeled by the ancestor carrying that label; closure, fn and async boundaries stop the walk. A label belonging to an enclosing scope outside the root loop counts as leaving it, which keeps the assertion admitted (conservative direction). while true is matched on exact condition text, so while TRUE_CONST is not treated as divergent (under-match, safe).
  • Direction: every new divergence only withholds credit. Shadowed or user-defined exit imported via the same leaf is also withheld, which is the accepted over-match.
  • Tests: 456-row matrix (6 dead contexts, 2 live controls, each across macro, subject and family). Removal control: without the production change loop_outer_inner_break, while_true, exit_use_leaf, exit_renamed_module fail; exit_qualified and exit_use_process are pins that already held. owner_pin lib 332 and owner_pin_execution 52 pass; Rust corpus unchanged at 3/676.
  • Spec/docs: SPEC-0197 residuals rewritten (non-root divergence; loop whose only break is behind a never-true condition remain open); changelog fragment present.
  • Perf: one extra use walk per test function with root statements; negligible.
  • Findings: none blocking. Gemini and CodeRabbit are quota-limited, so no external review exists for this head.

Local cargo xtask precommit exit 0. Waiting on Ripr Rust Small Result for the hosted-check half before merging.


Generated by Claude Code

@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 found 3 potential issues.

Devin Review

Copy link
Copy Markdown
Member Author

Review of record, exact head dfd20b6

Angles: correctness, tests/oracle, spec parity, perf/security. Delta since the earlier review at 1b5f875: main merged (SPEC-0197 prose reconciled with #10389; matrix and owner_pin lib tests re-run green), and while (true) is now peeled through ParenExpr (Devin finding, fixed, +24 matrix rows, 480 total). The corpus-case request and the file-wide import over-match were answered on their threads with reasons; all three threads resolved. Findings blocking: none.

Hosted evidence on this head: Ripr Rust Small Result, Rust gates, Admit PR Candidate, wheel, paste (3 OS), source-of-truth, cargo-deny all success; mergeable state clean. Gemini and CodeRabbit are quota-limited, so no external review exists for this head. Local cargo xtask precommit exit 0 on this head's tree.

Squash-merging now.


Generated by Claude Code

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.

2 participants