Repository navigation
Conversation
theduke
force-pushed
the
split/napi-01-guest-isolation
branch
from
October 22, 2026 07:55
ba6b5fd to
44cdb16
Compare
This was referenced Oct 22, 2026
theduke
force-pushed
the
split/napi-01-guest-isolation
branch
from
October 22, 2026 08:20
44cdb16 to
777ff63
Compare
theduke
marked this pull request as ready for review
October 22, 2026 08:25
This was referenced Oct 22, 2026
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.
A tenant executing JavaScript or collecting garbage held the bridge's process-wide mutex, blocking unrelated environments. Guest
napi_fatal_erroraborted the host, and callback-capable Node-API operations could swallow a guest WASIX exit.Acquire counted per-environment leases for ordinary bridge calls and keep registry locks short. Control operations can interrupt a running environment; isolate construction alone stays serialized, using V8's default isolate group. Convert fatal guest calls to WASIX exits with the correct void import signature, and propagate exits from callback-capable Node-API calls.
The change includes the matching private external-buffer ownership observer: a Buffer prototype getter can exit after V8 has taken ownership, so Rust must not free the same allocation again. Reject reentrant environment release before unregistering Rust state or disposing an entered isolate. No public native header or guest import is added.
A native Rust CI job is included from the first layer so each subsequent PR runs its available WAT/native-FFI suites, library unit tests, formatting and clippy. Existing C++ and host-JS workflows remain active. The new job uses the existing locked public SDK without private credentials; it does not claim coverage of CLI guest execution on the internal Edge SDK.
Audit focused on lease lifetime, lock ordering, callback reentry, fatal import ABI, external-buffer ownership and preserving current main's host-JS fixes. Regression coverage uses the existing versioned guest ABI, without depending on the optional EdgeJS 0.0.1 compatibility adapter.
Stack and provenance
#93 → #94 → #95 → #96 → #97 → #98 → #99 → #100 → #101
Part 1 of the audited split of #84, reconstructed on current main
eac0a13fa65a4d6103864d875ed76ab7efb1816e. Review againstmain; predecessor branches are required. Original PR #84 remains unchanged. The stack preserves newer main host-JS behavior and deliberately excludes the unused frozen 0.0.1 ABI adapter.Validation
Pure-WAT
core_callbacksregressions (property callbacks and reentrant release), nativeexternal_transfer, and concurrent GC/termination/fatal cases inv8_host_control. Exact executed results are recorded below before readiness.Completed locally before the request to stop local tests: native cargo check, formatting and clippy (warnings), 2 callback regressions, 1 external-transfer regression, and 30 fresh concurrent processes running both callback tests. The pre-fix reconstruction crashed within six fresh processes; moving both JIT permission resets and the capability-based isolate-group selection into this first layer removed that reproduction. wasm32+JS cargo check also passed. New CI results remain pending; keep draft.
Latest-main rebase
Rebased the dependency stack onto
eac0a13fa65a4d6103864d875ed76ab7efb1816eafter main merged PR #92. This preserves unsigned guest IDs, pointers and lengths, bounded result/argv writes, host-JS buffer failure cleanup and the high-pointer/high-ID regressions. Conflicts received independent native and host-JS source review. All historical local results above predate this rebase; no local tests or builds were run for it, as requested. Updated-head validation belongs to CI and may be pending. This first PR targets main; later PRs keep their prerequisite branches as bases to preserve focused diffs.