Skip to content

test(codegen): restore the unary-pos assertions lost in the #8657 squash - #8669

Merged
proggeramlug merged 1 commit into
mainfrom
fix/8658-lost-test-edit
Aug 23, 2026
Merged

test(codegen): restore the unary-pos assertions lost in the #8657 squash#8669
proggeramlug merged 1 commit into
mainfrom
fix/8658-lost-test-edit

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

main is red; this makes it green. Three
expr::computed_store_rooting_tests cases fail 4/4 on main and 0/3
with this change.

What happened

#8650 changed unary + on a non-numeric operand to emit js_dynamic_pos
instead of js_number_coerce (expr/unary.rs, UnaryOp::Pos), and updated the
three tests that assert on that helper. When I squash-merged it as part of
#8657, the emission change survived and the test edit did not — so the
assertions kept naming a helper the compiler no longer emits at that site.

Bisected:

commit failures
c2da03439 0/3
06e1ab349 (#8657) 4/4
b5359b4de (#8664) 3/3
2382a9f15 (current main) 4/4

Each of #8657's five PRs is 0/3 alone, and all five re-merged together are also
0/3 — only the landed squash fails, which is what isolates it to the merge
rather than to any PR.

My error, recorded

I saw these same three tests fail 3/12 while validating #8657 and judged them
"likely pre-existing codegen tier nondeterminism," landing with a note. That was
wrong twice over: the failure was real and caused by my merge, and the
"nondeterminism" framing sent me looking at load sensitivity instead of at the
diff. #8658 was filed on that mistaken premise and should be re-scoped — the
intermittency I measured then was masking a deterministic breakage, not
describing one.

The lesson is narrow and worth keeping: a squash that drops one hunk of a PR
while keeping another produces a tree that no reviewer approved, and no
individual-PR check can see it. The only thing that catches it is testing the
merged result — which I did, and then explained away.

No product behaviour changes here; the tests now name the helper the compiler
actually emits.

Summary by CodeRabbit

  • Bug Fixes

    • Restored coverage for unary + operations on non-numeric values.
    • Corrected assertions for masked indexes, right-hand-side expressions, and straight-line execution scenarios.
  • Documentation

    • Added a changelog entry documenting the restored test coverage.

#8650 changed `UnaryOp::Pos` on a non-numeric operand from `js_number_coerce`
to `js_dynamic_pos` and updated the three computed_store_rooting_tests that
assert on it. The #8657 squash kept the emission change and lost the test edit,
leaving the assertions naming a helper the compiler no longer emits there.

They failed 4/4 on main; 0/3 with this. Refs #8658.
@proggeramlug
proggeramlug merged commit f4a7559 into main Aug 23, 2026
18 of 20 checks passed
@proggeramlug
proggeramlug deleted the fix/8658-lost-test-edit branch August 23, 2026 22:17
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d3f1e7a8-37c3-4f5e-994c-04294eceb8d1

📥 Commits

Reviewing files that changed from the base of the PR and between 2382a9f and 60e24cc.

📒 Files selected for processing (2)
  • changelog.d/8658-restore-lost-unary-pos-assertions.md
  • crates/perry-codegen/src/expr/computed_store_rooting_tests.rs

📝 Walkthrough

Walkthrough

The change restores three computed store rooting test assertions to match js_dynamic_pos emission for unary + on non-numeric operands. A changelog entry documents the correction. Product behavior is unchanged.

Changes

Unary plus assertion updates

Layer / File(s) Summary
Update coercion-witness assertions
crates/perry-codegen/src/expr/computed_store_rooting_tests.rs, changelog.d/8658-restore-lost-unary-pos-assertions.md
Three assertions now expect js_dynamic_pos for masked index, masked RHS, and straight-line region tests. The changelog records the restored assertions.

Estimated code review effort: 1 (Trivial) | ~2 minutes

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/8658-lost-test-edit

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