-
-
Notifications
You must be signed in to change notification settings - Fork 156
fix: recover main's red CI gates + perry check false pass
#6891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ce36223
fix: recover main's red CI gates + `perry check` false pass
1c74ef8
docs: add changelog.d fragment for #6891
81bb06d
fix(readline): address CodeRabbit review findings on the moved code
4deba4d
fix: address review and important test failures
a60c6c7
test(codegen): describe sloppy-mode PIC coverage
303f6c0
Merge main and harden readline GC safety
af6c0f8
fix(ci): align compiler proofs with moving GC
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| **`perry check` no longer passes unparseable code:** a file that failed to parse was reported only under `-v` and then skipped without recording a diagnostic, so `error_count()` stayed 0 and the command printed `All checks passed! - 0 file(s) checked` and exited 0 — while `perry compile` rejected the same file. Parse failures are now recorded as a `P001` diagnostic, so the text summary, the JSON `success` field and the exit code agree. (`perry check` had no exit-code test coverage; found while verifying a fresh Linux checkout.) | ||
|
|
||
| **Recovered three red CI gates on `main`:** split `perry-runtime/src/object/mod.rs` (2039 → 1709 lines) by extracting the #6812 spill/overflow storage into `object/spill.rs`, and `perry-stdlib/src/readline.rs` (2066 → 1994) by extracting the drain/pump + keypress decoding into `readline/pump.rs`, with visibility widened only enough to keep the existing `use super::*` sites resolving. Fixed the lone `cargo fmt --check` diff in `collect_modules.rs`, and refreshed the stale addr-class ratchet baseline. | ||
|
|
||
| **Recovered the compiler-output gate after the moving-nursery flip:** the native-region contracts now permit only the intentional `js_gc_loop_safepoint` call in otherwise runtime-free hot loops, and the image/scalar-replacement budgets record the moving collector's measured collection and root-barrier counts. Function-scoped IR checks now select functions by their definition line instead of also selecting any caller whose body mentions the target symbol; the old behavior made an unrelated `console.log` argument array look like a scalar-replacement heap allocation. | ||
|
|
||
| **Readline correctness fixes (review findings on the moved code):** raw-mode arrow keys work — the reader queues one byte per chunk, so `\x1b[A` arrived as three chunks and could never match the 3-byte CSI branch; the pump now reassembles escape sequences across chunks/ticks (a bare ESC flushes one tick later). `'readable'` listeners fire only when a tick delivers new data (plus once at EOF) instead of on every event-loop iteration forever. `rl.write()` actually writes to the output stream; `rl.pause()/resume()` now gate the stdin-backed interface (queued lines hold while paused); `rl.close()` stops subsequent `'line'` delivery; `process.stdin.destroy()` clears `readable` listeners too. GC hardening: line dispatch and prompt/write no longer run JS inside the `READLINE_INTERFACES` borrow (re-entrancy panic + skipped root scan), iterator/keypress/listener-attach paths root values in `RuntimeHandleScope` across allocating calls, and the readline root scanner is registered from every entry point that stores GC-visible state. Closed custom interfaces release their slot (handles are not reused). In `object/spill.rs`, the learned-inline-width hook moved off the steady-state write path (only high-water-raising writes probe TLS, learned widths unchanged). | ||
|
|
||
| **Fixed macOS low-address object classification and shape construction rooting:** mimalloc allocations in the Rust harness can land around 45 GB, below the obsolete 2 TB macOS floor, which made valid key arrays look invalid and left keypress-object named properties unreadable. macOS now uses the same guarded low heap floor as the other supported platforms. Shape-cache construction also roots the newborn object and in-progress key array across allocating key-string calls, and readline roots cloned listener snapshots before dispatch. | ||
|
|
||
| **Fixed three stale test assertions** (each verified byte-for-byte against Node 26.5.0 first — none was a real defect): perry-hir expected the `??=` RHS store as `PutValueSet` when lowering emits `PropertySet` for a plain member target; perry-codegen sliced only `fast.inner.body`..`fast.inner.exit` for the numeric stores, which #6812's spill lanes moved into the `fast.store.spill.*` / `fast.store.inline.*` successors (it now collects every `object_array_write.loop.fast.*` block); and perry-stdlib asserted `randomBytes` fires its callback synchronously after #6430 deliberately deferred it to a macrotask to match Node's libuv timing. Two of the three live in `crates/*/tests/*.rs`, which only run nightly/on tags — the #5960 blind spot. | ||
|
|
||
| **`run_parity_tests.sh` no longer reports false gap regressions under `PERRY_NO_AUTO_OPTIMIZE`:** the default `test-files/` suite linked the prebuilt `full` stdlib, which carries none of the `external-*` pump features, so every `events`/`http`/`net`/`fetch` test failed and surfaced as an untriaged NEW gap failure (7 of them, all passing with auto-optimize). `node-suite` already compensated; the default suite now builds the same wrapper crates and pump features. This matters locally because a cold auto-optimize run mints a ThinLTO variant per feature combination — measured at 12 variants / 71 GB after only 30 of 411 tests. | ||
|
|
||
| **Documented two build prerequisites that hard-fail a fresh checkout:** `libclang` (bindgen, via the `libsqlite3-sys` build script) and rustc ≥ 1.94 (sqlx 0.9.0's MSRV, which nothing in the workspace pins). `installation.md` also required "clang ≥ 15 for codegen" while every per-distro command below it installed no clang at all; the Node row now points at `.node-version` instead of a stale "22". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.