Skip to content

fix(runtime): include stacktraces in uncaught error exit reasons - #29

Merged
mremond merged 2 commits into
mainfrom
fm/task-ef2dd622
Nov 13, 2026
Merged

mremond merged 2 commits into
mainfrom
fm/task-ef2dd622

Conversation

@mremond

@mremond mremond commented Nov 13, 2026

Copy link
Copy Markdown
Member

Why

Uncaught native errors sent bare reasons to monitors and links, breaking BEAM-style matches on {Reason, Stacktrace}.

What changed

  • Directly spawned processes now exit from uncaught errors with {Reason, Stacktrace}.
  • Monitors and links preserve the same envelope through error termination and link cascades.
  • Explicit exits, normal returns and caught errors keep their existing behavior.

Before and after

Before: The two notification types, DOWN and EXIT, carried bare foo for error(foo), and the focused regression failed.

After: Both now carry {foo, Stacktrace}; 482 native end-to-end fixtures pass alongside repeated native and BEAM regressions.

This changes Erlang process notification payloads, not a screen; native message transcripts demonstrate the behavior.

Checked

Live validation: Demonstrated for this version. 3 of 3 scenarios driven live in the product.

Scenario Result Evidence
Uncaught error notifications and unchanged explicit exits ✅ Passed live Real native DOWN and EXIT transcripts; ten default-scheduler native, ten single-scheduler native and ten BEAM regression runs.
Existing invalid-binary and list-operation fixtures ✅ Passed live Both old expectations reproduce their timeout failures; both repaired fixtures pass ten native runs and the complete suite.
Complete local project gate and native shutdown probe ✅ Passed live Ordered release builds, strict clippy, 2145 Rust passes, allocator check, 482 end-to-end passes and all ten shutdown configurations.
  • Full change inspection after bringing the branch up to date: The runtime fix and regression fixtures remain identical to the independently reviewed implementation.
How it was checked

cargo build --release --locked -p nera-runtime; cargo build --release --locked -p nera

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

Native shutdown probe: ten configurations, thirty samples each, all median exit gaps below the existing five-millisecond budget.

Risk

Risk: low in every dimension.

Full risk assessment
Dimension Level Why
Blast radius low Changes one final error-termination path and focused regression fixtures.
Behavior low Corrects error notification reasons to the expected BEAM shape.
Undo low Reverting the code restores prior behavior; no persistent data changes.
Evidence low Real message transcripts, native and BEAM repeats, and the full gate pass.
Sensitivity low No sign-ins, credentials, saved settings or external data are involved.
Novelty low Reuses the existing captured trace and notification propagation.
Dependencies low Adds or updates no dependency.
Not done

Bundled proc_lib wrappers still catch errors and explicitly exit with bare reasons; they are outside this change.

Stack-frame ordering, trace-depth limits and uncaught-throw reasons are unchanged.

Local validation ran on macOS; Windows execution was not tested.

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.

@github-actions github-actions Bot added this to the 0.1.1 milestone Nov 13, 2026
@mremond
mremond merged commit 8ab72bf into main Nov 13, 2026
22 checks passed
@mremond
mremond deleted the fm/task-ef2dd622 branch November 15, 2026 14:05
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