Repository navigation
fix: own actor shutdown and settle request/reply waits - #65
Merged
Merged
Conversation
dbrattli
force-pushed
the
fix/actor-lifecycle-liveness
branch
from
October 7, 2026 19:21
3f03d39 to
1270b10
Compare
dbrattli
marked this pull request as draft
October 7, 2026 19:27
dbrattli
force-pushed
the
fix/actor-lifecycle-liveness
branch
from
October 7, 2026 19:54
c9c57ca to
832bc86
Compare
dbrattli
marked this pull request as ready for review
October 7, 2026 20:32
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.
Actors could continue running after
kill, and a request could wait forever after its handler crashed or its target stopped. This change connects spawned work to an owned lifetime, adds awaitable shutdown, and makes request/reply waits settle on supported termination and cancellation paths across .NET, JavaScript, Python, and BEAM.Integration plan — awaiting upstream maintainer review
The chosen integration order is to keep this PR in draft while the upstream runtime/compiler fixes await review by the Fable maintainers. This is an integration decision, not a failing build dependency: the Actor suite and CI pass against published Fable/fable-library 5.19.0 using narrow actor-local workarounds. Those tests cover the library's stated contract; they do not establish correct cancellation and cleanup for arbitrary supplied Async computations.
Under this plan, wait for the relevant fixes to be reviewed by maintainers, merged, and published before merging this Actor PR. Update the compiler and matching runtime pins together, remove or adapt the workarounds that those releases supersede, inspect the revised cancellation boundary, and rerun the complete .NET/JavaScript/Python/BEAM suite plus formatting, builds, and packaging. Retain actor-level ownership and per-call settlement logic: upstream Async fixes do not replace these library responsibilities.
Behavior
spawn,spawnLinked, andspawnWithTokenconnect cancellation to cooperative work on emulated targets. Parent exit shuts down owned linked children, including after normal completion. Repeated and concurrent shutdown requests share cleanup.stop/stopAsyncvalidate a positive cleanup deadline before requesting shutdown. Completion observes workflow, cleanup, and owned-descendant exit on emulated targets, or native process death on BEAM. Cleanup failures and timeouts are reported.callResult/callResultAsyncdistinguish reply, timeout, target termination, and explicit caller cancellation.callAsyncWithTimeoutadds a bounded Async convenience API; existing unbounded call defaults remain.Compatibility and target limits
Actorhandles are internally constructed classes rather than public records. ExistingMb,Cts, andPidaccess remains, but direct record construction is a breaking change.TODO(upstream)comments link the relevant Fable fixes and state the conditions for retiring each workaround.The rc.11 baseline still had the lifecycle and call gaps; rc.12 had already fixed the supervised replacement-child return value. This PR preserves that API, upgrades Fable.Beam to 5.1.0 and both Python runtime locks to 5.19.0, and retains main's Fable 5.19.0 and Fantomas 8.0.6 pins. Dependency, shutdown, call, and documentation changes remain separate commits.
Validation
After rebasing onto current main:
just check, standalone BEAMjust build,just pack, andgit diff --checkpassed.Local validation uses .NET SDK 10.0.400, Node 26.8.2, Python 3.14.0, and OTP 25; CI uses Node 20, Python 3.12, and OTP 27. Existing formatter, generated Erlang, and missing package-readme warnings remain.