fix(browser): cover raw fs bridge globals and regenerate the wasi polyfill#197
Merged
NathanFlurry merged 2 commits intoJul 2, 2026
Conversation
Closed guest loopback sockets never released their kernel socket-table slots until process exit (measured: vm_sockets highWater 81 for a workload whose true concurrency is ~9), so connection-churning guests hit EAGAIN 'maximum socket count reached' at ~250 cumulative sockets. - Bridge: natural FIN close finalization now releases the sidecar/kernel handle (idempotent, once), deferred until JS readable buffers drain so buffered data is never dropped. - Sidecar: net.poll close handling closes the underlying TCP/Unix handle when removing map entries; explicit close paths funnel through an idempotent kernel close (ENOENT tolerated); the TLS-mode close path no longer skips kernel close for kernel-backed sockets. - Guest fetch() now uses a bounded per-call undici dispatcher instead of the process singleton whose pooled clients went stale against released sockets and hung (also fixes a pre-existing hang: repeated fetch over a kept-alive loopback connection). Revisit pooling when host->guest socket event push (#178) lands. - Regression test: guest churns 3x max_sockets connections with closes. Full net family at 30 iterations passes (previously EAGAIN at tcp_concurrent_4): fetch 2.59ms, tcp_echo 3.57ms, tcp_concurrent_4 4.91ms guest p50; leak probe highWater 81 -> 17 with depth returning to 0.
Member
Author
|
Stack for rivet-dev/secure-exec
Get stack: |
railway-app
Bot
temporarily deployed
to
secure-exec / secure-exec-pr-197
July 2, 2026 10:02
Destroyed
…yfill - _fsReadRaw/_fsWriteRaw/_fsWriteFileBinaryRaw were added to bridge-contract.json by the raw fs fast path without browser facade coverage, failing check:bridge-contract ever since. - Regenerate wasi-polyfill.ts from the shared native WASI runner (stale after the create-parent-aware path resolution fix landed in the runner). Restores a green 'pnpm --dir packages/browser check-types'.
NathanFlurry
force-pushed
the
stack/fix-browser-mark-raw-fs-bridge-globals-unsupported-in-the-browser-facade-yxplzzou
branch
from
July 2, 2026 10:02
9fd33a7 to
20130d2
Compare
railway-app
Bot
temporarily deployed
to
secure-exec / secure-exec-pr-197
July 2, 2026 10:03
Destroyed
NathanFlurry
changed the base branch from
stack/fix-sidecar-release-kernel-socket-slots-when-guest-sockets-close-pympklxu
to
main
July 2, 2026 10:03
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5343
July 2, 2026 10:03
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5314
July 2, 2026 10:03
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5328
July 2, 2026 10:03
In progress
NathanFlurry
deleted the
stack/fix-browser-mark-raw-fs-bridge-globals-unsupported-in-the-browser-facade-yxplzzou
branch
July 2, 2026 10:03
railway-app
Bot
requested a deployment
to
rivet-frontend / agentos-pr-1507
July 2, 2026 10:03
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5333
July 2, 2026 10:03
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / agentos-pr-1510
July 2, 2026 10:03
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5324
July 2, 2026 10:03
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5338
July 2, 2026 10:03
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5320
July 2, 2026 10:03
In progress
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.
bridge-contract.json by the raw fs fast path without browser facade
coverage, failing check:bridge-contract ever since.
the create-parent-aware path resolution fix landed in the runner).
Restores a green 'pnpm --dir packages/browser check-types'.