Skip to content

test(runtime): let the dispatch-IC generation retry actually fire (#7365) - #7822

Merged
proggeramlug merged 1 commit into
mainfrom
fix/7365-dispatch-ic-retry-can-fire
Aug 11, 2026
Merged

test(runtime): let the dispatch-IC generation retry actually fire (#7365)#7822
proggeramlug merged 1 commit into
mainfrom
fix/7365-dispatch-ic-retry-can-fire

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

One of #7365's two named flaky tests is fixed: obj_dispatch_ic_tests goes from 10 of 12 isolated runs failing to 0 of 20.

with_stable_gen exists because dispatch-IC entries are keyed on VTABLE_GEN, and any class registration anywhere retires the cache — including a_class_registration_invalidates_every_entry in the same module, which calls test_bump_vtable_generation() on purpose. So an insert/lookup pair can straddle a bump and miss for a reason that has nothing to do with what is being asserted. The helper was written to retry in exactly that case.

The retry could never fire. body asserted internally, so a straddled pair panicked on the setup assertion ("the entry we just inserted must be findable") before the loop got to re-check the generation. The 64-retry budget was never spent.

body now returns whether its observations were valid: false means "a bump landed mid-pair, nothing was learned", which is a retry rather than a failure. The assertions the tests exist for — a different name at the same address must miss, a different class id must miss, an over-long name must not alias a truncated key, a prefix must not hit — stay assertions.

Why this matters beyond one test, and why it looked so strange. The failure rate inverted with scope: running only this module put its five tests — including the deliberate bumper — on threads together and failed 10 of 12, while the full 2000-test suite spread them apart and failed about 1 in 6. So the standard triage move, re-running just the failing test, made an intermittent test look reliably broken, and running the suite made it look nearly fine. Both readings were wrong, and #7365 is largely a catalogue of exactly that confusion.

Measured after the fix: 0/20 isolated runs fail. The full suite still fails about 1 in 10, but on a different test — gc::tests::root_words::bare_address_in_global_root_survives_a_real_collection, a sibling of the bare_address_in_shadow_slot_… case already measured at 2/10 on clean main. That family is untouched here and remains #7365's other half; it is a GC-timing intermittency rather than a test-isolation one, so it needs a different fix.

@coderabbitai

coderabbitai Bot commented Aug 11, 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: 7 minutes

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: 876d05c9-999a-4949-a80e-1e7664343d62

📥 Commits

Reviewing files that changed from the base of the PR and between 1804991 and e6069be.

📒 Files selected for processing (2)
  • changelog.d/7822-dispatch-ic-retry-can-fire.md
  • crates/perry-runtime/src/object/class_registry/dispatch.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.

@proggeramlug
proggeramlug force-pushed the fix/7365-dispatch-ic-retry-can-fire branch from 6ef3237 to e6069be Compare August 11, 2026 00:27
@proggeramlug
proggeramlug merged commit 29f786b into main Aug 11, 2026
11 of 18 checks passed
@proggeramlug
proggeramlug deleted the fix/7365-dispatch-ic-retry-can-fire branch August 11, 2026 05:25
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