Repository navigation
design: exit signals, startup and runtime-drop semantics as in OTP (ranks 5e, 5f, 5g) - #237
unbalancedparentheses wants to merge 14 commits into
Conversation
2714992 to
6dff813
Compare
…d covers registered monitors
… skip, try_link, late signals)
🤖 Codex Code Review
No Rust runtime changes are included. TLC was not run during this review. Automated review by OpenAI Codex · gpt-6.1-sol · custom prompt |
🤖 Claude Code ReviewReview: PR #237, OTP exit-signals design and
|
🤖 Gemini Code ReviewThis is a very thorough design contract and TLA+ specification. The separation of the death point D (Phase 4) from destruction (Phase 5) and publication (Phase 6), along with the receiver-side fencing protocol and negative controls, fits together cleanly. A few specific issues found between the design doc and 1.
|
🤖 Grok Code ReviewThe death-point split, kill provenance, and ordered-pair locking are sound, and the negative controls match the faults they name. The holes are places the model under-approximates the contract, plus one shutdown restart rule that is only half-specified. Model under-approximations (
|
🤖 Kimi Code ReviewFound three specification/model issues. This PR contains no Rust runtime implementation, so there are no direct code-level concurrency or memory-safety changes to assess.
The D/publication separation and receiver-side fence protocol otherwise appear internally consistent, and the negative-control coverage is thoughtfully structured. Automated review by Kimi (Moonshot AI) · kimi-k3.1-pro · custom prompt |
🤖 DeepSeek Code ReviewThis is a docs/TLA+ design PR, not production Rust. The design doc is thorough and the model does cover many of the intended exit-signal/lifecycle rules. However, the TLA+ model has a few fidelity/coverage issues worth fixing before relying on the verification claims.
|
Draft. Design only, no library code. ROADMAP ranks 5e (exit signals), 5f (startup remainder), 5g (runtime drop), plus the
start()ordering from #223. Follows the design-review rule.docs/design/otp-exit-signals.mdverification/tla/Lifecycle.tla(the "base actor lifecycle" model), configsMCLifecycle(safety, CI),MCLifecycleLive(liveness, CI),MCLifecycleFence(unlink/demonitor fences, CI),MCLifecycleLiveDeepandMCLifecycleDeep(weekly)negative_checks.py(v0.7 exit-signal behaviours, PR Fix requests retained by mailbox publication racing actor shutdown #182/fix: honor stop before dispatching newly received idle work #185 bugs, early exit errors, kill/panic precedence, runtime-drop reason, early notification, split death point, unfenced unlink/demonitor, parent exit reachingexit_received)spawned-v0.7branches (only ethrex's discovery boot path changes behaviour; one deliberate exhaustiveActorErrormatch)Proposed rules (brief)
stopped()(final reason, admission/registry/link-monitor table close together), publication after destruction, owned cleanup after that.kill()is untrappable, supersedes any reason until D, target endsKilled; links/monitors seeKilled.ctx.exit/ChildHandle::exit/killwith exactexit_signal/2rules (Normalignored by non-trapping actors, everything but kill trappable);stop/stop_with_reason/shutdownstay administrative stops.start_linkedparent) ends a trapping actor throughstopped(), never viaexit_received; kill escalation atshutdown_timeout.NoProcfor link/monitor/request after D;unlink/demonitorfence notices in flight.ExitReason#[non_exhaustive]+Killed,NoProc.start(); ready children's exits during startup are processed after it;start()returns its error after rollback.Killedin both modes.Reviews
Four rounds, Codex and agy, each without the author's answers to the open questions. Final: Codex go with one minor (fixed), agy go. Every finding is mapped in "Review resolutions".
Maintainer decisions (recorded in the doc's "Decisions")
link:NoProcexit signal;try_link -> Result<(), NoProc>for explicit handling.stopped()skipped on a kill and on untrapped exit signals / link notices.Killed.ActorStoppedcarries the exit reason;NoProcfor sends/requests after the death point, once rank 11 (feat: deferred replies and pipe-to-self (rank 11) #239) lands.stop_with_reason(Kill)stays administrative, endingKill.shutdown()stays administrative.The doc also lists the required rank 11 /
DeferredReplies.tlachanges (death point right afterstopped(), held exit errors answered at death, callers/Down/wait_exitshare one reason).Verification status
TLC 2.19 on fede, 4 workers, nice 19:
MCLifecycle43.3M states, no error (6m55s);MCLifecycleLive324k, no error;MCLifecycleFence388k, no error. All 19 negative-control checks produce their counterexample. WeeklyMCLifecycleDeep/MCLifecycleLiveDeepand optional Apalache run after the canary window ends (~2026-11-11 23:21 UTC).