Skip to content

runtime: native-payload lifecycle — close releases, sweep finalizes, same-cell reopen, terminal events - #12036

Merged
proggeramlug merged 5 commits into
mainfrom
native-payload-lifecycle
Oct 5, 2026
Merged

proggeramlug merged 5 commits into
mainfrom
native-payload-lifecycle

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Refs #11919. Separates CLOSED (resource released, cell alive, owner still traced) from FINALIZED (sweep/teardown). Adds same-cell reopen (attach), an OpenSerial for stale children, link_event_owner for terminal events after close, and alloc_closed; finish() returns CallEnd::{Threw, Closed}. Cell size and hot paths are unchanged. Unblocks the sqlite (reopen) and net (terminal events after destroy) conversions. Tests: runtime 5020/0, stdlib 247/0, codegen 2510/0; T1–T12 plus L4/L5/L8/L9 with 18/18 sabotages red; 200k churn created = finalized = drops.

Draft until the merged-tree check is done.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c8dc4884-80bb-4ac6-aabf-ff5dfdd92be0
📥 Commits

Reviewing files that changed from the base of the PR and between 130156d and b49a915.

📒 Files selected for processing (12)
  • changelog.d/PENDING-native-payload-lifecycle.md
  • crates/perry-runtime/src/gc/layout_slot_visit.rs
  • crates/perry-runtime/src/gc/malloc.rs
  • crates/perry-runtime/src/gc/tests/copying/latch.rs
  • crates/perry-runtime/src/gc/tests/native_payload_callbacks.rs
  • crates/perry-runtime/src/gc/tests/native_payload_lifecycle.rs
  • crates/perry-runtime/src/native_handle.rs
  • crates/perry-runtime/src/native_payload.rs
  • crates/perry-stdlib/src/runtime_thread_exit_tests/symbols_tests.rs
  • crates/perry-stdlib/src/streams/tests.rs
  • docs/native-payload-lifecycle-validation.md
  • docs/native-payload-pattern.md
 __________________________________________________________________________
< Your code is like a magic trick: now you see it... now it's `undefined`. >
 --------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

Ralph Küpper added 5 commits October 5, 2026 16:23
Retain current main constructors while reopening closed subclass cells in place and rejecting open or finalized installs. Initialize AsyncHook record indexes in their existing open payload so rejected replacement drops cannot retire the newly registered hook.
Record smaps, GC census, mimalloc and allocation-stack evidence. An identical-ELF control reproduces the file-backed RSS gap; prepare only the compared executable files before alternating runs. Include all distributions and the inherited main codegen failures.
@proggeramlug
proggeramlug force-pushed the native-payload-lifecycle branch from b49a915 to 6a0d326 Compare October 5, 2026 16:09
@proggeramlug
proggeramlug marked this pull request as ready for review October 5, 2026 16:09
@proggeramlug
proggeramlug merged commit 04d9036 into main Oct 5, 2026
31 of 37 checks passed
@proggeramlug
proggeramlug deleted the native-payload-lifecycle branch October 5, 2026 16:10
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