Skip to content

test(runtime): port two stale debug tests to the step 7 model - #12612

Merged
proggeramlug merged 1 commit into
mainfrom
om-step7-debug-tests
Oct 14, 2026
Merged

proggeramlug merged 1 commit into
mainfrom
om-step7-debug-tests

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #12611. Two perry-runtime tests failed in debug builds on main, both before and after object model step 7. Test-only change.

  • array_record_prototype_symbol_identity_guard, ported to the step 7 model. The test used to change the iterator member's identity by rewriting Array.prototype's key list behind the shape. Since step 7, the fixed Symbol.iterator slot is the authority, so that rewrite no longer means anything. The test now moves the genuine values body to an unrelated member (Symbol.toStringTag) and stores another function in the iterator slot. Entry must refuse (js_array_record_needs_iterator == 1). The test then restores the slot, deletes the extra member and checks that entry is eligible again.
  • weak_collection_summary_agrees_with_shape_brands was stale. It called with_summary(0xFF), which violates with_summary's debug precondition that only SUMMARY_KEY_BITS are set (the left: 224 panic, 0xFF & !0x1F). The fact being tested still holds: the test now passes every legal summary bit and still checks that the weak-collection brand survives.

Verification (qb6, debug cargo test -p perry-runtime --lib, --test-threads=1)

Filter Result
the two tests pass
iterator 116 passed, 0 failed
array_record 31 passed, 0 failed
shapes_store 27 passed, 0 failed
static_layout / named_props 11 / 25 passed, 0 failed

@proggeramlug
proggeramlug merged commit a86b06b into main Oct 14, 2026
6 of 7 checks passed
@proggeramlug
proggeramlug deleted the om-step7-debug-tests branch October 14, 2026 13:46
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a13bd896-d6e3-46cf-b5e1-494a75cd2348
📥 Commits

Reviewing files that changed from the base of the PR and between fa61096 and ba39119.

📒 Files selected for processing: 2
  • crates/perry-runtime/src/object/iterator_prototypes/array_record_tests.rs
  • crates/perry-runtime/src/object/shapes_store_tests.rs
 ____________________________________________________________________________________________
< It is easier to change the specification to fit the program than vice versa. - Alan Perlis >
 --------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

perry-runtime debug tests: array_record_prototype_symbol_identity_guard and weak_collection_summary_agrees_with_shape_brands fail on main

1 participant