Repository navigation
Conversation
theduke
force-pushed
the
split/napi-02-managed-framework
branch
from
October 22, 2026 07:55
701a164 to
556b0be
Compare
This was referenced Oct 22, 2026
theduke
force-pushed
the
split/napi-02-managed-framework
branch
from
October 22, 2026 08:20
556b0be to
b0861e1
Compare
theduke
marked this pull request as ready for review
October 22, 2026 08:26
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.
V8 background tasks used a process worker pool outside tenant scheduling. Resource reservations could be released while native work or store teardown still used the environment, and native bookkeeping could grow outside the aggregate memory budget.
Introduce lazy embedder-owned V8 lanes and a bounded queue, with host-controlled admission, accounting scopes, overload notification and stop/join hooks. Keep standalone execution supported. Preserve existing host imports when installing compatibility fallbacks, so an application-supplied WASIX/libuv helper is not overwritten. Serialize guest cancellation with permanent host stop and reject guest interrupt scheduling in managed execution. Shutdown wins activation races, active scopes remain valid until work leaves, and reservations stay owned through native teardown and store destruction.
Extend the shared budget to account native handle bookkeeping and host-owned resource categories. Keep guest heap bindings lazy for import-only modules, retain imported/shared memory ownership, preserve interruptible waits, and accept released EdgeJS's fixed runtime flags as inert defaults without letting a guest change process-wide V8 flags. Add native bounds and cleanup for module metadata, dynamic-import work, publication failure and teardown. Preserve the existing Node-API surface, including BigInt count-query, wrap/reference and external-buffer correctness fixes.
This is the provider framework layer. The following PR wires bounded guest snapshots, transient copies and queued-message ownership into those facilities. The lane lifecycle and its quota-retention rules stay together because splitting them would reintroduce already-fixed shutdown and release races.
Standalone metadata and its lockfile are kept compatible with current main, including the browser test dependencies. Wasmer dependency revisions are unchanged from current main.
Stack and provenance
#93 → #94 → #95 → #96 → #97 → #98 → #99 → #100 → #101
Part 2 of the audited split of #84, reconstructed on current main
eac0a13fa65a4d6103864d875ed76ab7efb1816e. Review againstsplit/napi-01-guest-isolation; 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
v8_lazy_lane, context/unit tests for activation/stop/overload/admission/quiescence, and native BigInt/reference/context tests; compile with./cargo-standalone.sh check --quiet --message-format=short --features cli.Local standalone
cargo check --quiet --message-format=short --features clipassed. All 22ctx::testspassed on the independent framework snapshot, including imported-memory/start-section binding, host helper preservation, stop/admission and teardown cases. A few future message-accounting hooks are intentionally unused until the next layer; they produce warnings, not compilation failures. The wasm32+JS cargo check also passed. Further local tests were stopped at the user’s request. Final CI is still 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 PR keeps its prerequisite branch as its base to preserve the focused diff.