Skip to content

fix(intl): root Segmenter handle reads via the #7341 wrappers - #8376

Merged
proggeramlug merged 1 commit into
mainfrom
fix/8364-segmenter-raw-handles
Aug 18, 2026
Merged

fix(intl): root Segmenter handle reads via the #7341 wrappers#8376
proggeramlug merged 1 commit into
mainfrom
fix/8364-segmenter-raw-handles

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Summary

#8364 landed from a fork branch with raw_handle_debt failing:

crates/perry-runtime/src/intl/segmenter.rs: 10 bare read(s) in a module with no ceiling

intl/segmenter.rs is new, so it is locked at zero — new code there is expected
to use the #7341 wrappers from the start. This is a spelling change, not a
behaviour change.

The split

  • 9 sites are argument position — the pointer is passed straight into a call
    (some_call(handle.get_raw_const_ptr::<StringHeader>())). Those take
    with_const_ptr. across_const cannot express an argument-position read.

  • 1 site is a genuine post-call reload and takes across_const:

    // ToIntegerOrInfinity may invoke user code, so keep the Segments backing
    // array rooted while coercing the index.
    let (number, segments) = segments_handle.across_const::<ArrayHeader, _>(|| {
        list_relative_plural::to_number_reject_bigint(index)
    });

Getting that one backwards is the actual risk: using across_const where
with_const_ptr belongs hoists a pointer above a collection point while the
gate goes green.

Validation

  • python3 scripts/raw_handle_debt.py978/978, every module inside its ceiling
  • cargo test --release -p perry-runtime --lib — 2590 passed
  • scripts/run_lint_gates.sh — all 50 gates

#8364 added intl/segmenter.rs with ten bare get_raw_const_ptr reads in a
module locked at zero. Nine are argument position and become
with_const_ptr; the tenth is a real post-call reload across
to_number_reject_bigint, whose ToIntegerOrInfinity can invoke user code, and
becomes across_const. Ordering is unchanged and the ratchet returns to
978/978.
@proggeramlug
proggeramlug merged commit f3e1777 into main Aug 18, 2026
19 checks passed
@proggeramlug
proggeramlug deleted the fix/8364-segmenter-raw-handles branch August 18, 2026 16:39
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@proggeramlug, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

Limit details: You’ve used all 8 included reviews currently available under your plan.

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

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1db0b4dc-849d-4938-b6c0-80da308c20e0

📥 Commits

Reviewing files that changed from the base of the PR and between eda71c6 and 8a12bd6.

📒 Files selected for processing (2)
  • changelog.d/8375-segmenter-raw-handles.md
  • crates/perry-runtime/src/intl/segmenter.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.

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.

1 participant