Repository navigation
fix(runtime): recover initial-process final-slice signals - #42
Merged
Merged
Conversation
mremond
force-pushed
the
fm/task-aa309fa0
branch
from
November 14, 2026 16:44
f156b1b to
c8b083b
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
A program could hang when its initial process returned with links while a message or exit signal reached its inbox.
What changed
Before and after
Before: Both final-slice delivery regressions stranded inbox work; a paused sender could also make a fatal exit complete normally.
After: All six affected runtime tests pass ten consecutive runs each, and 120 native/BEAM comparison runs complete with the expected outcomes.
This changes runtime scheduling and signal delivery, not a visible interface.
Checked
Live validation: Demonstrated for this version. 4 of 4 scenarios driven live in the product.
How it was checked
cargo build --release --locked -p nera-runtime; cargo build --release --locked -p nera; cargo build --release --locked
cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test --workspace --locked --no-fail-fast
python3 scripts/test-allocator-config.py; ./target/release/nera test -j 1 --timeout 30; python3 scripts/test-stacktrace-order.py
python3 scripts/test-runtime-contracts.py with the complete corpus; python3 scripts/test-native-shutdown.py with all prescribed cases
Ten consecutive runs each: initial_return_with_links_observes_final_slice_message, initial_return_with_links_observes_final_slice_exit, initial_return_with_links_observes_exit_before_sender_wake, initial_return_with_links_without_delivery_stays_waiting, inbox_drain_keeps_exit_classification_with_its_payload, linked_exit_releases_runnable_slot_once
The workspace retains one existing ignored test; the native suite retains two expected skips.
The BEAM comparison explicitly retains its caller after entry return; plain Erlang startup has different initial-process lifetime semantics.
Independent review found the split EXIT-publication race; the corrected envelope and both drain paths passed re-review.
All ten shutdown cases passed, with median final-output-to-exit gaps from 0.25 to 1.57 ms.
Risk
Risk above low: Blast radius, high — Shared inbox classification serves every Erlang process.; Novelty, medium — Adds a typed EXIT envelope beside existing message fragments.
Full risk assessment
Not done
Local validation covers macOS arm64; it does not establish Windows or target-native cross-platform behavior.
Pipeline
Updates from git push no-mistakes
Infinitary checked this version: an independent review that also judged the documents, and live validation the review accepted.