Skip to content

fix(runtime): report exited processes as no longer alive - #31

Merged
mremond merged 1 commit into
mainfrom
fm/task-ce752de3
Nov 14, 2026
Merged

mremond merged 1 commit into
mainfrom
fm/task-ce752de3

Conversation

@mremond

@mremond mremond commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Why

Native shutdown observers could briefly see stopped children as alive after their supervisor exited.

What changed

  • Process liveness queries now respect published exit state before process table cleanup finishes.
  • A deterministic regression covers exit notification arriving before table removal without weakening supervisor assertions.

Before and after

Before: An untouched macOS build failed 71 of 1,600 contended supervisor fixture runs because stopped children still appeared alive.

After: The repaired macOS build completes ten consecutive fixture runs; its deterministic post-exit regression also passes ten consecutive runs.

This changes runtime process liveness, not a graphical view; native execution transcripts and the deterministic regression demonstrate the result.

Checked

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

Scenario Result Evidence
Native supervisor shutdown completes after every post-shutdown liveness assertion. ✅ Passed live Ten consecutive native executions exit zero with exact supervisor_shutdown_ok completion using the combined runtime; complete stdout and stderr are retained.
  • Full local gate: 2,150 Rust tests and 485 native tests passed; one Rust test was ignored and two external native tests were skipped.
  • Deterministic regressions and lifecycle overlap: The liveness and linked-exit accounting regressions each passed ten consecutive runs; all 80 lifecycle cases preserved accounting and readiness cleanup.
  • BEAM supervisor reference fixture: Passed ten consecutive executions on OTP 29 with explicit supervisor_shutdown_ok completion.
  • Native shutdown and linked-exit probes: All 300 shutdown executions passed their 5 ms median budget; 20 native lifecycle runs completed after 10,000 monitored linked deaths.
  • Lint, allocator, CI policy and cross-object checks: All passed, including 15 CI-policy tests and both supported cross-object smoke checks.
  • Independent review: Code equivalence and the current runtime's native fixture proof were independently accepted.
How it was checked

Built runtime before compiler with cargo build --release --locked -p nera-runtime and cargo build --release --locked -p nera, then built the workspace.

Ran cargo clippy --workspace --all-targets --locked -- -D warnings and cargo test --workspace --locked --no-fail-fast.

Ran python3 scripts/test-allocator-config.py, nera test -j 1 --timeout 30, python3 scripts/ci/test_changes.py and both scripts/test-cross.sh targets.

Ran both the liveness regression and the overlapping linked-exit accounting regression ten times each without retries or sleeps. Compiled and ran the unchanged native and OTP 29 supervisor_shutdown fixtures ten times each.

Ran python3 scripts/test-native-shutdown.py with 30 samples for each of five programs at both default and single-scheduler settings. The retained linked-exit native probe completed ten runs at each scheduler setting with exact output, empty stderr and natural blocked-only termination.

Resolved only changelog context when bringing the branch up to date. Every approved added and removed line remains identical in all four changed paths; the newer lifecycle code is retained unchanged and covered by the combined gate.

Untouched Linux aarch64 reproduced 83 liveness assertion failures in 600 contended executions. The interrupted fixed Linux repetition produced no result; hosted Linux checks provide repaired-version coverage.

The historical hosted Linux x86_64 failure is consistent with this defect, but its five-line diagnostic limit prevents unique attribution. No assertion, timeout or expectation was weakened.

Risk

Risk: low in every dimension.

Full risk assessment
Dimension Level Why
Blast radius low One process-liveness BIF and its deterministic regression.
Behavior low Corrects false live results for already exited processes.
Undo low Reverting the commit restores the previous behavior without data migration.
Evidence low Combined native gate, ten fixture completions and lifecycle-overlap proof passed.
Sensitivity low No credentials, personal data, signing or release changes.
Novelty low Uses the existing published exit state already read by link and monitor.
Dependencies low No dependency changes.

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 c6dbf24 into main Nov 14, 2026
21 checks passed
@mremond
mremond deleted the fm/task-ce752de3 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