Skip to content

batch: land #8813, #8815, #8816, #8817, #8818, #8819, #8820 - #8822

Merged
proggeramlug merged 19 commits into
mainfrom
merge/batch-8813-8820
Aug 25, 2026
Merged

batch: land #8813, #8815, #8816, #8817, #8818, #8819, #8820#8822
proggeramlug merged 19 commits into
mainfrom
merge/batch-8813-8820

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Batch landing of seven reviewed PRs, validated once as a single merged tree.

PR
#8813 perf(map): repair ordered-delete indexes in place
#8815 fix(async_hooks): complete lifecycle review follow-ups
#8816 fix(doctor): reject stale runtime archives
#8817 test(compile): cover builtin imports in compiled packages
#8818 fix(sharp): support create input descriptors
#8819 feat(qs): add native Stripe-compatible shim
#8820 perf(codegen): specialize call-returned array stores

All seven merged cleanly with no conflicts and no fixes needed while landing.

Audit notes

  • perf(codegen): specialize call-returned array stores #8820 — replaces a side-effect-freedom requirement with structural identity in put_value_index_fast_path. Sound: PutValueSet stores the assignment base in both target and receiver, so those are two HIR representations of one source evaluation, not two that need coalescing, and same_put_value_receiver_expr is already trusted on the sibling same-receiver path. The property this rests on — IndexSet::lower evaluating the base once — is asserted directly by same_call_returned_array_uses_array_index_store_and_evaluates_receiver_once, with distinct_call_receiver_stays_on_explicit_receiver_put_value_path covering the fail-closed side.
  • perf(map): repair ordered-delete indexes in place #8813 — the "mark the moved span once" barrier is a rename of the existing runtime_dirty_external_slot_span, not new barrier logic, so no new trust is required. Compaction uses ptr::copy (memmove), correctly overlap-safe.
  • fix(async_hooks): complete lifecycle review follow-ups #8815 — rooting discipline is the right way round: 31 with_mut_ptr + 10 with_const_ptr + 3 across_mut against only 18 bare get_raw_* reads, across 35 handle scopes. Its timer.rs change (+10/-3) does not touch js_callback_timer_has_pending or js_callback_timer_tick, so it cannot undermine the assertions fix(async_hooks): complete Node lifecycle parity #8671 landed in re-land #8671: async_hooks lifecycle parity (defer crypto completions) #8814 — confirmed by the full perry-stdlib suite staying at 120/0.
  • feat(qs): add native Stripe-compatible shim #8819 — not a vendored dependency. It is a from-scratch native Rust implementation (perry-ext-qs/{parse,stringify,options}.rs); the sha256/ported-at fields record what it was ported from. The Cargo.lock delta is exactly one new package, perry-ext-qs, first-party — zero new third-party dependencies, no vendored JS, no package.json change.

Validation (merged tree)

  • all 30 lint-job gates pass
  • perry-runtime 2690, perry-codegen 1251, perry-hir 336, perry-stdlib 120, perry-ext-qs 11 — all 0 failed

An earlier run of this same validation died of ENOSPC (the Data volume was at 100%); those results were discarded rather than interpreted, and the numbers above come from a clean re-run with 40Gi free, verified by df before and after.

Summary by CodeRabbit

  • New Features

    • Added partial native support for nested query-string parsing and serialization through qs.
    • sharp now supports creating solid RGB and RGBA images with configurable backgrounds.
    • DNS resolver options now preserve timeout and retry settings.
    • HTTP and network operations provide improved one-time listeners and asynchronous completion callbacks.
  • Bug Fixes

    • Improved array assignment semantics, event handling, garbage-collection safety, and stream cleanup.
    • Compiler and diagnostics now detect incompatible runtime libraries before linking.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 913d79a7-6a81-4f8b-a31f-01c7db472ac7

📥 Commits

Reviewing files that changed from the base of the PR and between 8f026e5 and e183fad.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • tests/release/packages/hono-node-server/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (107)
  • Cargo.toml
  • changelog.d/8751-native-qs.md
  • changelog.d/8813-map-ordered-delete.md
  • changelog.d/8816-runtime-library-build-stamp.md
  • changelog.d/8817-compiled-package-builtin-import.md
  • changelog.d/8818-sharp-create.md
  • changelog.d/8820-call-return-array-stores.md
  • crates/perry-api-manifest/src/entries.rs
  • crates/perry-api-manifest/src/entries/part_4.rs
  • crates/perry-codegen/src/expr/call_return_array_index_tests.rs
  • crates/perry-codegen/src/expr/mod.rs
  • crates/perry-codegen/src/expr/proxy_reflect.rs
  • crates/perry-codegen/src/expr/this_super_call.rs
  • crates/perry-codegen/src/ext_registry.rs
  • crates/perry-codegen/src/lower_call/builtin.rs
  • crates/perry-codegen/src/lower_call/native_table/http_client.rs
  • crates/perry-codegen/src/lower_call/native_table/http_server.rs
  • crates/perry-codegen/src/lower_call/native_table/media.rs
  • crates/perry-codegen/src/lower_call/native_table/mod.rs
  • crates/perry-codegen/src/lower_call/native_table/qs.rs
  • crates/perry-codegen/src/runtime_decls/stdlib_ffi/net_http.rs
  • crates/perry-ext-events/src/lib.rs
  • crates/perry-ext-events/src/module_iterators.rs
  • crates/perry-ext-events/src/module_on.rs
  • crates/perry-ext-events/src/tests.rs
  • crates/perry-ext-http/src/client_request_surface.rs
  • crates/perry-ext-http/src/lib.rs
  • crates/perry-ext-http/src/server/handle_dispatch.rs
  • crates/perry-ext-http/src/server/request.rs
  • crates/perry-ext-http/src/server/server.rs
  • crates/perry-ext-http/src/server/server/deferred_events.rs
  • crates/perry-ext-net/src/dispatch.rs
  • crates/perry-ext-net/src/gc_roots.rs
  • crates/perry-ext-net/src/lib.rs
  • crates/perry-ext-net/src/lifecycle.rs
  • crates/perry-ext-net/src/provider_lifecycle.rs
  • crates/perry-ext-net/src/raw_bridge.rs
  • crates/perry-ext-qs/Cargo.toml
  • crates/perry-ext-qs/src/codec.rs
  • crates/perry-ext-qs/src/lib.rs
  • crates/perry-ext-qs/src/options.rs
  • crates/perry-ext-qs/src/parse.rs
  • crates/perry-ext-qs/src/runtime.rs
  • crates/perry-ext-qs/src/stringify.rs
  • crates/perry-ext-qs/src/test_async_shims.rs
  • crates/perry-ext-sharp/src/lib.rs
  • crates/perry-ext-sharp/src/test_async_shims.rs
  • crates/perry-ext-zlib/src/stream.rs
  • crates/perry-runtime/Cargo.toml
  • crates/perry-runtime/build.rs
  • crates/perry-runtime/src/array/indexing.rs
  • crates/perry-runtime/src/async_context.rs
  • crates/perry-runtime/src/async_hooks.rs
  • crates/perry-runtime/src/async_hooks/provider_ffi.rs
  • crates/perry-runtime/src/build_stamp.rs
  • crates/perry-runtime/src/child_process/reactor.rs
  • crates/perry-runtime/src/dns.rs
  • crates/perry-runtime/src/dns/ffi.rs
  • crates/perry-runtime/src/fs/dir_glob_watch/watch.rs
  • crates/perry-runtime/src/gc/barrier/mod.rs
  • crates/perry-runtime/src/gc/mod.rs
  • crates/perry-runtime/src/lib.rs
  • crates/perry-runtime/src/map.rs
  • crates/perry-runtime/src/module_require.rs
  • crates/perry-runtime/src/node_stream_constructors/builders.rs
  • crates/perry-runtime/src/node_stream_constructors/pipeline.rs
  • crates/perry-runtime/src/node_stream_dispatch.rs
  • crates/perry-runtime/src/node_submodules/fs_promises.rs
  • crates/perry-runtime/src/object/instanceof.rs
  • crates/perry-runtime/src/object/native_module_dispatch/dispatch_a_c.rs
  • crates/perry-runtime/src/promise/assimilate.rs
  • crates/perry-runtime/src/promise/async_step.rs
  • crates/perry-runtime/src/promise/microtasks.rs
  • crates/perry-runtime/src/promise/then.rs
  • crates/perry-runtime/src/proxy.rs
  • crates/perry-runtime/src/set.rs
  • crates/perry-runtime/src/timer.rs
  • crates/perry-stdlib/src/async_local_storage.rs
  • crates/perry-stdlib/src/common/dispatch/emitter_als.rs
  • crates/perry-stdlib/src/common/dispatch_http.rs
  • crates/perry-stdlib/src/tls/event_pump.rs
  • crates/perry-stdlib/src/webcrypto/digest.rs
  • crates/perry-stdlib/src/webcrypto/hmac.rs
  • crates/perry-stdlib/src/webcrypto/util.rs
  • crates/perry-stdlib/src/worker_threads/worker_pump.rs
  • crates/perry-stdlib/src/zlib.rs
  • crates/perry/src/commands/compile.rs
  • crates/perry/src/commands/compile/build_cache.rs
  • crates/perry/src/commands/compile/library_search.rs
  • crates/perry/src/commands/compile/run_pipeline.rs
  • crates/perry/src/commands/compile/runtime_compat.rs
  • crates/perry/src/commands/compile/well_known.rs
  • crates/perry/src/commands/doctor.rs
  • crates/perry/tests/call_return_array_index.rs
  • crates/perry/tests/issue_8748_sharp_create.rs
  • crates/perry/tests/issue_8749_compiled_package_builtin_import.rs
  • crates/perry/tests/issue_8751_qs_native_shim.rs
  • crates/perry/well_known_bindings.toml
  • docs/src/native-libraries/governance.md
  • docs/src/stdlib/other.md
  • scripts/raw_handle_debt_baseline.txt
  • scripts/thread_local_cold_allowlist.json
  • tests/release/packages/hono-node-server/entry.ts
  • tests/release/packages/hono-node-server/expected.txt
  • tests/release/packages/hono-node-server/fixture.sh
  • tests/release/packages/hono-node-server/package.json
  • workspace-architecture.json

📝 Walkthrough

Walkthrough

This PR adds native qs support, validates runtime archive identity, updates async event and socket callback handling, improves GC safety, changes map and array behavior, and adds Sharp object-form image creation. It also adds integration tests, release fixtures, changelog entries, and workspace metadata.

Changes

Native qs binding

Layer / File(s) Summary
Codec, parser, serializer, and runtime bridge
crates/perry-ext-qs/*
Adds partial native qs compatibility for nested parsing, serialization, encoding formats, options, callbacks, arrays, dates, and JSON conversion.
Compiler and binding registration
Cargo.toml, crates/perry-api-manifest/*, crates/perry-codegen/*, crates/perry/well_known_bindings.toml, workspace-architecture.json
Registers the qs module, native methods, extension routing, workspace crate, and partial compatibility metadata.
Integration coverage
crates/perry/tests/issue_8751_qs_native_shim.rs, docs/src/native-libraries/governance.md, changelog.d/8751-native-qs.md
Verifies that compiled dependencies use the bundled native implementation instead of hostile on-disk qs and get-intrinsic packages.

Runtime archive compatibility

Layer / File(s) Summary
Build identity stamping
crates/perry-runtime/build.rs, crates/perry-runtime/src/build_stamp.rs, crates/perry-runtime/Cargo.toml
Computes a runtime build ID and embeds a versioned stamp in runtime artifacts.
Compile and doctor validation
crates/perry/src/commands/compile/runtime_compat.rs, crates/perry/src/commands/compile/run_pipeline.rs, crates/perry/src/commands/doctor.rs
Scans runtime archives, classifies compatibility, reports diagnostics, and rejects invalid archives before archiving or linking.

Async events and networking

Layer / File(s) Summary
Async provider callbacks
crates/perry-runtime/src/async_hooks/*, crates/perry-ext-events/src/lib.rs, crates/perry-ext-http/src/server/server/deferred_events.rs
Adds exception-safe provider callback execution, implicit this handling, and deferred resource destruction.
HTTP one-shot listeners
crates/perry-ext-http/*, crates/perry-stdlib/src/common/dispatch_http.rs, crates/perry-codegen/src/lower_call/native_table/*
Routes once calls through dedicated native entry points and self-removing wrappers.
Socket completion dispatch
crates/perry-ext-net/*
Carries write and shutdown completion tokens through asynchronous socket events, roots callbacks, dispatches completion results, and cleans up on close or failure.
Event resource cleanup
crates/perry-ext-events/src/module_iterators.rs, crates/perry-ext-zlib/src/stream.rs, crates/perry-stdlib/src/{tls,event_pump.rs,zlib.rs,worker_threads/worker_pump.rs}
Stores target metadata, roots callbacks and payloads, selects event-specific resources, and defers destruction after dispatch.

Runtime behavior and GC safety

Layer / File(s) Summary
GC-safe runtime paths
crates/perry-runtime/src/{async_context.rs,async_hooks.rs,node_stream_dispatch.rs,promise/*,proxy.rs}, crates/perry-stdlib/src/{async_local_storage.rs,common/dispatch/emitter_als.rs,webcrypto/*}
Uses runtime handle scopes and refreshed pointers across allocations, callbacks, async hooks, and promise propagation.
Map, Set, and array operations
crates/perry-runtime/src/{array/indexing.rs,map.rs,set.rs}, crates/perry-codegen/src/expr/*, crates/perry/tests/call_return_array_index.rs
Adds descriptor-aware array writes, optimized ordered map deletion, external write barriers, and call-returned array store coverage.
DNS and process options
crates/perry-codegen/src/lower_call/builtin.rs, crates/perry-runtime/src/{dns.rs,dns/ffi.rs,child_process/reactor.rs}
Preserves DNS constructor options and avoids creating a stdin resource when stdin is absent.

Sharp image creation

Layer / File(s) Summary
Create descriptor support
crates/perry-ext-sharp/src/lib.rs, crates/perry-codegen/src/lower_call/native_table/media.rs
Supports solid RGB and RGBA images from { create: ... } descriptors with rooted field access and input validation.
Validation and examples
crates/perry/tests/issue_8748_sharp_create.rs, docs/src/stdlib/other.md, changelog.d/8818-sharp-create.md
Tests image metadata, pixel values, PNG output, and invalid descriptors. Adds a corresponding example.

Estimated code review effort: 5 (Critical) | ~120 minutes

Suggested reviewers: thehypnoo

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch merge/batch-8813-8820

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