Repository navigation
Conversation
theduke
force-pushed
the
split/napi-08-metered-wasm
branch
from
October 22, 2026 07:55
a06b6aa to
9bb2a10
Compare
This was referenced Oct 22, 2026
theduke
force-pushed
the
split/napi-08-metered-wasm
branch
from
October 22, 2026 08:00
9bb2a10 to
13fdc9a
Compare
theduke
force-pushed
the
split/napi-08-metered-wasm
branch
from
October 22, 2026 08:20
13fdc9a to
bf960db
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.
Enabling V8 WebAssembly in a tenant would otherwise leave its memory reservations, committed pages, compiled code and compilation work outside the instance budget.
Add the metered policy with per-lane memory reservation/count limits, committed-memory and compiled-code accounting, process code budgets and bounded compilation admission. Carry accounting through VM contexts, Wasm compilation and teardown, and disable shared code caching where it would make attribution ambiguous. Install process-wide module/function/table limits before V8 starts. Include the regression distinguishing an unknown policy from the valid metered policy.
This depends on the earlier heap-exhaustion mitigation and page allocator accounting. V8 code commits cannot safely be refused like data-buffer growth: the guard may stop a tenant after a commit, and native metadata-allocation failures intentionally fail open. Concurrent compilation can overshoot a sampled/postcommit threshold. The controls reduce exposure and provide accounting; they are not a proven hard process-memory cap under host OOM or arbitrary concurrent compilation. Allocation conventions remain tied to the tested V8 archive.
Stack and provenance
#93 → #94 → #95 → #96 → #97 → #98 → #99 → #100 → #101
Part 8 of the audited split of #84, reconstructed on current main
eac0a13fa65a4d6103864d875ed76ab7efb1816e. Review againstsplit/napi-07-page-accounting; 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_wasm_guest,v8_wasm_metering,v8_wasm_process_budget,v8_wasm_tiering, and native invalid/metered-policy environment-creation regression.The final Rust Wasm metering/process-budget/tiering suites were not reached before the user requested local tests stop. The new native Rust CI job explicitly selects these suites. The CLI guest suite additionally requires the intended wrapper-preserving SDK and guest C toolchain and is outside that standalone CI job; keep that coverage distinction visible. Final branch execution is pending.
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.