Skip to content

ci: wasm32 runtime build (RecordArrayHeader), fmt, stale raw-handle ceilings, two integration expectations - #14631

Merged
TheHypnoo merged 5 commits into
PerryTS:mainfrom
raliclo:fix/main-green-2
Nov 13, 2026
Merged

TheHypnoo merged 5 commits into
PerryTS:mainfrom
raliclo:fix/main-green-2

Conversation

@raliclo

@raliclo raliclo commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the main reds that are mechanical, stale or a one-line layout pin, as #14604 did: wasi-execution (the runtime does not build for wasm32), lint → Check formatting, the stale entries of the raw-handle ratchet, and two wasm integration cases left behind by #14625. The GC-safety audits still red on main are untouched; they need their authors (see #14604).

Changes

commit change verified locally (macOS arm64)
3d1b0942ac record_array.rs: the size_of::<RecordArrayHeader>() == 24 assertion (#14487) pinned the 64-bit layout and fails on wasm32 (E0080, the wasi-execution failure). It now pins four u32 counts then the pointer with no padding (16 + size_of::<*mut u64>()); the capacity (+4) and elems (+16) offset assertions stay. Nothing depends on the width: compiled code reaches the head only through the js_record_array_* entries, the GC through elems_slot (addr_of_mut!), and shape_rule3 needs only capacity at +4. The header and both assertions compiled alone with the repo nightly for wasm32-wasip1 and aarch64-apple-darwin: the old assertion fails on wasm32 with the CI message, the new one holds on both. cargo test --release -p perry-runtime --lib record_array: 16 passed. The full wasip1 runtime build was not run here (needs wasi-sdk's clang); CI's wasi-execution is the check.
8b0a3fe3f9 cargo fmt --all: crates/perry-runtime/src/lib.rs landed unformatted after #14604. cargo fmt --all -- --check OK
0ab35ab584 scripts/raw_handle_debt_files.txt: deletes the eleven per-module ceilings raw_handle_debt.py reports as "matches nothing -- DELETE its line" (global_this_webassembly.rs and ten test modules). --no-raise-vs upstream/main: baseline 861 → 861, ceilings 107 → 96, none raised; no "matches nothing" left. (The summary of run_lint_gates.sh shows only the first of them; the gate itself lists all eleven.)
b5b3522be3 tests/integration/wasm/{20_string_from_char_code,22_cross_module_nested_object}.expected: #14625 made console.log(a, b) print one line, as Node does, but kept the old one-value-per-line expectations, so both cases fail on main. New contents are Node's output (the cross-module case run with explicit .ts imports). The compiled programs print exactly Node's output; tests/integration/wasm/run_wasm_tests.sh back to 28 pass / 4 fail (10_higher_order, 11_map_set_json, 14_regex_date, 19_ffi_imports).

Test plan

  • BASE_SHA=<merge-base> SKIP_COMPILE_GATES=1 bash scripts/run_lint_gates.sh on this branch and on pristine main, FAIL sets compared: the branch fixes Check formatting and adds no FAIL. cargo clippy -p perry --bins exits 0. (Last full run on b58bade7ac; the commits since, up to edd8d7f5d3, touch none of this PR's files, and fmt / file-size / raw-handle were re-run on edd8d7f5d3.)
  • Three lint steps fail only on macOS and pass in CI: Windows type-check and npm staging (no MSVC SDK / llvm-objcopy), Array-type predicate lint self-test (BSD grep).

Checklist

  • I have NOT bumped the workspace version or edited CHANGELOG.md
  • My commits follow the loose feat: / fix: / docs: / chore: prefix convention used in the log
  • I've read CONTRIBUTING.md and agree to the Code of Conduct

🤖 Generated with Claude Code

https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p

Summary by CodeRabbit

  • Bug Fixes
    • Restored runtime builds for the wasm32-wasip1 target.
    • Corrected a size check so it reflects the record header’s layout on both 64-bit and wasm32 targets.
  • Tests
    • Updated WebAssembly integration test expectations to match the current output format.
  • Chores
    • Removed obsolete raw-handle tracking limits where no matching items remain.

ralic and others added 5 commits November 13, 2026 22:04
`const _: () = assert!(size_of::<RecordArrayHeader>() == 24)` (PerryTS#14487) pins
the 64-bit layout; on wasm32 the `elems` pointer is 4 bytes and the head is 20,
so `wasi-execution` fails building the runtime for wasm32-wasip1 with E0080.
The head is reached only through the `js_record_array_*` entries and the GC
through `elems_slot` (`addr_of_mut!`), so nothing depends on the width: the
assertion now pins four u32 counts followed by the pointer with no padding
(16 + pointer size), keeping the capacity (+4) and elems (+16) offsets.

Checked by compiling the header and both assertions alone for
wasm32-wasip1 and aarch64-apple-darwin: the old one fails on wasm32 with the
CI message, the new one holds on both. `cargo test -p perry-runtime --lib
record_array`: 16 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
`crates/perry-runtime/src/lib.rs` landed unformatted after PerryTS#14604; the lint
job's "Check formatting" step rejects it. Mechanical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
…hing nothing

raw_handle_debt.py lists eleven per-module ceilings whose module now has no
debt site ("matches nothing -- DELETE its line so the cleanup cannot be
undone"): global_this_webassembly.rs and ten test modules under
perry-runtime (gc/tests/..., node_stream_tests*.rs, node_submodules/test.rs).
Only those lines go; `--no-raise-vs upstream/main`: baseline 861 -> 861,
module ceilings 107 -> 96, none raised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
…e output

PerryTS#14625 made `console.log(a, b)` print its arguments on one line, as Node does,
but left 20_string_from_char_code.expected and
22_cross_module_nested_object.expected in the old one-value-per-line form, so
tests/integration/wasm/run_wasm_tests.sh fails both on main. The new contents
are Node's output (the cross-module case run with explicit `.ts` imports), and
the compiled programs print exactly that; the suite is back to 28 pass / 4
fail with the long-standing set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes update a runtime size assertion to account for pointer width, remove entries from the raw-handle debt allowlist, and revise two wasm integration output expectations. A changelog entry records these and other CI updates.

Changes: Runtime and CI updates

Layer / File(s) Summary
Pointer-width-aware runtime layout
crates/perry-runtime/src/record_array.rs, crates/perry-runtime/src/lib.rs
The RecordArrayHeader size assertion now uses pointer width. The family_never and snap_census declarations are reordered.
Raw-handle debt entries
scripts/raw_handle_debt_files.txt
The allowlist removes several entries. The node_submodules/mod.rs ceiling remains 4.
Wasm output expectations and changelog
tests/integration/wasm/20_string_from_char_code.expected, tests/integration/wasm/22_cross_module_nested_object.expected, changelog.d/14631-main-green-wasi-and-ledgers.md
Both wasm expectations put labels and values on the same line. The changelog records these and other CI updates.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: proggeramlug

Merge Risk: Minimal · up to e151b

This change fixes the wasm32 size assertion, removes stale raw-handle ceilings, and updates two wasm output expectations. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change set: a wasm32 runtime build fix for the RecordArrayHeader assertion, plus fmt, stale raw-handle ceilings, and two integration expectations. It is specific and matches t…
Description check Passed The description follows the template's Summary, Changes, and Test plan sections. It explains the purpose and lists each commit with a verification note. The template's Related issue section is not pre…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change set: a wasm32 runtime build fix for the RecordArrayHeader assertion, plus fmt, stale raw-handle ceilings, and two integration expectations. It is specific and matches the changeset. It is long at 106 characters, but it is accurate and scannable.

Full details: Description check

Explanation

The description follows the template's Summary, Changes, and Test plan sections. It explains the purpose and lists each commit with a verification note. The template's Related issue section is not present as a heading, but the summary references #14604 and #14625 and the linked context is clear. The Test plan checklist items from the template are not reproduced, and the Screenshots section is optional. The description is mostly complete and gives concrete verification detail.

Finishing Touches

Generate unit tests (beta)

  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 41175e15-495e-47a7-8815-ccf9f28dbc2f
Commits

Reviewing files that changed from the base of the PR and between edd8d7f and e151b56.

Files selected for processing: 6

  • changelog.d/14631-main-green-wasi-and-ledgers.md
  • crates/perry-runtime/src/lib.rs
  • crates/perry-runtime/src/record_array.rs
  • scripts/raw_handle_debt_files.txt
  • tests/integration/wasm/20_string_from_char_code.expected
  • tests/integration/wasm/22_cross_module_nested_object.expected
Files with no reviewable changes: 1

  • scripts/raw_handle_debt_files.txt

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@TheHypnoo
TheHypnoo merged commit f5268c1 into PerryTS:main Nov 13, 2026
116 of 133 checks passed
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.

3 participants