Skip to content

Merge train 198: clear four of the five red CI gates on main (v0.5.1576) - #10298

Merged
proggeramlug merged 8 commits into
mainfrom
train198r
Sep 15, 2026
Merged

proggeramlug merged 8 commits into
mainfrom
train198r

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

This train lands #10296 as v0.5.1576. It clears four of the five CI jobs that have been red on main, which every open pull request inherits and which keep pr-gate from going green for anyone.

The source PR's seven commits retain their authorship. The train adds only the version bump; no train repairs were needed.

A shipping build does not change. Every Rust edit is either inside a mod tests block — native_stack.rs, the ic_slow prefix-token test, and the assert_rejected_with_compile_error helper — or a #[cfg(feature = "wasm-host")] gate on two functions whose only callers already sit behind that feature. The compiler proves that last claim: a caller outside the feature would no longer resolve. What remains is the regenerated API reference and .d.ts, one entry in the thread_local! cold allowlist, one docs example, and the changelog fragment.

The gates

Job On main On this train
warnings red — -D warnings dead code in global_this_webassembly.rs green
check red — API manifest gained bun-pty without regenerating the artifacts green
self-test-checkers red — #10166's raw thread_local! in regex/perex_owner.rs green
cargo-test red — native_stack::tests::stack_top_respects_custom_thread_stack_sizes green
lint red — published benchmark artifact's source_fingerprint drifted still red, by design

lint is the fifth, and it is deliberately not fixed here: the drifted input is Cargo.toml, so the remedy is ./benchmarks/run_public_baseline.sh — roughly two hours plus a build — and that rerun rewrites the published perry-vs-node numbers. That is a decision to make, not a cleanup to perform. Locally the full gate suite passes 82 of 83, up from main's 80, with Public benchmark evidence freshness the only failure.

cargo-test, and one CI crash that did not reproduce

The source run's cargo-test job SIGSEGV'd after 404 of 3,938 tests, at
async_hooks::test_support::tests::native_async_resource_accepts_string_and_symbol_expandos —
a test nothing in this PR touches. That is not main's behaviour: its three most recent runs,
and #10295's run in the same tier, all reach the end with only the known native_stack
failure. Since a crash masks 3,500 tests, it was attributed before landing rather than assumed
to be noise.

A rerun of that same job on the same runner passed: 7,671 tests, no crash. Three further
independent samples, none of which reproduces it either:

Sample Result
this tree, macOS aarch64, debug, CI's own invocation 3,952 passed, 0 failed
main, x86_64 Linux, debug, CI's own invocation 3,933 passed, 1 failed (native_stack), no crash
this PR's head, x86_64 Linux, same box, same invocation 3,934 passed, 0 failed, rc=0, no crash

So cargo-test is green on this head, and the four gates this train sets out to clear are
cleared. The Linux box is the same architecture as the runner, and its main arm reproduces CI's main
baseline exactly — the same single native_stack failure — so it is a faithful stand-in rather
than a different environment that happens to be quiet. On it, the crash does not occur and the
rewritten stack-bound test passes, which is the first direct evidence that this fix does what
it is for: it takes cargo-test from red to green on the platform it was failing on, which no
amount of macOS testing could show.

What stays red on main after this lands: lint's benchmark-freshness gate, and the three gap
regressions main already carries (test_gap_iterator_prototype_next_patch,
test_gap_2899_2779_2777_static_helpers, test_gap_disposablestack_2875, one per shard —
unchanged by this train). Both are in pr-gate's fan-in, so pr-gate does not go green on this
train alone.

Local validation

Validated head 174ae98e5690467cde62db9b3e8a968327fc6982, on main 50beb8ded0c1bd7bdcf1ed84fda4fe2dc1adf485, five-package release build pinned and hash-verified before and after every suite (artifacts_match_pin true).

  • 1,543 codegen, 3,950 runtime, 139 standard-library and 1,139 CLI tests pass. The runtime suite's only failure is main's known release-only gc::tests::heap_generation::a_free_or_move_outside_every_scope_is_caught_in_debug_builds.
  • Six integration suites, 15 tests, all pass.
  • Gap filters over descriptor (36 fixtures) and shape (18); each filter asserts it selected fixtures. Every executed fixture passes except two whose oracle cannot run them, both previously attributed by compiling them with the main and train compilers and finding byte-identical output: test_three_like_native_class_descriptors (Node fails ERR_MODULE_NOT_FOUND on an extensionless helper import; both builds print OK) and test_issue_7981_thread_shape_stamp_parent (a perry-only fixture — Node cannot resolve perry/thread and exits 1 in package_json_reader; Perry exits 0). No snapshot changes.

The head moved twice during validation. The last move added a docs-only commit, so rather than rerun the whole suite the train was rebuilt on the settled head and the gates a docs change can reach were rerun against it: the full 83-gate lint (same 82/83), check_file_size.sh, cargo fmt, the doc-fence lint the commit is about, and the new example itself — compiled with the pinned binary and diffed against its expected stdout, 1 of 1 passing, so the example is proven rather than asserted. The Rust tree carried into that rebuild is identical to the tree the full suite ran against; the only difference is the three docs files.

Before merging, the pushed head and unchanged main are checked again. After merging, the rewritten commits and source patches are checked for preserved authorship and the main tree must match the validated train exactly.

Summary by CodeRabbit

  • New Features

    • Added API declarations and reference documentation for the bun-pty module, including spawn.
    • Added a tiny-program runtime example demonstrating cross-platform specialization and a “hello, world” output.
  • Documentation

    • Updated tiny-program documentation to use the maintained example source.
    • Updated API coverage and project version information.
  • Bug Fixes

    • Improved runtime stack-boundary test reliability.
    • Resolved build and validation issues affecting WebAssembly and generated API checks.

Ralph Küpper added 8 commits September 15, 2026 16:17
Both functions are read only from wasm-host-gated call sites (this file's
Memory thunks and crate::webassembly), so a build without the feature failed
-D warnings as dead code. CI's warnings job has been red on main since the
gate started running them.
#10166 added a thread_local! under cfg(debug_assertions) that counts live
program-cell views so debug builds can prove a witness is never written under
one. It is absent from shipping builds and cannot cost _tlv_get_addr there, so
it takes the checker's own record-it path rather than a hot-cache slot.
The manifest gained bun-pty without the generated artifacts being
regenerated, which the check job's drift gate reports on every PR.
…ding

stack_top_respects_custom_thread_stack_sizes compared top - address against
the REQUESTED stack size. How much an allocator rounds that request up to, and
whether the guard page counts inside the reported region, are per-platform and
per-image properties: the comparison failed on Linux CI while holding on this
project's own Linux box (glibc 2.39) and on macOS. Assert the fact the walkers
depend on instead — a worker's bound is its own, not the spawning thread's.
Two more errors the warnings job never reached, because it failed at the lib
stage first. The ic_slow prefix-token test writes the cache through `cache`
while the IC reads it through `slot`, a raw-pointer alias the
unused_assignments lint cannot see through; write through the alias instead.
`assert_rejected_with_compile_error` is called only by a cfg(not(wasm-host))
test, so it carries the same gate.
8a99b36 added a bare typescript fence, which the docs lint rejects: a fence
must either include a real example (so perry-doc-tests compiles and runs it) or
declare no-test. Move the snippet into docs/examples/runtime/tiny_program.ts
with its expected stdout, which is what the page is about — the program shape
the tiny specialization admits — so the example is proven rather than opted
out.
@proggeramlug
proggeramlug merged commit 6bab431 into main Sep 15, 2026
18 of 20 checks passed
@proggeramlug
proggeramlug deleted the train198r branch September 15, 2026 16:21
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 9be5356b-4e67-4961-b4e7-8ea1369fe4fd

📥 Commits

Reviewing files that changed from the base of the PR and between 50beb8d and 174ae98.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • CLAUDE.md
  • Cargo.toml
  • changelog.d/10296-main-red-gates.md
  • crates/perry-runtime/src/native_stack.rs
  • crates/perry-runtime/src/object/field_get_set/ic_miss/ic_slow.rs
  • crates/perry-runtime/src/object/global_this_webassembly.rs
  • docs/api/perry.d.ts
  • docs/examples/_expected/runtime/tiny_program.stdout
  • docs/examples/runtime/tiny_program.ts
  • docs/src/api/reference.md
  • docs/src/runtime/tiny-programs.md
  • scripts/thread_local_cold_allowlist.json

📝 Walkthrough

Walkthrough

The PR updates the project version, fixes runtime feature gates and test assertions, refreshes API artifacts, adds a tiny-program example, updates the thread-local allowlist, and records the CI fixes.

Changes

Runtime CI and generated artifacts

Layer / File(s) Summary
Runtime build gates and test fixes
crates/perry-runtime/src/object/global_this_webassembly.rs, crates/perry-runtime/src/native_stack.rs, crates/perry-runtime/src/object/field_get_set/ic_miss/ic_slow.rs
WebAssembly definitions receive narrower feature gates. Stack-bound and stale-token test code is updated.
API and example refresh
docs/api/perry.d.ts, docs/src/api/reference.md, docs/examples/runtime/tiny_program.ts, docs/examples/_expected/runtime/tiny_program.stdout, docs/src/runtime/tiny-programs.md
The bun-pty API declarations and reference are added. The tiny-program example and expected output are added, and the documentation includes the example file.
Release and build metadata
Cargo.toml, CLAUDE.md, scripts/thread_local_cold_allowlist.json, changelog.d/10296-main-red-gates.md
The project version changes to 0.5.1576. The thread-local allowlist and changelog are updated.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch train198r

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