Repository navigation
fix(engine): wave 2 node:fs, stream/string_decoder, and child_process semantics (v0.10.10) - #66
Merged
Merged
Conversation
… semantics (v0.10.10)
This was referenced Nov 11, 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.
Summary — Wave 2 (
v0.10.10):node:fs,node:stream/node:string_decoder, andnode:child_processSemanticsCloses #50
Closes #51
Closes #56
1.
node:fs&node:fs/promises(#50)err.code,err.errno,err.syscall,err.path): Throws/rejects with standardENOENT,EEXIST,EISDIR,ENOTDIR,ENOTEMPTY, andEBADFerror objects acrossreadFileSync,statSync,lstatSync,unlinkSync,rmdirSync,readdirSync,renameSync,copyFileSync,openSync, andnode:fs/promisesequivalents, while keeping OCapFsReadDenied/FsWriteDeniedviolations uncatchable by guesttry / catch.statSync/lstatSync{ throwIfNoEntry: false }: Returnsundefinedwhen{ throwIfNoEntry: false }is passed for missing paths.BufferReturn onreadFileSync/fsp.readFile: Returns aBufferwhen noencodingis specified (and decodedstringwhenutf8or{ encoding }is passed).utimesSync: Supports{ flag: a | wx | ... }onwriteFileSync/fsp.writeFile, and persistsutimesSync/fsp.utimesmtimeupdates inBOA_VFS_MTIMES.readdirSync: Supports{ recursive: true }and{ recursive: true, withFileTypes: true }withDirentname/parentPathsemantics.openSync,readSync,writeSync,fstatSync,ftruncateSync,closeSync,fsp.open): Implements full in-memory VFS file descriptors andFileHandlemethods.2.
node:stream,node:string_decoder, and WebReadableStream(#51)StringDecoder&Readable.setEncoding: Buffers incomplete multi-byte UTF-8 (2/3/4-byte sequences), UTF-16LE (odd byte & surrogate pairs), and Base64 (3-byte quantum) sequences across.write()calls and flushes on.end(), with a zero-copy__slice_text_decodefast path.WritableBackpressure &'drain': TrackswritableLengthagainstwritableHighWaterMark, returnsfalsefrom.write()when full, and emits'drain'when buffered writes complete.ReadableStreamAsync Iteration &Readable.toWeb: ImplementsReadableStream.prototype[Symbol.asyncIterator]and.values(), and queues pendingreader.read()/Response.text()waiters on async push streams.3.
node:child_process(#56)exec,execSync,{ shell: true }): Executes shell command chains (&&,||,;), pipelines (|), and exit codes (exit N->err.status = N) under Ring-1 OCapExecCapverification.spawnstdinPiping: Buffers and deliverscp.stdin.write()/cp.stdin.end()binary and UTF-8 payloads to child processes viainputBase64.ENOENTHandling:spawnSyncreturns{ status: null, error }witherror.code = ENOENT, andspawnemits'error'witherr.code = ENOENT.Verification & Benchmarks
190 passed; 0 failed(slice-cas: 21,slice-cli: 40,slice-engine: 109,slice-io: 6,slice-sandbox: 14).microvm-bench:1.30 µsmin /1.40 µsP50 /1.60 µsP99 cold-start,1.87 ms1,000-tenant swarm,4.0 KBper-tenant footprint,11.97 MBtotal process RSS.microbench: Addedslice_engine::vfs_and_streams(vfs_fd_open_read_write_and_recursive_readdirat~307 µs,string_decoder_multibyte_and_writable_hwmat~513 µs).