Repository navigation
Conversation
…hmarks, many fixes Work on ahead-of-time compilation since the merge of main. - `bun run --aot` and `bun test --aot` check the program and hold values to their types while running on the JIT. The result of a check is kept, and after an edit only what changed is looked at again. A change in a folder above the project no longer discards it. - Bun.parse<T>, Bun.validate<T>, Bun.safeValidate<T> and Bun.schema<T>. - A type that nobody wrote is not enforced on data the program is given. - An early question about what counts as outside data no longer replaces the whole-program search, which had made look-alike types lose their layouts after a `delete` on an untyped record anywhere in the program. - Literals with accessors and namespace objects keep their layouts. - require() of a module that threw evaluates it again, as in plain Bun. `require(__dirname + "/x")` is resolved at build time. - fs.stat of a real path does not ask the embedded file graph first. - A relative name longer than a path buffer no longer panics in the standalone module graph. - Object.keys() of node:http's IncomingMessage follows Node's order. - Written types and JSDoc that name a class are predictions in untyped code. - The front end answers more questions about types from shared tables, and several quadratic walks on generated code are gone. - test/aot/backend: a TechEmpower-style benchmark on Bun.serve and Bun.sql with Go and Rust counterparts. test/aot: an issue tracker in TypeScript, Go and Rust that answers with the same bytes in all three. - Instruction-count snapshots, typedness records, generated matrices of casts, stores, spreads and module forms, and tests with time limits for compile-time blowups.
…es for plain Bun Names: - About 3,100 Rust identifiers and 2,900 test programs and test files are renamed to ordinary compiler vocabulary (fast path, slow path, shape, allocation site, external data, subclass). `--aot-explain=alterations` is now `--aot-explain=mutations`, and the debug IR dump uses the same words as the engine's. Types: - The results of Bun.parse<T>(), Bun.validate<T>() and Bun.safeValidate<T>() are T for the code that reads them, not a prediction. - Call sites with the same T share one set of emitted functions. - `unknown` is assignable only to `unknown` and `any` when deciding what is external data. A property of type `unknown` used to make look-alike types, and every class that flowed through them, accept untyped objects. - A sum of three terms, a conditional or `??` operand, and an indexed or keyed read on parsed data no longer throw a TypeError that plain Bun does not. - A parameter that is never read is neither checked nor passed. - An unused string concatenation, and results of a callee that no caller reads, are removed. Counted loops that only fed them go too. Build time: - Answers about published types are shared between checker tasks instead of being computed again in each. - Property reads, signatures and descriptions of very wide unions are linear: large `as const` tables, unions of hundreds of function types, unions of tens of thousands of members. - Predictions in untyped code that depend on each other are resolved together. - Reachability, token collection, ordering and several other link steps run on the thread pool. A quadratic step in candidate collection is gone. - The build opens about 40% fewer directories, and an early pass over the sources no longer sometimes runs to completion. Running: - `require(__dirname + "/x")`, its template form, require.resolve and import() of such paths are compiled instead of loaded from disk. - fs.stat of a real path does not ask the embedded file graph first. - Module variables whose every read compares with undefined are not filled at the start of each VM. In-place executables look paths up in sorted lists in the image instead of building hash maps at the first resolve. - After an edit, `bun run --aot` uses the incremental check only for programs with at least 1 MiB of their own TypeScript. The type check brings its own declaration of `bun:test`. Plain Bun: - bmalloc is compiled with USE_EXTERNAL_MIMALLOC when WebKit is built from source, so idle threads return memory again. - new Bun.CookieMap() of a Proxy, and the keep-alive count after a collection inside spawnSync, behave as before this branch. Tests: microbenchmarks for SQL and loops beside the issue tracker, build-time limits for wide unions, frozen arrays under the JIT, forwarded calls.
… many fixes - `--aot` is no longer refused by platform. The list of tried platforms and its feature flag are gone, and the Rust builds for Windows, FreeBSD, musl and Android. - Each file is checked under the tsconfig.json that governs it. A test file that is refused stays in the check, so the order and names of test files no longer change what the others report. - `x as T` converts a primitive only where all of T is made of primitive types. - Values from outside are no longer refused through inferred types: arithmetic, containers, generators, promise callbacks, generic calls. - Type checking no longer blows up on generic types that grow several ways. - `bun build --dts` agrees with tsc on more declarations, and `--aot` programs take a package's types from its typed file. - Direct calls to function fields, strings built in one buffer, map().join() fused into one loop. - WEBKIT_VERSION names the preview build of oven-sh/WebKit#757.
Also since the last commit: - A plan for building a string in one buffer that does not verify is dropped instead of stopping the build. - An untyped subclass of a class with private methods can call the inherited private methods. - Request, Response, Blob, URL, URLSearchParams and Headers prototypes are locked under --aot. - Built-ins called with an optional argument that may be undefined stay inline. - WEBKIT_VERSION names the newer preview build of oven-sh/WebKit#757.
- Object.hasOwn of an optional field keeps the caller's registers on x86-64. - `record["toString"]` on a Record reads the record's own entry. - `words[0] + 1` on an empty string[] gives NaN instead of a TypeError. - WEBKIT_VERSION names the preview build cut from the same source.
… SHA-1 in the baseline check - The resolver skipped opening a folder it already had entries for and passed on an invalid descriptor. `bun run <file>` beside a node_modules folder then panicked in debug and ASAN builds. - WTF's SHA-1 uses the SHA extensions behind a CPUID check, so it goes on the x64 allowlist of verify-baseline.
Brings in main up to 017b243, the SQL rewrite included, and what landed on the branch since the last merge: - A string-literal-union field widened to string compared wrongly with a literal in compiled code. - `new URL(x)` that is only read for its pathname or search parameters is not allocated. - `await f()` of an async function in the same program needs no promise. - JSON.stringify writes typed objects by their layout wherever they turn up. - `[...a]` of a large array is one copy. - process.nextTick in a module's first turn runs in plain Bun's order. - --aot-deny, --aot-warn, --aot-allow and a baseline file for AoT diagnostics. - The build fails when the front end and the engine have different built-in tables, and the run-time message names both. - WEBKIT_VERSION names the preview build cut from the same source.
- Only the bundle's files of a typed dependency decide whether it is compiled typed.
- The checker reads the same tsconfig.json as the transpiler under bun test and bun run.
- --aot-unchecked-casts: `as` and `!` check nothing (off by default).
- Windows: compiled code sees native paths in __filename, __dirname and require.resolve.
- new Response(body, {..}) and Response.json(value, {..}) with a literal init are one native call.
- spyOn refuses a locked built-in in every compiled executable.
- Shell completions list the --aot flags.
- JSON.parse(text) is parsed by code compiled for the type the value flows to. - A generic record entering a union skips the parts it cannot be assigned to. - A built-in module marks no layout where the operand's type says nothing. - --aot-unchecked-casts stays out of built-in modules. - The record a method is inherited from may be any object. - Tests: CR LF in the harness on Windows, perf_event_open's number on arm64, shell completions, the docs test.
test/aot takes several times as long as the rest of test/, and its files had no entry in the durations table, so ordinary shards ran into the time limit. - Each platform gets a test-aot step; the test-bun shards leave test/aot out. - The number of shards comes from test/expected-durations.json. - A pull request that does not touch the compiler runs a tenth of the programs, on two Linux lanes. - The serialized bytecode snapshot is updated.
The tree is unchanged; the sources are formatted in one later change.
- node:http's request and response records have no field that can be absent. - Array.prototype is no array for options that take one. - Frames below map, forEach and the like keep getFunction(). - Plain --bytecode executables embed no first-tick modules. - The plain checker joins no surrogate halves. - A matcher that waits for a promise gives up at the test's deadline. - @ts-expect-error and @ts-ignore silence the --aot rules on their line. - bun check --aot takes JSX and decorator settings per file, as the build does. - bun build --dts writes typed files for more projects.
The step that generates the pipeline has no test/ folder, so reading test/expected-durations.json from disk stopped it. It now reads the table with git show and falls back to fixed shard counts; without a file list from the API it asks git diff whether the compiler is touched. Also: socket-retention allows three sockets, as its sibling does on Windows, and eighteen slow tests leave the parallel batch.
A missing table, text that is not JSON or a table without aot/ lines gives fixed shard counts; git calls have a time limit; the file is in Prettier's layout.
The tree is unchanged; the sources are formatted in one later change.
- --aot-explain reports each cause of untyped or tested code once, ranked by cost. - int32 is proved at build time (TS100031 to TS100034); nothing is tested at run time. - bun check --aot follows the build for standard decorators, numeric JSX keys and entry points under several tsconfig files. - Typed node:http is taken out again. - !!x and Boolean(x) convert a missing element; a value that may be missing keeps its doubt through arithmetic. - Windows: virtual modules of plugins, paths in diagnostics. - clippy, source lints, a leak in Program::release(). - Rust crates overlap again in rebuilds.
The tree is unchanged; the sources are formatted in one later change.
…er --aot-explain - A request body's UTF-8 bytes go straight to the JSON parser. - new Response(res.body, res) is one native call and makes no ReadableStream. - --aot-explain puts causes that must be fixed together into one row and groups accesses by name under their variable. - The first native error of the Postgres or MySQL client no longer aborts a compiled executable. - Each entry point gets its own import.meta. - A call is no longer reported as "always throws" because an unrelated class has a method of the same name. - A function declared in one file and stored as a method in another is not refused on an object that inherits from a typed one. - bun check --aot reports what the build reports for a package's typed version. - Lint, clippy and type errors fixed; test shards sized from recorded durations.
The records follow the compiler changes of the last hour; no product code changes.
The tree is unchanged; the sources are formatted in one later change.
…age, `bun:wrap` is compiled from the text that `bun run` evaluates, and the programs that ask the jsc shell are judged in a unit of their own [skip size check]
- "bun:main" is a module of the image: a second helper module beside "bun:wrap", an ES module without exports that is compiled with a program that names it. process.getBuiltinModule() of an ES helper module answers undefined.
- A data: URL that is imported with a type attribute (json, jsonc, json5, toml, yaml, xml, text) is a data module of the image that holds the decoded bytes, decoded as `bun run` decodes them. Data that does not parse stops the build, as a file's does.
- The compiler reads for "bun:wrap" the text that `bun run` evaluates: one helper module under the one name, whose names, lines and columns are the text's own. Bun's build makes no source map beside that text.
- Modules: a store to module.children counts as a read of it does, and what stands there is shown a required file at every require() that returns (showChildren() in BunCompiledModules.cpp).
- In a compile build a .cjs file that names `await` outside every function, or that does not parse with the operator there, is parsed again with `await` as a name, and that reading is taken if it parses.
- Whether the value of an enum's member is known at a place goes by the order in which the transpiler visits: the enums of a list of statements ahead of the list's other statements (is_member_visited_before()).
- The key of `const kX = Symbol("kX")` asks the same rule for its position as the call does, of the file that holds the call, so a `[kX]` field of a library class is declared under the key that is stored to.
- node:http: the three guards of the short roads ask every prototype between the socket and the owner of the accessor, and a compiled executable asks the class first ($findsDeclaredMember()). One internal key of incoming messages is made by Symbol.for().
- The 22 functions of node:path get their own `name` when it is looked for.
- Stack frames: the names of the functions that $bindgen hands out are written into the table, a require() of a file of the program names the function of the host at its site, and the body of a library module is listed under the name of the module.
- Stack frames: a variable that is used once and folds with a literal is taken for the literal that is printed, and a computed operator stands where it is written. The sums of source_positions_in_bundle() wrap.
- The front end puts the later half of an accessor of an object literal right behind the first definition of its name. One program.
- The table of built-ins lists the static members of seven more classes of the host (own-properties.txt), so printing a class of the host brings in no library module. Three tests.
- What text evaluated in the body of a sloppy function declares is kept in an environment of its own inside the parameters' also beside a rest parameter or a pattern (FunctionFlags::HAS_REST_PATTERN_OR_DEFAULT); a name that the body's own code declares too stays one binding with the parameter. One program, and its row of the docs says so.
- A receiver that is itself a member bound to a namespace is that namespace (lower_namespace_receiver()), so the root of `require(..).outer.f()` is evaluated once. One program, and one more seed of the generator for namespaces is judged.
- Docs: rows for a class below Proxy that goes with an export nothing names, data in a data: URL that does not parse, and the name of a bound function whose target has its name from a computed key.
- Docs: a row for `Object.isExtensible(ns)` and `Object.isSealed(ns)` of what require() returns for an ES module. Two programs.
- Docs: a row for `await import("bun:main")` at the top level of the entry point or of a file that it imports. Two programs.
- Docs: rows for a closure that runs while another closure of its function gets a displayName, and for the message of a pattern that stores to a variable ahead of its declaration. Three programs.
- Tests: a new unit hands every program whose text names a function of the jsc shell to the shell, and the key "onlyInShell" of a program's .json takes the place of a mark beside it. The shell's own functions are known to the compile that the unit makes, twelve names of operations are today's, and the programs on JSON.stringify count what is left to the engine's own writer. Some forty programs are judged that were not.
- Tests: programs for "bun:main", data: URLs, the functions that "bun:wrap" exports, the list of children, `await` as a name in a .cjs file, enums beside a namespace, accessors added between a socket and their owner, native functions of the library and bodies of library modules in frames, frames between a file that require() runs and the code that called it, and stack positions behind variables used once.
- Tests: programs for what the engine now does: function objects of top-level functions, classes below mixins, bound functions and proxies that are constructed for each other, a base constructor that returns an object declared as something else (73 programs), five more programs in which a built-in constructs, members of Bun named late (over sixty rows), loaders read off constants and awaited imports, built-in modules in the levels and the jobs of a load, names of the functions of node:path, targets of bound functions with a display name, NaNs written into a Float16 view, reads through undefined at the end of a function, and four programs that are built with every pass checked or in a validating build.
- Tests: programs and pins for stores by key into new objects, whole numbers that evaluated text reads, pieces of a text as keys, functions with members of their own, names of closures over many variables, one name by key between collections, typed spreads of instances and of options over defaults, a host function called out of a record, an error of a built-in that is caught, and calls by value. Four programs of untyped speed are judged that were not.
- Tests: a short loop beside hotter code gets a path of its own, what a build sends to the engine is printed and read back, what the host reads of a receiver that it refuses, one more pair in knowing-more-adds-no-code, and a program on members of process joins those that print as `bun run` under every schedule. The script of the shell tests walks the last stub of the map too.
- Tests: under --aot-validate a large program is a build of its own that runs alone, six probes of node:http give their one fetch twenty seconds, a clock of untyped speed takes turns until its bound holds, and the Swift profile of generated programs gets scenes in which a built-in stores into an object that the program holds.
- Tests: three programs on stack frames of functions that get a display name in a loop, a row for the new guard, and lower pins for one idiom.
- Tests: a generator for closures and stores where a program does not run in the order of its text.
- Tests: two programs on the keys of six objects in a validating build and in a build without what flow finds; fifteen seeds of the keys of built-in objects are judged.
- Tests: a generator for namespaces and exports objects that are reached through files that hand them on.
- Tests: every field that a layout declares under a created symbol has the key of a call of Symbol in its module.
- Tests: a generator for objects that are made for another class than the one that runs.
- Tests: generated graphs beside a chain of jobs.
- Tests: three programs of one line print the data of json() and bring in no more than the line without the print.
- Tests: five programs that count operations count today's names under the same bounds.
- Tests: a program on stack frames of native functions that refuse `new`.
- Tests: a module that has run keeps no record (five shapes), and a program that asks for a module again after every load has settled.
- Tests: two pairs of equivalent forms for a method that is read, tested and called.
- The lists of scripts/verify-baseline-static name IndexOfUntidySlashOrNonAsciiImpl, which is dispatched at run time as IndexOfUntidySlashImpl is. is_ascii() of node_path reads each cast pointer in its own expression.
- WebKit: 2ddacdef.
…itions of library modules take a fifth of the bytes, and a JavaScript file of the types program reads declaration files for its imports [skip size check] - In a compile build a constant key in brackets that is a valid name (`x["name"]`, `x?.["name"]`, a template without substitutions) is parsed as the member name, with one bit that says how it was written. Only the type checker's rules for .ts files, the replacements of process.env and --define, and the columns and texts of errors ask that bit. A property access on `any` in the .js of a build takes the flow type. - The lines and columns of frames in library modules come from a fifth of the bytes: the front end reads the written and the evaluated text of a module side by side, word by word, and Bun's build writes down only the words for which that goes astray. The list of the archive's files is compressed, and each module's text is compressed with its evaluated text as prefix. - A JavaScript file that the types program holds (a .ts file imports it under allowJs) answers its imports as the type checker does: a declaration file beside the code, a package's types, @types, `declare module`. A JavaScript file that only runs sees what it runs with. - The second argument of every import() of a constant specifier is lowered as a value and handed to the loader, so options and attributes that are no object reject as under `bun run`. - Modules: the check of a graph passes over an import whose exporter is left out of the program, and a file whose load does not succeed is never free of side effects. - Modules: `ns.name` of a CommonJS file that may be seen half evaluated goes by the file's object, and its face captures at the link, as for a named import. - The look for a ring of parents above a constructor function follows a class's `extends` too. - The function around a file marked `// @Bun @bun-cjs` is found however it is formatted. - An enum's initializer that reads a member of an enum which is only declared passes resolve_constant_entity() as a member of another file does. - node:http: the two short arms of the constructor of a ServerResponse make every store that Node.js makes, in its order, and the three guards of the short roads are a few tests and one call in an arm marked unlikely. - The table of built-ins lists all members of navigator and of five more prototype objects of the host, and the three usage records of process are plain data, so printing such a value brings in no library module. - The first thread reserves its pages by a call of its own (tryReservePagesForFirstThread()). - Stack frames: a read of what an import binds leaves a record also where nobody takes the value, a name that is printed as its value leaves none, what the transpiler drops of an unused expression is decided at the first visit, a name in front of the `]` of a list printed over several lines stands where it is written, and a call that loads a module stands where any call of its callee does. In text that runs as written nothing is printed in place of a name. - Stack frames: an update under a key that is written as an object stands at the object it reads, `undefined`, `NaN` and `Infinity` leave a record in text that runs as written, a module of src/js/thirdparty is shown under the name of its file, and a require() of a library module names the function of the host at its site. - Stack frames: is_list_printed_on_one_line() takes a gap whose start lies behind its end for one that holds no line break. - Docs: rows for a `var` with the name of a parameter in a generator or an async function, a .mjs file that only calls require(), a getter that a literal has twice, `this` at the top of a CommonJS file as evaluated text reads it, a function declared under a key in brackets, the type of an import held in a variable, and `x = f() + ""` where f() returns a symbol. A paragraph of internals.mdx on declaration files. - Tests: eleven generators: what stands on the prototypes when an instance is made, members of built-in classes replaced for one value, what nobody names and one road still sees, who is called when the name of a function is stored to, what a suspended function finds in its variables, objects that leave their function by one road, two names for one thing, values that cross between files under types that say something else, typed fields and lists filled by another file, keys and JSON of an object that one road has altered, and variables of a file that has not run to its end. Five seeds are judged that were not. - Tests: the unit for programs that ask the jsc shell checks itself: a program that names a hook and is never told more than nothing is red. Some seventy programs count every call of compiled code into the run time, or today's names, under the bounds they had; lower bounds on work that is no longer done are upper bounds at today's count; thirteen lines leave the list of the shell tests. - Tests: the same code in every spelling of a member name, a test that reads who asks how a name is written, JavaScript that hands on what a declaration file declares, names of CommonJS files handed on by files that nobody takes them from, eleven programs on namespaces of files that are still running, prototypes that would close a ring, options of import(), accessors under names that a response stores, and a dozen programs on stack positions and frames. - Tests: programs for what the engine now does: static fields read through classes below, constructions by Reflect.construct(), sums past 32 bits in a field, a typed parse that throws and members written twice, a loader stored on an object that has escaped, a bare name stored on the global object, a word read in front of a call that makes a text, Workers within a limit, an accessor under an index, functions made once and renamed, functions written as arguments of array methods that a method of the receiver renames, and small functions of one factory one of which gets a display name. - Tests: three new shapes of build-scaling, pins for copies that nobody keeps, lower pins for awaits of fulfilled promises and for Object.assign() into an empty literal, the two pins of one idiom where they stood ahead of the direct call, five more one-line programs within their bounds, and a file of a graph that requires part of the graph and throws. Builds and runs of joined programs stand under the limit that run-programs.ts has, and only what the clock ended is left to another run. The batch driver of the Swift profile can cut a program into files. - Tests: three checks of the shape of code are judged again in the shell tests. - Tests: function objects of top-level functions with all code hot, and a list of top-level functions reads its storage once. - Tests: one check of an entry's size is listed again in the shell tests. - Tests: ten more programs on accessors under an index. - Tests: 22 more forms of exceptions that host functions make above compiled functions. - Tests: a program that reads process.getBuiltinModule out of a table under a key made at run time is held against `bun run`. - Tests: a generator for one thing under two declared types that is read, stored to and read again. - Tests: a generator for members that are read beside an accessor which is defined under another key. - Tests: a component under the React Compiler that holds lists of spreads, and four tests ask for library modules under the names that an executable lists them by. - Docs: three rows of the compatibility page are reworded. - WebKit: b2cda551.
… blanks and comments move no code, and 28 more families of generated programs [skip size check] - strictNullChecks of a file is that of the nearest tsconfig.json: the compiled TypeScript files whose tsconfig.json says the opposite of the entry point's are checked and lowered by a program of their own, as typed packages are, and each side takes the declared types of the other's files for predictions. A build without such a file makes no further program. - Blanks and comments move no code: the wrapper of a file marked `// @Bun @bun-cjs` is known with comments between its tokens too, and the module of an evaluated text is named by the number of the text among the texts of its file. - A property access on `any` in the .js of a build takes no flow type, in either spelling of the name. - The name of a member that is written as a text goes nowhere in named_loads.rs, also where the parent of the literal is the member access. - An import that names an ES module which hands the names of a CommonJS file on with `export *` counts as an import of that CommonJS file (ExportTables::find_commonjs_exporter()), so a name that is a getter onto another CommonJS file has its copy. - T::is_modifier() reads one table of a byte a token, as binary_precedence() does. - Lints: three searches for a byte go through bun_core::strings, the options of zstdCompressSync() in builtins-manifest.ts have a type of their own, and answer_types_question_in_types_program() takes `Loaded` by value. - Tests: eighteen generators: host functions that throw in code which built-ins call (two), half-made things read where a throw is caught, declarations that describe another module than the one that runs, objects that travel between files under types that do not hold them, a number that outgrows the kind it began with, accessors of a literal in any order, copies and listings of a value that has more than its declared type says, private names laid on objects that the class did not make, modules asked for again after they have run, several declarations for one import, symbols made at one place of the text, awaits of what is already settled, closures that leave their function by one road, a short loop that reads what one rare turn alters, calls in the tail of a function that a built-in calls, elements of a typed list that are not there, and programs that one compiler option accepts or refuses. One family is wider, and four seeds are judged that were not. - Tests: the same code wherever the text stands (every file sown with blanks, comments and lines), strictNullChecks by the nearest tsconfig.json, pointers into what a cell owns, and `hello world maps no more bytes than it did` with and without --trim. - Tests: programs for what the engine now does: members of the object that instances were put below, functions written as arguments of array methods while others of them get a display name, the Promise constructor constructed by value, a read through a proxy, 21 programs in which a built-in calls a function, methods of classes with private members compared however they are read, own keys of a type with fields under symbols, a constructor function with more comment than code, and the channel of process where the receiver lists process. Two programs of untyped speed are judged that were not. - Tests: pins for eight more copies that nobody keeps and for two idioms of arrows handed to array methods. Programs that ask the jsc shell count every call into the run time under the bounds they had (pushes in a counted loop, literals over four values, large outputs of JSON.stringify(), strings of every length), a COUNTER line of the shell tests takes the name of an operation, and two more lines leave their list. - Tests: five files of ir/lower ask for `[isBare, isCallOfRequire]`, the stored output for parameters of async functions that throw holds both forms, and the stored errors for a name in brackets hold each error once. The splitter and the batch driver of the Swift profile move constants and variables, write JSDoc and declarations of their own, and let hooks end in errors that no throw statement raises. - Tests: the program on early ways out of JSON.stringify() counts every call into the run time. - Tests: the program on hasOwnProperty() under any key counts every call into the run time under its two bounds. - Tests: the programs and .ir files on a loader stored on an object that has escaped go, and the program that reads process.getBuiltinModule out of a table has its stored output. - Tests: a generator for typings of built-in modules and globals that say something else. - Tests: the splitter of the Swift profile lays CommonJS files whose names are getters above a part. - Tests: in the program on parsed values that come again one round of each kind goes ahead of the count. - Tests: ten rows of two stored outputs on class objects go down to the counts of today. - Tests: seventeen programs on what an object hands a built-in. - Tests: four more generators: tables at the top of a file that one road alters, JSON texts of many sizes written one after another and inside each other, classes that one function makes below whatever it is handed, and a function that one odd road calls with what its callers never hand it. - Tests: more programs for what the engine now does: compiled code reads and calls the get trap of a proxy, a base constructor makes the object that new.target selects, thirty classes in a row, function objects of fields that are called before anything has read them, a parsed list that begins with a text, a literal with a lone setter that is assigned a rest object or a spread, a view that nobody names again, and a custom accessor under a key made at run time. - Tests: seven programs on names of CommonJS files through `export *`, eight .ir files for the two rules of flow under all four schedules, and a shape of build-scaling for a row of classes with its bound lowered once. - Tests: the test of one internal key of node:http messages says what a program sees of the key. The batch driver and the splitter of the Swift profile leave two kinds of programs out. - Tests: a program in a validating build in which a socket connects to a name that a function of the program looks up. - Tests: two more generators: an object written in a call and what the callee does with it, and what is walked is altered while it is walked. - Tests: a promise that takes the prototype which new.target has now, the `has` and `set` traps of a proxy, every handler, target, receiver, access and key of a proxy, handlers and targets that are altered between two accesses, spreads in a row over sources of every kind (two programs), 34 programs on parsed lists that hold what is no number, and eleven on lists that hold an undefined. Three programs that run under a small heap are built alone. - Tests: a generator for questions that the kind a value is used as would answer by itself. - Tests: a generator for names that CommonJS files hand on as compilers emit them (tsc, Babel, swc, esbuild and by hand), with declaration files that are right, wrong, invalid or missing, through barrels and cycles. - Tests: 31 programs on lone setters beside copies that hold their names, the stored verdict of one generated case says "as bun run", and the test of names read from a loaded barrel says for `lib?.['b']` what the bundler loads. - A name that is imported from a CommonJS file is what the file held when it was loaded: where its getter answers a variable of an ES module that is stored to later, or a name that the other file lacks, the importer gets a copy of the file's own name, which is filled from what the getter returns. `all.x` of a getter that is not enumerable is left to the namespace object. A getter that is not enumerable gets no copy. One row of the docs, eight programs. - That a member's name is written in brackets stands in the Dot node itself, so checked_kind() reads no table at a match. - The table of built-ins says that a read of PerformanceObserver.supportedEntryTypes allocates, and the tool that compares built-ins takes two looks at a property that answers a new array each time for no store. - Tests: five programs on what `new` of a derived class by value makes, and one more generator. - Tests: three marks of one loop against another go down to what the loops take. - An import that is bound past a getter of a CommonJS file also reaches the file that holds the getter (reach_files_between()), also through ES files that take the name by `export *`, so a package whose package.json says "sideEffects": false runs the require() that the name is read through. One program of 31 files. - binding_position() and is_constant_zero() read one memo by SymbolId, entries_of() counts its run, and a stored answer of the checker is handed back without ask(). - Tests: a generator for names that are defined on exports nearly as compilers define them (602 seeds), 252 more seeds for names that CommonJS files hand on, and three programs on pointers of bun:ffi read their buffer at the end. - A getter of a CommonJS file that returns `below.default` stands for the member named `default` of the file below, of which the file above takes a copy, not for what an import of the default would get. A marked .cjs file in a package of "type": "module" and a listed getter named `default` of a file without the mark hand on the whole exports. Five programs. - The options of a file that the whole program answers for are those of the nearest tsconfig.json: one table (ProgramWideOptions in lower_stage.rs: strictNullChecks, strictFunctionTypes, strictBindCallApply, strictBuiltinIteratorReturn, exactOptionalPropertyTypes, lib, allowJs, maxNodeModuleJsDepth, resolveJsonModule, allowArbitraryExtensions) and one rule: files that answer a row otherwise than the entry point get a program of their own, and files that answer alike share it. A build without such a file makes no further program. - Stack frames: `yield*` takes the position that `...` takes, and what `bun run` removes of a statement is removed by one table (fold/removed_by_bun_run.rs). - Docs: a row for `import` of a package whose package.json has both "module" and "main". - Tests: seven programs on variables that are read ahead of a loop, two on a function that suspends and tests a parameter first, two texts built side by side under a bound, compiler options by the nearest tsconfig.json (30 tests), three seeds of stack positions across files are judged that were not, and one program on collections is built alone. - WebKit: fb6a84eb.
…not checked, names behind getters of CommonJS files are read at the link, and Error.captureStackTrace() walks only the frames it shows [skip size check]
- What TypeScript's checker calls grammar is reported in files that are not checked and in code that is not reached too (new early_errors/typescript_syntax.rs; bind/runtime/merged_declarations.rs, errors_grammar_modifiers.rs, grammarchecks.rs): `export { "a" }`, a `this` parameter of an arrow function or one that is not the first, modifiers and decorators where none is taken, a namespace, `import =` or `export =` inside a block, enum members with numeric, computed, private or repeated names, `let x!` without a type. Of 3,474 statements that only TypeScript has, 490 more are refused as `bun run` refuses them, and none more is refused that it runs.
- `import.defer(...)` is refused by a build with --aot at the place where `bun run` refuses it (TS17012).
- CommonJS: an ES importer of a name behind a getter that only returns a binding of its own file gets a copy of what the getter answered where the file may be linked while its body runs and other code runs ahead of what fills the binding (Alias::is_seen_unfilled, is_filled_first(), read_name_at_link()). A copy of a binding that nothing has filled reads undefined.
- CommonJS: a file keeps its object for importers only where a link can come while its body runs (EvaluationOrder::half_at_link()). A body that runs no code but its own is seen half evaluated by nobody (Scan::runs_nothing_else()).
- CommonJS: `ns.x` of a getter that is not enumerable is left to the namespace object also where the getter returns a member of a JSON file or of a built-in module.
- CommonJS: where another file stores `__esModule` of a file, the build forgets what the text of that file says of the mark and binds once more (FileImports::stored_markers, CommonJsTexts::forget_markers()), and the run decides.
- `export { c } from` a file that has two or more `export *` over modules without a table is a binding to everybody above it (Resolution::LiveName): the name stands on the namespace object and is found through one more `export *`.
- Object literals: the later half of an accessor joins the first half only where every name it copies has settled by then (put_halves_of_accessors_side_by_side()). The scope walk asks the same function which halves join (note_halves_of_accessors()), so a name that is stored between the two halves is captured by environment.
- The key of a created symbol holds the number of its call among the calls of its file (`call_number` in place of the two positions of the callee), and is_file_shown_without_source_map() goes.
- Error.captureStackTrace(): Bun's filter and the search for the caller run inside the engine's one walk, which ends at the last frame shown (ErrorStackTrace.cpp). A walk that ended early is repeated whole only where frames of suspended async functions ask for it, and names of frames that did not match are remembered by function.
- Stack frames in text that runs as it is written: a function is listed at its end while resources are disposed (find_end_of_function()), a comparison sets its position behind the second look at its operands, nothing is joined where no transpiler prints, and only a dot is the form of Reflect.construct (is_reflect_construct_syntax(), skip_unprinted_syntax()).
- Stack frames: where the transpiler drops everything round a `require` that the program has not declared, the call stands where the written callee begins (find_start_of_require_printed_alone()).
- Stack frames: Object.fromEntries() over written pairs names the built-in at the definition under a converted key, and a conversion ahead of a call that stays a tail call is marked as standing in tail position.
- Stack frames in library modules: a module's second text (src/js/ahead-of-time) gets positions too. A line that the two texts share stands for that line, and a comment `/* as: .. */` ahead of a word quotes the first text up to the word it stands for (bundled-positions.ts, bundle-modules.ts). A native function that only a second text makes is hidden (is_hidden_in_stack_traces in generate-js2native.ts), and primordials.js has a function makeSafe around it.
- A realm that the program creates runs the modules that come with the runtime from their text: compiledModuleForRequest() and three questions of InternalModuleRegistry.cpp take the realm.
- node:http: the prototype of a server's socket lists in an executable what it lists under `bun run`. The function is a field of the socket under the private name $resumeUnlessFlowing, stored once a connection and only when compiled ahead of time.
- An --aot build on a runtime that can be trimmed copies the executable it writes block by block and lets go of each block on the two sides (fill_behind_end(), let_go_of_pages(), SpentMapping in executable_file.rs).
- Build time: the statement around a name is remembered by expression (StatementsAround in substitution.rs), and Queries::ask() ends a question with one call, end_question().
- A build whose compiler stops prints `error: internal compiler error: <reason>` with the function, the file and the pass it stopped in, and ends with exit code 1 (stopped_builds.rs; docs/compiler/debugging.mdx).
- Unused constructions that --minify-syntax removes, such as `new Set([1, 2])`, are removed by --aot without the flag (RemovableOptions::minifies_syntax goes).
- Lints: seven searches for bytes in emit/positions.rs and load/bundled_commonjs.rs and one in typescript_syntax.rs go through bun_core::strings.
- lint.yml: the step that runs the tests which read the engine's text ends where grep finds no file. update-test-durations.mjs runs under bun.
- Docs (compatibility.mdx): new rows for the namespace object of an ES module that a CommonJS module has required, closures of one function that are named one by one, a closure that is named between its throw and the read of `stack`, require() of modules that an import() is loading (two), `__esModule` stored by a file that is imported later, and `function f(a, this) {}`. A paragraph on the text of a class with a parameter property. The row on the symbols of `req.socket` and one of the two cases of `export *` go.
- internal-for-testing.ts: membersUnderNamesOfTheRuntime(), for a test of members under private names of the runtime.
- Tests: seven generators: the turns in which imports settle (six forms), first imports beside jobs, names handed on by files that are read while they load, names handed on in packages whose package.json says more, the member named `default` between CommonJS files and ES modules, what require() answers for an ES module, and one built-in asked at two places that do different things with its answer.
- Tests: generated keys of objects that node modules hand out, and objects handed to a coroutine that alters them.
- Tests: new programs in programs/modules: import() in a job on a module that only exports, CommonJS files that require the root of a graph which imports them, a CommonJS file that requires the entry point inside a require() of another graph, deferred namespace objects, a ShadowRealm that imports the modules of the runtime, exports under names that read as numbers (115 programs), own properties of what a CommonJS file exports (16 programs).
- Tests: new programs in programs/errors on stack frames: functions that get a name between where they are made and where they are called, built-ins between a trap and the caller, bound functions that are constructed, a `require` behind operands that are dropped.
- Tests: programs for what the engine now does: a proxy without traps, Reflect.get() and super[key] with a receiver, custom accessors of built-ins read off primitives, elements added to compiled objects, flag getters of classes below RegExp, a list literal whose elements a closure stores between, a literal that lists a member of what a declared function made, a number field of an object that goes away behind a catch, classes constructed by value in rotation.
- Tests: a program that makes no proxy holds no code for traps, an operation without a value stops the build, members under names of the runtime, and a measure of what an empty build holds resident.
- Tests: five new shapes of build-scaling for rows of classes, with their bounds, and the bounds of older shapes go down. Pins for spreads that are kept go down to what they take now.
- Tests: minifying-first-saves-no-code holds what --aot compiles from a source against what it compiles from the same source minified, in code bytes, operations and calls into the run time (1,570 cases, on trial).
- Tests: unit tests of the front end: six on CommonJS exports, three on export tables, four on what modules reach, one on comments in positions, one on blocks that are let go, and those that spell the words of a Call hold `callNumber`.
- WebKit: 4d107d00.
….build takes aotDisable and aotHeat, and a long chain of constants builds in linear time [skip size check]
- Constants across files: a `const` that another file exports is folded in the files that import it, before the graph is closed, until no file's answers differ: `import { x }`, the default, a renamed name, `export { x } from`, `export *`, `import * as ns` with `ns.x` and `ns["x"]`, `export * as`, and a constant computed from constants of a third file (new src/sema/fold/folder_imports.rs and src/sema/program/code_walk/imported_constants.rs; ImportedName and ImportedConstant in hir.rs; FileAnalysis::imported_names). A file whose answers differ is folded once more without a read, a parse or a bind (fold_code_file_again(), fold_file_again()).
- Constants across files: the value is folded as a `const` of the file itself is. The read stays where it is written, with its test for the dead zone and its place in a stack trace (Effects::DeadZoneCheck), and what it decides is decided. `let`, `var`, a name that is stored again, a CommonJS file, a getter, `import defer`, a circle of `export *` and a name that the module does not export are no constants.
- Constants across files: with `export const debug = false` in ./flags, `import { debug } from "./flags"; if (debug) require("node:http")` compiles to 4 functions and 130 bytes of code.
- Bun.build takes `--aot-disable` and `--aot-heat`: `compile: { aot: true, aotDisable: ["pass:InlineCalls", "pass:PlaceTypeTests"], aotHeat: "everything-is-cold" }`, and aotDisable also as one string with commas. The words go the way of the flags (read_developer_words() in JSBundler.rs, apply_developer_word() in compile_options.rs), so the same words build the same executable. An unknown name throws `compile.aotDisable: unknown switch nonsense`, and without `aot: true` the call throws `compile.aotDisable requires compile.aot: true`. bun.d.ts has aotDisable, aotHeat and the type AotHeat.
- Modules: a CommonJS file that requires an ES module which imports it back, and then throws where nobody gets the error, is answered at every later require() with the namespace object of that import, as under `bun run`. find_loads_seen_by_program() finds such files (may_be_imported_while_it_runs: an ES module imports the file, both lie in one component of the requests, and a require() leads back), EvaluationOrder::can_evaluate() leaves a require() of one to the run time, and link/module_records.rs sets ModuleFlags::MAY_BE_IMPORTED_WHILE_IT_RUNS.
- The table of built-ins: `isTrusted` is an own name of every Event (namesDefinedOnNewInstances and typesOfNamesDefinedOnNewInstances in web-constructors.builtins.ts), so `function get(o) { return o.isTrusted; }` reads it off an event that it is handed.
- The table of built-ins: bun:test and its expect(), Bun.jest, HTMLRewriter and drainMicrotasks() of bun:jsc have the mark RunsWaitingJobs (marks.builtins.ts). A program that takes hold of one of them counts a module that an import() loads as one that may run while another module runs.
- `bun build --compile --aot --asset <a file or folder whose own name is not UTF-8>` embeds the asset under the name with U+FFFD in place of each such byte, the name that a build without --aot gives it. One function makes the name in all three places (to_embedded_name() in build_command.rs), and graph_path() makes the whole path with it. Two assets that differ only in such bytes end the build with `error: asset .. collides with another embedded file at ..`, also with --compile-in-place.
- node:http: the bits that headerBits of an exchange holds are numbered in one module (HEADER_DATE to HEADER_SPILLED in src/js/internal/http.ts), and the two modules that set and test them read them from there. The compiler folds them, so an executable holds the same code bytes.
- Error.captureStackTrace(): ErrorStackTrace.cpp makes the name of the caller at the first frame that is not the caller's by identity (nameOfCaller), and a function that is remembered under another name is asked nothing more.
- Build time: a file that only the `include` of a tsconfig brings in is read for the import and export statements at its head (Options::reads_module_statements_alone, is_at_module_statement()). At the first other statement the rest of the text is searched for five words (may_reach_beyond_the_module() in skipped_blocks.rs), and where none is found the text ends there for the parser. 300 compiled files beside 6,000 files that nobody imports build in 4.49 G instructions on one thread.
- Build time: Files::free_tree() leaves alone a module that the load left as a stub, and `/node_modules/` is looked for ahead of the host's question whether a file is JavaScript.
- Build time: whether the transpiler prints the value of a constant in place of its name is asked once a declaration (ConstantsNamedByValue in substitution.rs), and find_literal_visited_again() remembers its answer by the only use of the variable. `const n0 = "node:path"; const n1 = n0; ..; require(nN)` builds in 0.37 s up to 3,200 constants and in 0.74 s at 100,000.
- Build time: StatementsAround is a table by expression, one word each, made at the first question of a file.
- Size: the part of get_spelling_suggestion() that depends on no type parameter stands once (runes_of(), distance_of_candidate() in regexp_scanner.rs).
- Lints: the generic grammar_error_in_modifiers() only turns its argument into a Node, grammar_error_in_modifiers_of_node() chooses the class and find_grammar_error_in_modifiers() holds the body. log_message.rs boxes what to_native() answers without a slice of it.
- src/sema/standalone/native_libraries.rs: BunString__fromUTF16 and BunString__fromUTF16ToLatin1 have weak stand-ins beside their two neighbors, so the test program of bun_bundler links.
- Docs: compatibility.mdx has a paragraph under the module cache on the CommonJS module that throws behind a require() of an ES module which imports it back. internals.mdx says that an exported `const` is folded in its importers, and lists `--aot-heat` and the variant of the tests that builds every function cold without flow results. executables.mdx, debugging.mdx and explain.mdx name aotDisable and aotHeat.
- Tests, constants across files: 18 programs in programs/modules (cycles, dead zones, a file that threw first, an await in a cycle, `sideEffects: false`, deferred files, exact values), seven unit tests (src/aot/compile/imported_constant_tests.rs), a new IR test lower/modules/imported-constants.ts, and three IR tests import lists in place of numbers and texts so that they hold the reads they are about.
- Tests, Bun.build: bun-build-takes-aot-disable-and-aot-heat.test.ts, the list of keys in test/cli/aot-unknown-flags.test.ts, the fixture of bun-types. variant() of run-programs.ts takes a list of labels, and parts.mts has aot/variant-every-function-cold-and-no-flow-results.
- Tests, modules: programs for a CommonJS file that requires a module which its importer imports behind it, seven on a later require() of a file that threw behind a graph that imports it, three on a module that an import() loads inside a require(), four on calls that run the waiting jobs, one IR test in engine-tests/valueflow/modules and one unit test in src/aot/modules/plan/tests.rs. generated-module-graphs-of-both-kinds-that-import-loads.test.ts loads 40 graphs with import() in four forms.
- Tests, eleven generators in test/aot/fuzz, each with its list of seeds: a loop of the library above a declaration that a method it calls touches, a member between the two halves of an accessor, lists made of a captured variable of another kind, a variable stored to in the middle of an expression that reads it on both sides, objects that lack or mistype a declared member, members named like a constant or a number, a call that is handed something else above the declaration that its usual callee reads, members of what crossed a border under typings that say something else, packages that lie there twice or are reached on two roads, members of what native code made read in another file, and names of the program's first file read by the files that it loads. make() of run-generated.ts may answer `links`.
- Tests, generated: values that enter a suspended body (14,200 programs, 12 in every run), own names and members of what built-ins make, read by name in functions without types, and typed arrays of every kind below any class.
- Tests, the table of built-ins: every class that the global object reaches is constructed and the own names of the instance are held against the table, every row that says that its result is fresh is called and held against itself (built-ins-alone/fresh-results.ts, fresh-results-calls.ts), and a program reads isTrusted of events that it is handed.
- Tests, what is moved ahead of a loop: three generators in test/aot/generate (values that are there only behind a test, callees replaced behind their test, lists changed behind their test), each built once more validated, 54 shaped programs that every run builds in five more ways (what-is-moved-ahead-of-a-loop-cases.ts), and 24 loops over lists and typed arrays with their pins (perf/everyday/loops-over-lists-and-typed-arrays.txt).
- Tests, programs for what the engine now does: classes of one factory constructed in rotation and counted without an entry into the run time, objects of classes that functions make below one base class, 24 programs on a function stored as the prototype of a function, 12 ways to a loader through bind, call and apply, two on bound functions in a closed world, nine on a rejection that is yielded beside a return in a try with a finally, 11 on direct puts from native code, records whose number fields hold undefined or null spread in a row, a list parsed by a type whose literal has a lone setter, stores through a proxy under an index, `in` on a proxy without a `has` trap, three on a loop that calls a host function above a declaration, util._extend() over String.prototype under four schedules of flow, and two for the collector.
- Tests, every program alone: programs-as-separate-entry-points.ts runs in 96 parts and takes a quarter of the programs by the day and the lane. The report of each build shows that each program was compiled by itself, and what may load any module, asks isMainThread, terminates Workers or has a tsconfig.json of its own is built alone on the main thread.
- Tests, build-scaling: two new shapes (functions stored one after another under one name and called there, rows of constants that are each named after the one before), rows of other shapes go down, and a row for what a program of one line takes. What size 0 of a shape takes beyond that row in the same run is left out of the shape's memory, and a build over its budget in memory is measured again (harness/measure-again.ts).
- Tests, stack frames: five idioms in perf/everyday/iteration-and-async.txt with pins, and seven other pins go down. Two programs in programs/errors print a native frame as `native`, without line and column.
- Tests, collections: an environment that forces collections also gets BUN_JSC_useZombieMode=1 (run-programs.ts, fuzz/beds.ts), and under-zombie-mode-a-sweep-overwrites-dead-cells.test.ts holds what the engine does there.
- Tests, minifying-first-saves-no-code: the cases that known-today.ts lists share executables with each other alone, where nothing names the case that stops a build each half gets an executable and is measured, and a case that is larger beside the others is asked again alone. Its numbers are taken alone.
- Tests: embedded-assets.test.ts has two cases for names that are not UTF-8, test/internal/node-http-header-bits.test.ts holds the bits, files-of-the-project-that-are-not-compiled.test.ts has one more case, and src/sema/driver/compile/tests/load.rs has rows for statements behind the head of a file.
- Tests, stored texts: TS1232 is an EarlyError in checker-queries/call-target.programs, three programs whose stored output is what `bun run` prints are held against `bun run` on the spot and their stored outputs go, one line that passes comes off shell/known-failures.txt, and test/js/web/timers/setTimeout.test.js comes off the list of tests that one check of the sanitizer lane leaves out.
- Tests, generated programs: run-generated.ts draws how a program is built among the programs that could share an executable, so the programs of one draw share one.
- Tests, modules: dynamic-imports-settle-after-a-vm-timeout.test.ts holds that 600 pending import() calls settle behind a vm timeout that ends another import().
- Tools in test/aot/fuzz/fuzzilli: run-batch.ts takes --draws, --families and --together, write-scenes-of-every-size.ts has five more kinds of scenes, counters-as-coverage.py compiles with `bun check --aot --aot-report` on one processor, and the new run-scenes-of-large-sizes.ts builds each kind of scene at sizes from 256 to 65,536.
- A package that ships TypeScript under compiler options of its own: a file that the application does not load as code is left out of the package's own program too.
- WebKit: fd4d3155.
Replay the reviewed typed-3 runtime, build, trim, type identity, counters, and embedded-entry fixes; retain CB disk-script and SharedArrayBuffer support, P0 source-loader/onResolve contracts, P7 deterministic evaluated-text names, and P6 runtime/build regressions. Adapt current upstream StringView, source-map and evaluated-text ordinal APIs. Restore the supported global JSON fixture syntax and explicit partial Bun.version declaration. The Darwin SIGBUS fix is already upstream in 8614cd7.
Upstream 5b59847 bypasses source-provider resolution unless has_resolve_plugins is true. The retained provider also resolves literal embedded entry names without user plugins. Keep that existing path admitted when entry_point_sources is nonempty. The existing default/custom entry-name regressions fail with TS2307 before this repair; native rebuilt validation follows the required pre-build branch push.
|
Hi! I'm the It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃 |
b7f5248 to
c3b39ee
Compare
|
Superseded by the canonical upstream integration in #221, landed at 9debcc4. The pre-rewrite ChildProcess fix was ported and integrated through 03db8ba and ad1bbb4, together with the lifecycle repairs needed by the rewritten runtime. Credit to @steipete for the original fix. Actual Execa 10.2.0 acceptance is recorded at https://github.com/openclaw/bun/actions/runs/43210256810; final integration qualification is https://github.com/openclaw/bun/actions/runs/43739822593 and https://github.com/openclaw/bun/actions/runs/43739822507. Existing upstream ownership remains oven-sh#44933; no duplicate upstream PR was opened. Closing the superseded overlapping branch. |
ChildProcessexposes getter-only stdio properties until they are first read.Object.assign(new ChildProcess(), { stdin: null })therefore throws in Bun, although it succeeds in Node. Execa 10.2.0 uses this pattern to construct its failed subprocess result after a synchronous spawn error, so Bun replaces the original error with a readonly-propertyTypeError.Add setters for
stdin,stdout,stderr, andstdiothat create ordinary writable, enumerable, configurable own properties. When a process is subsequently spawned, initialize and publish its actual streams through the existing IO owner so earlier assignments cannot shadow them. Preserve the early EMFILE/ENFILE and synchronous-error behavior.Reproduction:
Validation:
4f4384837cae8b17744525851c6293119d2c3c78.Current integration status — November 12
The rewritten integration contains this fix through
03db8ba2b9andad1bbb44df, including all four writable stream properties, spawn-time stream replacement, tracing order and deferred-error initialization. The current tests exercise assignment descriptors, real pipe/ignore replacement and missing-executable EOF/close behavior.Canonical source-pair qualification 43148703096 records 117 passes / 6 skips / 1 todo / 0 failures for
test/js/node/child_process/child_process.test.tsin both the candidate and sync ledgers, on Buna03e7c861f/ engine5067d102668d. The report identities and raw ledgers were independently verified. No remaining production delta from this PR was found.Real-package Execa qualification 43210256810 passes with Execa 10.2.0, Node 26.12.1, and the admitted Bun executable
cd861bb9f53102e92e23ce28684c258055c7e612/ engine651eeaca6e2792378928033b1ae7ac66d6f91eab. An invalid-uid synchronous spawn error returns Execa's failed-subprocess handle with writable own streams, preserves each runtime's original error, and never starts the child. Node reportsERR_OUT_OF_RANGE; Bun reportsERR_INVALID_ARG_TYPE, with no masking readonly-property error. The actual package integrity, frozen lock, runtime identities and report-only artifact 13939649345 were independently checked; ZIP SHA-256:d48720cab6bce210d49c2d2b263d2036b8e1cd28b2195bf52babe9870decf4f3. This is entrypoint proof, not full shipping-archive qualification.Upstream already has the corresponding writable-stdio proposal: oven-sh/bun#44933, open at
d30bc07c110406b8e147d576145fa588f8e3fc4d. Its actual diff adds all four setters and resets preassigned streams before spawn. Preserve that contributor PR rather than opening a duplicate. The fork's Execa proof above does not qualify that upstream head; its exact-package and deferred-failure validation remain upstream follow-up work.The current Bun integration has not yet landed. Keep this PR open until that integration lands, then close it as superseded. Tracking PR 221 records the active branch and pending full shipping qualification.