Repository navigation
ci: wasm32 runtime build (RecordArrayHeader), fmt, stale raw-handle ceilings, two integration expectations - #14631
Conversation
`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
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
Fixes the
mainreds 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 onmainare untouched; they need their authors (see #14604).Changes
3d1b0942acrecord_array.rs: thesize_of::<RecordArrayHeader>() == 24assertion (#14487) pinned the 64-bit layout and fails on wasm32 (E0080, thewasi-executionfailure). It now pins fouru32counts 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 thejs_record_array_*entries, the GC throughelems_slot(addr_of_mut!), andshape_rule3needs only capacity at +4.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'swasi-executionis the check.8b0a3fe3f9cargo fmt --all:crates/perry-runtime/src/lib.rslanded unformatted after #14604.cargo fmt --all -- --checkOK0ab35ab584scripts/raw_handle_debt_files.txt: deletes the eleven per-module ceilingsraw_handle_debt.pyreports as "matches nothing -- DELETE its line" (global_this_webassembly.rsand ten test modules).--no-raise-vs upstream/main: baseline 861 → 861, ceilings 107 → 96, none raised; no "matches nothing" left. (The summary ofrun_lint_gates.shshows only the first of them; the gate itself lists all eleven.)b5b3522be3tests/integration/wasm/{20_string_from_char_code,22_cross_module_nested_object}.expected: #14625 madeconsole.log(a, b)print one line, as Node does, but kept the old one-value-per-line expectations, so both cases fail onmain. New contents are Node's output (the cross-module case run with explicit.tsimports).tests/integration/wasm/run_wasm_tests.shback 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.shon this branch and on pristinemain, FAIL sets compared: the branch fixes Check formatting and adds no FAIL.cargo clippy -p perry --binsexits 0. (Last full run onb58bade7ac; the commits since, up toedd8d7f5d3, touch none of this PR's files, and fmt / file-size / raw-handle were re-run onedd8d7f5d3.)llvm-objcopy), Array-type predicate lint self-test (BSD grep).Checklist
feat:/fix:/docs:/chore:prefix convention used in the log🤖 Generated with Claude Code
https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Summary by CodeRabbit
wasm32-wasip1target.