Skip to content

test(codegen): assert the guard-failure edge's property, not a symbol name (#7506) - #7807

Merged
proggeramlug merged 1 commit into
mainfrom
fix/7506-guard-failure-edge-property
Aug 11, 2026
Merged

test(codegen): assert the guard-failure edge's property, not a symbol name (#7506)#7807
proggeramlug merged 1 commit into
mainfrom
fix/7506-guard-failure-edge-property

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

typed_f64_receiver_method_clone_raw_loads_after_composed_guards is green again, and now asserts the property instead of a symbol name (#7506). native_proof_regressions goes from 261/262 to 262/262 and moves into the per-PR map.

#7506 posed the question directly: the guard-failure edge stopped calling $generic, so either the assertion is stale or a receiver whose fields are not raw f64 takes the typed clone's raw loads anyway. Answered by reading the emitted IR rather than by choosing.

The composition still has three outcomes, not two:

  1. method-direct guard fails → js_native_call_method_by_id (fully dynamic)
  2. raw-f64 field guard passes → $typed_f64_recv, which raw-loads the receiver's slots with no coercion
  3. raw-f64 field guard fails$pshape, a Ptr clone

So (3) changed callee, not existence. And $pshape is sound for that edge for a reason the old assertion could not express: it does emit inttoptr + getelementptr + load double — the shape guarantees the slot OFFSETS — but routes every loaded slot through js_number_coerce, which is exactly the right handling for a slot that may hold a NaN-boxed value. It is a strictly better target than the generic body, and it is still correct when the guard that just failed said nothing about the slots' representation.

The assertion is therefore re-pointed at that property, following #7492's worked example:

  • the failure edge must reach a clone that does not assume raw-f64 slots ($generic or $pshape);
  • it must not reach $typed_f64_recv, whose whole premise is the guard that just failed;
  • and when it reaches $pshape, that clone must contain js_number_coerce — without which it would be the typed clone under another name.

Both new assertions were sabotage-verified: breaking the coercion check and narrowing the accepted callee set each make the test fail with its own message; restoring passes.

Because the suite is now fully green, its SUITE_EXCLUSIONS entry is deleted and native_proof_regressions joins SOURCE_SUITE_MAP. That is not optional bookkeeping — e2e-scoped fails the job when an excluded test PASSES, and ci_e2e_scope.py --self-test refuses a suite that is in neither list, which is what caught the half-done state while I was making this change. Self-test passes.

Worth recording alongside #7245: of the 16 tests that issue reported red, 15 had already been fixed by unrelated work with nothing recording it. This was the only real one.

@coderabbitai

coderabbitai Bot commented Aug 10, 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: 34 seconds

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: fa296c18-7ce6-4efb-8791-403799ebc633

📥 Commits

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

📒 Files selected for processing (3)
  • changelog.d/7807-guard-failure-edge-property.md
  • crates/perry-codegen/tests/native_proof_regressions.rs
  • scripts/ci_e2e_scope.py

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/7506-guard-failure-edge-property branch from d6af333 to 0b954e6 Compare August 10, 2026 22:18
@proggeramlug
proggeramlug merged commit ff1e857 into main Aug 11, 2026
1 of 18 checks passed
@proggeramlug
proggeramlug deleted the fix/7506-guard-failure-edge-property branch August 11, 2026 05:24
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