Repository navigation
chore(sync): merge upstream Bun through 34cbc70fa1 - #218
Merged
Merged
Conversation
### What does this PR do? Moves `WEBKIT_VERSION` from `5e3554face13` to `680ef47cec2c`, the head of oven-sh/WebKit `main`. The `autobuild-680ef47c…` release is published. What the fork's `main` gained in that range: - oven-sh/WebKit#889: merge of upstream [`f59345e04a8d`](WebKit/WebKit@f59345e) (2026-10-22). 193 upstream commits since `33ce3bf11a71`, 37 of them in JavaScriptCore, WTF or bmalloc. - oven-sh/WebKit#892: a completely full block that the allocator stumbles on is recorded as allocated. - oven-sh/WebKit#880: the control flow profiler counts the parts of a loop header. - oven-sh/WebKit#807: `BytecodeOptimizer` aborted when jump offsets settled one pass before the forced widening. - oven-sh/WebKit#881: CI only (sha256 for toolchain downloads, FreeBSD 14.4, which is what Bun already targets). The Android NDK is unchanged. `JSType.h`, the WebCore bindings code generator and the release tarball names did not change. #### Changes in Bun besides the version **BIGINT32 is gone upstream** ([`f59345e04a`](WebKit/WebKit@f59345e)). It was never enabled (`USE_BIGINT32` was `0`), so none of this changes behaviour, but Bun does not compile without it: - `JSBigInt::makeHeapBigIntOrBigInt32(g, v)` → `JSBigInt::createFrom(g, v)`, which is what it expanded to (`NodeSqlite.cpp`, `JSBuffer.cpp`, `JSCTestingHelpers.cpp`). Every call site passes an `int64_t` or a `uint64_t`, so the overload is exact. - `JSValue::isBigInt32()` always returned `false`. Removed: `JSC__JSValue__isBigInt32` and `JSValue::is_big_int32`, their uses in `toBeEven` / `toBeOdd`, an `ASSERT` in `JSC__JSValue__asBigIntCompare`, and the test bindgen emitted for a `bigint` that is not a cell. - `tryConvertToBigInt32(bigInt)` → `bigInt` in `SerializedScriptValue.cpp`. - The `#if USE(BIGINT32)` blocks in `bindings.cpp`, `SerializedScriptValue.cpp` and `napi.cpp`, which call functions that no longer exist. - The `JSGlobalObject*` of `JSC__JSValue__asBigIntCompare`, which only one of those blocks read, and with it the `global` of `JSValue::as_big_int_compare` and of the test runner's wrapper. **Loop headers have basic blocks of their own** (oven-sh/WebKit#880): - `JSInspectorProfiler.cpp` leaves out the blocks with `m_isInLoopHeader`. V8 has no range for them, and what reads `Profiler.takePreciseCoverage` is written for V8's ranges. - `source-positions-corpus.ts`: the count of nine loop header lines. `for (let i = 0; i < 3; i++) {` is 4, how often the condition ran, and was 1. Both are the same hunks as in oven-sh#46534, so they merge cleanly with it. `WEBKIT_VERSION` will conflict there: oven-sh#46534 pins `e450c494a84f`, which this contains. **`test/bundler/bundler_bytecode_portable.test.ts`**: the snapshot. Removing `op_is_big_int` renumbers the opcodes after it, so the serialized bytecode changed on every platform. 24 hashes and 13 sizes of `.jsc` payloads change, and no hash of the printed JavaScript. **`test/js/bun/jsc/webkit-upgrade-f59345e04a.test.ts`** (new): pins five of the engine changes below, like the files for the earlier syncs. #### Other upstream changes that reach Bun Checked against Bun's sources, no change needed: - `numberToShortestStringBufferSize` is 39, was 34. Bun passes the 124-byte `NumberToStringBuffer`. - `JSObject::forEachOwnIndexedProperty` lost its `JSGlobalObject*`, `immutableButterflyToStringCache` moved from `Heap` to `VM`, the inline parts of `HasOwnPropertyCache` moved to `HasOwnPropertyCacheInlines.h`, the `swapCodeRefForDebugger` family moved to `NativeExecutable`. Bun uses none of them. - `JSBoundFunction::create` gained an overload that takes a `SourceTaintedOrigin`. The one that takes a `SourceCode`, which Bun calls, is still there. - `SpecDataViewObject` is bit 49, was 50. Bun has no copy of `SpeculatedType`. - The bytecode cache key is a hash of the WebKit commit, so a cache written before the opcodes were renumbered is not read. Behaviour that changes with the engine: - In the head of a `for`: a destructuring declaration without an initializer is a SyntaxError, `let` is an identifier in sloppy code, and `for await (async of` is allowed ([`926bafc4e`](WebKit/WebKit@926bafc4e)). - An overwritten `length` of a sloppy arguments object is converted with `ToLength` ([`7b1cfc54c`](WebKit/WebKit@7b1cfc54c)). `-1` was 4294967295, so `Array.prototype.slice.call(arguments)` looped 2^32 times, and 2^32 and up were truncated. - `Stopwatch::reset()` clears past run intervals ([`49902180d`](WebKit/WebKit@49902180d)), and moving a `SamplingProfiler::StackTrace` keeps `stopwatchTimestamp` ([`b6c984205`](WebKit/WebKit@b6c984205)). - DFG fixes: a promise resolved with itself was fulfilled with itself in optimized code instead of rejected with a TypeError ([`b45f2446d`](WebKit/WebKit@b45f2446d)), `op_has_private_name` is not compiled as `InById` ([`dd24421c8`](WebKit/WebKit@dd24421c8)). - GC: leftover marks after the marking version wraps ([`e1a28d3cf`](WebKit/WebKit@e1a28d3cf)), a heap's Collector threads stop when it shuts down ([`eaf0efa57`](WebKit/WebKit@eaf0efa57)). ### How did you verify your code works? No local build. The first commit was built by CI ([#131689](https://buildkite.com/bun/bun/builds/131689)): all 13 `build-bun` jobs and the three `verify-baseline` jobs passed, so the aarch64 allowlist stays as it is, and the only test that failed was the bytecode snapshot, on all ten platforms that ran it. With the `bun-linux-x64` binary of that build, and the one of `main` at `a8fcd319` ([#131688](https://buildkite.com/bun/bun/builds/131688), WebKit `5e3554face13`) as the baseline: | | `main` | this PR | | --- | --- | --- | | `webkit-upgrade-f59345e04a.test.ts` | 0 of 5 pass | 5 of 5, also with `BUN_JSC_useJIT=0` | | `bundler_bytecode_portable.test.ts` | | 22 of 22 with the new snapshot, 21 of 22 before | | `source-positions.test.ts` | | 325 of 325 | | `inspector-profiler.test.ts` | | 52 of 52 | The snapshot was written by `--update-snapshots` on Linux x64. All 24 hashes are the ones in the CI logs of Windows x64, Linux aarch64 and Linux x64 ASAN, and the 11 that the annotation shows are the same on all ten platforms. The second commit's Rust was checked with `cargo check -p bun_jsc -p bun_runtime`; its C++ (one signature) is first compiled by CI. Before the first build, by reading: the diff of every JavaScriptCore, WTF and bmalloc header in the range, with each removed or changed name searched for in Bun, and every `JSBigInt::` member Bun uses looked up in the new `JSBigInt.h`. --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Co-authored-by: Claude <[email protected]>
…k.ts` (oven-sh#46641) ### What does this PR do? Moves the stream sinks to bindgen and deletes `src/codegen/generate-jssink.ts`. `src/runtime/webcore/Sink.bind.ts` declares four classes: | Class | What it is | | --- | --- | | `ArrayBufferSink` | `Bun.ArrayBufferSink` | | `FileSink` | `Bun.file(..).writer()`, `Bun.stdout.writer()`, `proc.stdin` | | `NetworkSink` | `s3file.writer()` | | `ReadableSinkController` | the `controller` of a `type: "direct"` stream that a native sink consumes, and what the pump of any other stream writes to | The old generator made a sink class, a constructor and a controller class for each of the seven sinks. Four of the sink classes were never instantiated, and the controllers differed only in which sink they forwarded to. There is now one controller class, as `ReadableStreamDirectController` in `bun-types` and the docs already describe it. It holds an enum of typed pointers to the six sinks, and each operation picks the sink with one `match` in `Sink.rs`. Bindgen parses the arguments: `write(chunk)` is a union of a string, a buffer source and anything else, `flush(wait)` a boolean, and `start(options)` a dictionary of the members that sink reads. `Bun.file(..).writer(options)` uses the same dictionary as `FileSink.start`. The logic that was generated C++ (attach, detach, `end`, `close(error)`, the closed and destination-closed states) is in `Sink.rs`, and `BunStreamSource.cpp` keeps the stream side. The two call each other through member functions of the generated class, which the schema declares, so neither side declares an `extern "C"` function for them. This is what `GeneratedSink.h` has for the controller: ```cpp // Defined in Rust. On exception, a JSValue result is empty. void close(JSC::JSGlobalObject*, JSC::JSValue error); JSC::JSValue end(JSC::JSGlobalObject*); JSC::JSValue write(JSC::JSGlobalObject*, JSC::JSValue data); bool isDetached(); void closeWithError(JSC::JSGlobalObject*, JSC::JSValue error); void startWithHighWaterMark(JSC::JSGlobalObject*, double highWaterMark); JSC::JSValue writeBytes(JSC::JSGlobalObject*, std::span<const uint8_t> bytes); // Defined in hand-written C++, called from Rust. JSC::JSValue assignToStream(JSC::JSGlobalObject*, JSC::JSValue stream); void onClose(JSC::JSGlobalObject*, JSC::JSValue reason, bool sinkClosed); void onReady(JSC::JSGlobalObject*); void setPipe(JSC::JSValue stream, JSC::JSValue done); JSC::JSValue pipeStream(); void clearPipeStream(); void setPipeDone(JSC::JSValue done); JSC::JSValue pipeDone(); JSC::JSValue takePipeDone(); void setFailReason(JSC::JSValue reason); JSC::WriteBarrier<JSC::JSCell> m_source; JSC::WriteBarrier<JSC::JSPromise> m_closePromise; JSC::WriteBarrier<JSC::Unknown> m_failReason; JSC::WriteBarrier<WebCore::JSReadableStream> m_readableStream; JSC::WriteBarrier<WebCore::JSReadableStream> m_pipeStream; JSC::WriteBarrier<JSC::JSPromise> m_pipeDone; ``` The pump now holds a `JSReadableSinkController*` and calls `write`, `end` and `close` directly. Before, it looked them up by name and built an options object for `start`. They are the same functions JS calls, so arguments convert the same way. Also gone: `Sink.h`, `generated_jssink.rs`, twelve lazy members of `ZigGlobalObject`, seven `DOMStructureSlot` entries, six iso subspace slots, the sink block of `headers.h`, `GlobalObject::assignToStream`, `host_fn_static` and `StartTag`. `RequestContext` holds its `HTTPServerWritable` directly, and `JSTransformStream` holds the controller in one `m_nativeSinkController` in place of a cell, a pointer and an id. The sinks were the last Rust code to read a `CallFrame`, so these have no users and are deleted: - `CallFrame::{arguments, argument, arguments_count, this}` and the copy of JSC's register layout that they decoded - the `CallFrame` parameter of `js_thread_of_caller` and `context_of_caller`, which leaves one function of each name - `JSGlobalObject::throw_illegal_constructor`, three `BuiltinName`s, three methods of `TaggedPtrUnion` and the tag bounds of `TypeList` - the `flush()` of four sinks, which only the old trait called #### Bindgen additions | Option | What it does | | --- | --- | | `writable: false` on a class | its native functions are read-only | | `{ constant: 3 }` in `proto` | a read-only integer, like a WebIDL `const` | | `enumerable` on a getter or a constant | overrides the class's, as `configurable` does | | `calledFromCpp: true` on a function of `proto` | also a member function of the generated C++ class: it takes a `JSValue` for each argument and converts it as a call from JS does | | `calledFromCpp: { .. }` on a class | member functions defined in Rust that are not properties; they take and return `JSValue`, `bool`, numbers and `b.byteSpan` as they are | | `calledFromRust: { .. }` on a class | member functions that hand-written C++ defines and Rust calls as `js_Name::x(this_value, ..)` | | `b.byteSpan` | bytes that C++ passes to Rust: `std::span<const uint8_t>`, `&[u8]` | | `internalFields: { done: b.cell("JSC::JSPromise", header) }` | a field for hand-written C++, a `WriteBarrier<JSC::JSPromise>`; fields declared as a list stay `WriteBarrier<Unknown>` | | `b.string.view` | the characters of a string where they are, as a `bun_core::StringView<'a>`: no reference is taken and a slice is not copied | | `.falsyAsNull` on `b.any` | a falsy value is `None` | ### Behaviour A script calls every method of an `ArrayBufferSink`, a `FileSink` and a server's controller with 33 kinds of argument, with no argument, with five kinds of wrong `this`, and after `close()` and `end()`. It also covers each member of the `start` and `writer` options, the constructors and every property descriptor. It ran on main and on this branch; these are the cases that differ. **Wrong on main, fixed here** | Case | main | This PR | | --- | --- | --- | | `Bun.ArrayBufferSink.prototype` | `undefined` | the prototype | | `sink instanceof Bun.ArrayBufferSink` | throws `instanceof called on an object with an invalid prototype property.` | `true` | | `class X extends Bun.ArrayBufferSink {}` | throws `The value of the superclass's prototype property is not an object or null.` | works, and `Reflect.construct` honours `newTarget` | **Different, neither wrong** | Case | main | This PR | | --- | --- | --- | | The controller's label in `console.log`, `Object.prototype.toString` and `heapStats()` | `ReadableHTTPResponseSinkController` and five others | `ReadableSinkController` | | `sinkId` of a controller | a data property of each prototype | an accessor, with the same value and attributes; on the prototype itself it is `undefined` | | A sink's method with a wrong `this` | `Expected FileSink`; no `code` from `close`, `_getFd` and a controller's `end` | `Expected this to be instanceof FileSink, but received ..`, always with `code: "ERR_INVALID_THIS"` | | `FileSink()` without `new` | `Illegal constructor` | `FileSink constructor cannot be invoked without 'new'` | | `start(options)` of an `ArrayBufferSink` | `asUint8Array` counts only if it is an own property | it counts inherited too, like `stream` and `highWaterMark` | | `start(options)` of a controller | reads `path` and `fd` for a `FileSink`, and `highWaterMark` for any other sink | reads all three, and uses the ones main uses; a getter that throws on one it does not use makes `start` throw | | `start({ path, fd })` and `writer({ path, fd })` | `fd` is read only if `path` is absent | both are read, and `path` still wins | | `write()` with no argument | `ERR_MISSING_ARGS`, `write() expects a string, ArrayBufferView, or ArrayBuffer`; a closed sink says that it is closed, and a controller whose client went away returns 0 | `ERR_MISSING_ARGS`, `The "chunk" argument must be specified` (`"data"` on a controller), whatever the state | | `estimateShallowMemoryUsageOf(new Bun.ArrayBufferSink())` | 96 | 80 | | `start(options)` with a wrong `this` | runs the getters of `options`, then throws `ERR_INVALID_THIS` | throws `ERR_INVALID_THIS` first | | `write(new String(..))` on a closed sink | throws before it converts the chunk | converts the chunk, then throws the same error | | A method borrowed across classes | a sink and its controller take each other's `write`, `flush` and `start`, and a controller of another sink does not | a sink's methods work on that sink only, and a controller's on every controller | **Right on main, wrong here**: none. `Sink.rs` discarded the result of detaching a controller. It goes to `dispatch::fold` now, like the same call in `FileSink.rs` and `streams.rs`, and the `jsresult-swallow` inventory loses the entry. ### Cost Release builds of main and of this branch, one pinned core, cycles for each operation. The third column is a second copy of main's binary. | Operation | main | main again | This PR | | --- | --- | --- | --- | | a direct stream to a file | 4594 | 4571 | 4028 | | `Bun.serve` with a stream body | 12487 | 12537 | 11547 | | `await Bun.write(path, new Response(stream))` | 8412 | 8439 | 7521 | | `arrayBufferSink.start({ highWaterMark })` | 243 | 246 | 102 | | `arrayBufferSink.flush()` | 369 | 369 | 321 | | `arrayBufferSink.write("hello world")` | 106 | 107 | 89 | These cost more: | Call | main | main again | This PR | | --- | --- | --- | --- | | `arrayBufferSink.write(uint8Array)` | 76 | 73 | 78 | | `arrayBufferSink.write(arrayBuffer)` | 90 | 88 | 94 | | `fileSink.write(uint8Array)` | 101 | 100 | 111 | | `fileSink.flush()` | 62 | 59 | 69 | | `controller.write(uint8Array)` | 80 | 82 | 102 | | `controller.flush()` | 39 | 40 | 51 | On main `write` and `flush` are each one Rust function that JSC calls and that reads its own argument. Now a generated C++ function checks `this` and converts the argument, and then calls the Rust function. A profile of `controller.write(uint8Array)` shows nothing else: three frames where main has one, and a call back into C++ for the pointer and length of the buffer, which `b.bufferSource` reads when the bytes are used and not when the argument is converted. The other calls of the three classes (`write` of a string to a `FileSink` or a controller, `start()`, `end()`, `ref()`, `unref()`, `_getFd()`, `sinkId`, `new Bun.ArrayBufferSink()`, `Bun.file(..).writer()`) measure within the difference between the two copies of main, or faster. The GC calls Rust when it sweeps a controller. On main the destructor of a detached controller made no call. `JsLocal<BufferSource>::with_bytes` gets the bytes from `Bun__Bindgen__bytesOfBlobOrBuffer`, as a `b.bytes` handle does, in place of `JSC__JSValue__asArrayBuffer`, which looked at the type again and filled a struct. The release binary is 86,016 bytes smaller than main's. ### How did you verify your code works? - `test/js/bun/util/arraybuffersink.test.ts` and `test/js/bun/http/serve-direct-readable-stream.test.ts` each have a new test that fails on main. - `test/internal/bindgen.test.ts` covers each bindgen addition, and each mistake in a schema that one of them reports. `TestMemberFunctions` goes from JS to Rust to C++ (`BindgenTest.cpp`, only in a build with assertions) and back to Rust, and keeps a `JSPromise` in a typed field across a GC. - `test/integration/bun-types/bun-types.test.ts` compares the schema with `Bun.ArrayBufferSink`, `Bun.FileSink`, `Bun.NetworkSink` and `ReadableStreamDirectController`. Its list of known differences gains the members that `bun-types` does not declare (`close`, `_getFd`, `sinkId`, and `ref` and `unref` of an `ArrayBufferSink`), `NetworkSink.stat()`, which `bun-types` declares and no sink has, and the `highWaterMark` of `FileSink.start(options)`, which `bun-types` declares and a `FileSink` does not read, on main as well. - These pass on a debug build: `bindgen`, `arraybuffersink`, `filesink`, `serve-direct-readable-stream`, `direct-readable-stream`, `async-iterator-stream`, `serve-stream-body-error`, `s3-upload-stream-gc`, `s3-stream-error-gc`, `spawn-stdin-destroy`, `spawn-stdin-readable-stream`, `text-encoder-stream`, `compression`, `body-stream`, `fetch-abort-stream-body`, `html-rewriter`, `html-rewriter-end-error`, `node-tls-upgrade`. - `bindgen`, `arraybuffersink`, `filesink`, `serve-direct-readable-stream`, `serve-stream-body-error`, `s3-stream-error-gc`, `compression` and `text-encoder-stream` also pass with `BUN_JSC_validateExceptionChecks=1`. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…ven-sh#46718) - `host.sh` installs the pinned Bun when `/usr/local/bin/bun` reports a different version. - `joinTailnet` returns when `tailscale status` already succeeds, before `install-system-daemon`. - `guest/bake.sh` runs `brew update` before the toolchain script. - The README says the scripts run on the Bun `host.sh` pinned when it last ran on the host.
…#46505) ### Problem - `console.groupCollapsed()` does not start a group. Later lines are not indented, and its `console.groupEnd()` removes the indent of an enclosing `console.group()`. A call with no label writes `undefined`. - Cause: `message_with_type_and_level_` (`src/jsc/ConsoleObject.rs:383`, `:394`) tests `MessageType::StartGroup` only. JSC sends `StartGroupCollapsed`. ### Fix - One `is_start_group` flag covers both types. The `undefined` fallback is removed: a collapsed group with no label was its only caller. The `bun-types` JSDoc is updated. - Correct: Node documents `groupCollapsed` as [an alias of `group`](https://nodejs.org/docs/latest-v26.x/api/console.html#consolegroupcollapsed), and the [WHATWG spec](https://console.spec.whatwg.org/#groupcollapsed) pushes both onto one group stack. - Verified: `test/js/web/console/console-log.test.ts`, `test/js/bun/test/dots.test.ts` (new tests fail on bun 1.4.3-canary). Also ran: console test directories, bun-types test. - Self-reviewed: 15 concerns raised, 15 addressed. Notes names two follow-ups that are not in this PR. ### Background - JSC passes each console call, with a `MessageType`, to `Bun::ConsoleObject::messageWithTypeAndLevel`. It forwards the message to the inspector, then to the Rust printer, which keeps the group depth in `default_indent`. - Considered a JS alias of `group` and a type mapping in the C++ client. The alias hides the collapsed type from the inspector, which can fold a group. The mapping splits one printer rule across two files. <details><summary>Notes</summary> Repro: ```js console.group("outer"); console.groupCollapsed("inner"); console.log("x"); console.groupEnd(); console.log("still in outer"); console.groupEnd(); console.log("after"); ``` | bun 1.4.3-canary (367d939) | this PR | Node v26.3.0 | |---|---|---| | `outer` | `outer` | `outer` | | `··inner` | `··inner` | `··inner` | | `··x` | `····x` | `····x` | | `still·in·outer` | `··still·in·outer` | `··still·in·outer` | | `after` | `after` | `after` | (`·` is a space.) **History** - There is no user report for this bug. A read of the code found it. It dates from oven-sh#15026, which added `console.group` for oven-sh#8099 and handled `StartGroup` only. - This is a refile of oven-sh#34237, which had the same two conditions. The stale action closed it after 90 days with no human review. - oven-sh#39592 moves `node:worker_threads` workers to the native console, and its branch has the `StartGroup`-only checks. Those workers print Node's output for `groupCollapsed` today. They keep it if this change lands first, or if oven-sh#39592 is rebased over it. The two diffs do not overlap. - oven-sh#42163 mirrors a page's `groupCollapsed` through `ConsoleClient::group()`. It does not need this change. **Scope** - The same code path serves `console.warn` and `console.error` inside a collapsed group. It also serves the console of a web `Worker`. Both are corrected. - Not affected: `new console.Console()` and `node:worker_threads` workers. They use the JS `Console` class, where `groupCollapsed` is already an alias of `group` (`src/js/builtins/ConsoleObject.ts:780`). Node does the same ([`constructor.js:681`](https://github.com/nodejs/node/blob/v26.3.0/lib/internal/console/constructor.js#L681)). - An outside caller: `Console.withGroup({ collapsed: true })` of `effect` 3.22.3 calls `console.groupCollapsed` on the global console (`src/internal/defaultServices/console.ts:57`). Nested in another group, it loses the outer indent on main and prints Node's output with this change. - Not changed: some output stays at column 0 inside a group of either kind. That is `console.count`, `console.timeLog`, `console.timeEnd`, `console.table`, and `console.assert` with no message. The later lines of a multi-line string stay there too. Related: oven-sh#30017, oven-sh#36470. The new JSDoc names only methods that do indent. **The removed fallback** - It was `else if message_type != MessageType::Trace { writer.write_all(b"undefined\n") }`, with no flush and no indent. On main, the text for a collapsed group with no label waits in the buffer. It shows up with the next `console.*` line on stdout, or not at all. - To reach it, a message needs no arguments, a type other than `Log` or `Trace`, and no earlier return. JSC drops `console.dir()`, `console.dirxml()` and `console.table()` with no arguments (`ArgumentRequirement::Yes` in `ConsoleClient.cpp`). `EndGroup`, `Clear`, `Assert` with no arguments, and now both group types return earlier. JSC sends no other type through this function. - Checked with a run of 19 console methods with no arguments. Main prints `undefined` for `groupCollapsed` only. This PR prints it for none. - Without the fallback, the early return for a group with no label is visible only under `bun test`. There it skips the before-print hook of the reporter. On main, a collapsed group with no label breaks the line of dots of `bun test --dots`. The new case in `dots.test.ts` pins the return. With the return put back to `StartGroup` only, that case fails and the case in `console-log.test.ts` passes. **Follow-ups that are not in this PR** - Node prints `undefined` for `console.dir()` and `console.table()` with no arguments, and an empty line for `console.dirxml()`. Bun prints nothing for the three on the global console. - `bun test --isolate` does not reset the group depth, the `console.count` totals or the `console.time` timers between test files. **Cost** - On a reduced copy of the two conditions (rustc 1.100.0-nightly, `opt-level=3`), `cmp; sete` becomes `add; cmp; setb`. No allocation, write or syscall is added. **Suites run with the debug build** - `test/js/web/console/`, `test/js/node/console/`, `test/js/bun/console/`, `test/js/bun/test/dots.test.ts`, `test/js/bun/test/only-failures.test.ts`: 118 pass, 0 fail. - `test-console-group.js`, `test-console-methods.js` and `test-console-with-frozen-intrinsics.js` from Node's suite: exit 0. - `test/integration/bun-types/bun-types.test.ts`: 24 pass. </details> ### Downsides - Output changes for callers of `console.groupCollapsed`: later lines gain two spaces for each open group. Snapshots of that output change. - Under `bun test`, a collapsed group that one file leaves open now indents the output of later files. An open `console.group()` does this today. - One more instruction per console message (a range check replaces an equality check).
…46439) ### What does this PR do? Four things for `bun lint`. #### `bun lint` is a command in release builds This reverts oven-sh#46438, which kept `bun lint` out of release builds. Bun v1.4.4 was released with it, so the next release is the first one that has `bun lint`. | in a release build | before | after | |---|---|---| | `bun lint` | the project's own `lint` script, file or executable, else `error: Script not found "lint"` | the linter, unless the project has its own `lint` | | `bun --help` | does not list `lint` | lists `lint` | | README from `bun init` | "Run `bun fmt` to format the code." | "Run `bun lint` to find problems in the code and `bun fmt` to format it." | | test runner | skips `test/cli/lint/` and the cases of `init.test.ts`, `bunfig-errors.test.ts` and `glob/match.test.ts` that run `bun lint` | runs them | | order file generator | does not trace `bun lint` | traces it | `docs/lint/index.mdx` loses the note that the command is in canary builds only. Nothing changes in a canary build. #### `require.resolve()` in an installed plugin adds only Node's extensions eslint-plugin-import-x looks for its resolver named "node" with `require.resolve(<directory of the nearest package.json> + "/node")` in a try / catch. In Node.js that throws, and the plugin goes on with its built-in resolver. Bun also adds `.ts`, so in a package that has a `node/index.ts` the plugin loaded that file as its resolver, which ran the project's code, and every file of the package got a false error: ``` 1:1 error Resolve error: node with invalid interface loaded as resolver import/order ``` | `require.resolve(path.resolve("node"))` in `node_modules/eslint-plugin-demo/index.js`, in a project with `node/index.ts` | | |---|---| | ESLint 10.12.0 on Node.js 26 | throws `MODULE_NOT_FOUND` | | `bun lint` before | `<project>/node/index.ts` | | `bun lint` now | throws `MODULE_NOT_FOUND` | ESLint runs plugins in Node.js. So `require()` and `require.resolve()` in a file under `node_modules` now add `.js`, `.json` and `.node` where they added Bun's default list, in the threads that run the rules and in the process that reads a configuration for `bun lint` and `bun fmt`. An extension that a package adds to `require.extensions` still counts. Nothing else changes: not `bun run`, not `import`, not the project's own files. In directus, 103 such errors are gone, and the output is ESLint's line by line. The output for Leaflet, jotai and vite is the same as before. #### `-A`, `-W` and `-D` reach a rule that's configured under two names With an `.oxlintrc.json`, `no-array-constructor`, `eslint/no-array-constructor` and `typescript/no-array-constructor` are one rule. If the file and the files it extends used two of these names, the flags missed the rule, so a run with `-D` passed that should fail. ```jsonc // .oxlintrc.json { "extends": ["./base.json"] } // base.json { "rules": { "typescript/no-array-constructor": "warn", "no-array-constructor": "warn" } } ``` | `export const a = new Array(1, 2, 3);` | oxlint 1.87.0 | `bun lint` before | `bun lint` now | |---|---|---|---| | `-D no-array-constructor` | error, exit 1 | warning, exit 0 | error, exit 1 | | `-A no-array-constructor` | nothing, exit 0 | warning, exit 0 | nothing, exit 0 | | both names set to `"error"`, `-W no-array-constructor` | warning, exit 0 | error, exit 1 | warning, exit 0 | | both names set to `"error"`, `-A no-array-constructor` | nothing, exit 0 | error, exit 1 | nothing, exit 0 | The same happened with one name in the file and the other in a file it extends, with the two names in two extended files, and with `-A all` or a category in place of the rule. With two extended files that give the two names different severities, a flag for another rule, like `-D eqeqeq`, changed which of the two applied. oxlint merges files by the names as they're written, and applies the flags to the rule afterwards. We copy the inherited rules into the file's own `rules` and change them there, and that copy skipped a rule that was already there under another name. Now each written name is copied. | compared with oxlint 1.87.0 | results | differed before | differ now | |---|---|---|---| | 194 configurations with two or three names of one rule, 13 sets of flags each | 2,522 | 443 | 0 | | 210 configurations where the two names have different options, 7 sets of flags each | 1,470 | 344 | 0 | Without flags, none differed before. #### Shorter hints Shortens the hints of `bun lint`: the `note:` line that `-f pretty` and `-f agent` print under a report whose message doesn't say why or what to do. They used more words than they needed, and often began with a vague "It is". ``` 1 | export function price(items: number[]) { 2 | let total = 0; ^ warn: The value assigned to 'total' is not used in subsequent statements. no-useless-assignment at src/price.ts:2:7 note: Reassigned on line 3 before it's read. ``` | rule | before | after | |---|---|---| | `no-useless-assignment` | It is overwritten on line 3 before it is read. | Reassigned on line 3 before it's read. | | `react-hooks/rules-of-hooks` | The return on line 4 can end the render before it is called. | The return on line 4 can skip this hook. | | `react-hooks/rules-of-hooks` | Whether it is called depends on the condition on line 9. | Depends on the condition on line 9. | | `no-useless-catch` | It only throws the error again. Without try and catch, the code does the same. | It only rethrows. Remove the try and catch. | | `no-dupe-keys` | Only the last one counts. The first is on line 2. | The last one wins. The first is on line 2. | | `no-compare-neg-zero` | -0 and 0 compare as equal. Use Object.is(x, -0) to tell them apart. | -0 === 0 is true. Use Object.is(x, -0). | | `no-compare-neg-zero`, `x < -0` | -0 and 0 compare as equal. Use Object.is(x, -0) to tell them apart. | -0 compares like 0. Write 0. | | `no-empty-character-class` | [] in a regular expression matches nothing. | [] matches nothing. | | `no-fallthrough` | Add break, or the comment // falls through if this is meant. | Add break, or a // falls through comment. | | `no-this-alias` | Use an arrow function instead. It has the this of the code around it. | Use an arrow function. It keeps the outer this. | | `no-explicit-any` | unknown is the safe choice where the type is not known. | Use unknown if the type isn't known. | | `no-unused-vars` | Remove it, or start its name with _ to keep it. | Remove it, or prefix it with _. | | `no-unused-vars` | A catch needs no parameter. Remove it and its parentheses. | The parameter is optional. Write catch { }. | | `no-const-assign` | It is declared with const on line 1. Use let if it has to change. | Declared with const on line 1. Use let if it changes. | | `no-octal` | The leading 0 makes it octal, so 071 is 57. Write 0o71 to make that clear. | The leading 0 makes it octal: 071 is 57. Write 0o71. | 51 hints of 36 rules change this way. Two lines are now listed as "lines 5 and 7", not "line 5 and line 7". The hint of `no-compare-neg-zero` now follows the operator: `Object.is` was the wrong advice for `<`, `<=`, `>` and `>=`, and `!=` and `!==` need `!Object.is`. Nothing else changes: the messages themselves are upstream's, and which reports get a hint stays the same. ### How did you verify your code works? The revert: it applies without conflicts, each of its 14 files is byte for byte what it was before oven-sh#46438, and nothing that `main` got since uses what it removes (`isCanary`, `IS_ENABLED`, the `STABLE` modifier). PR CI builds are canary, so CI does not cover the release column. No release build was made of it. The plugin fix: a new test in `test/cli/lint/js-plugins.test.ts` with a stand-in plugin, at the time the configuration is read and at the time a rule runs. It fails without the fix, and what it expects is what ESLint 10.12.0 prints. Not run on macOS or Windows. The hints: `test/cli/lint/hints.test.ts` has a case for each hint and expects the new text. It passes, as do `output.test.ts` and `git.test.ts`, which also quote a hint. Two tests that check that a format prints no hint looked for a word of the old text, which would have passed whatever was printed. They look for the new text now.
… files without an ESLint or oxlint config (oven-sh#46980) Fixes oven-sh#46971 ### Problem - With plugins loaded from `bunfig.toml` alone, a JS plugin rule sees `node.start` and `node.end` in `.js` files but not in `.ts` files. There, nodes, tokens, and comments have only `range` and `loc`. A rule that compares `comment.end <= node.start` evaluates `undefined <= undefined` and silently misfires. - `LintNodeState::kindFor` (`src/jsc/bindings/LintNodes.h`) picked typescript-estree's layout for every non-espree, non-oxlint file. With an ESLint config that is right. Without one there is no parser to match, and the run mixes two shapes. ### Fix - One function, `estree::has_start_end(file)`, says whether a file's nodes have `start` and `end`: espree's and oxlint's do, and typescript-estree's do when `LanguageOptions::has_no_foreign_config` is set. The selector evaluator (`selector/value.rs`) and the plugin host (`host.rs`, as a new flag bit) both ask it. - A fifth node layout in `src/lint/js_plugin/layouts.rs`, `TypeScriptWithStartEnd`: typescript-estree's properties with `start` and `end` right before `range`. `kindFor` picks it when `LintHost::hasStartEnd()` is set for a file that is neither espree's nor oxlint's. - Tokens and comments of those files get the same two properties through two new `LintTokenShape` kinds. The nodes that `worker/ast.js` builds for typescript-estree's deprecated properties follow the node they are built for. - The ESLint-config and oxlint-config shapes are unchanged. Their oracle tests still pass. - Verified: `test/cli/lint/js-plugins.test.ts`, two new tests (the tree oracle under `bunfig.toml`, and keys and offsets of a node, a type annotation, both comment kinds, a token, and a regex token in `.ts` and `.js`, plus a `[start=13][end>13]` selector). Also the whole file (148 pass), `js-parsers.test.ts`, `bunfig.test.ts`, `rule-throws.test.ts`. ### Background - `layouts.rs` is the one table that says which properties a node of each type has, in which order, per parser. Rust sends it to the plugin worker once. `LintNodes.cpp` builds a JSC Structure per node type from it, so every node of a file passes through it. `OxlintJavaScript` is an earlier variant of the same kind. - `has_no_foreign_config` is the linter's existing flag for "no ESLint or oxlint config, so no installed tool's behaviour has to be matched". The linter already uses it to clamp report locations and to remove whole lines in fixes. - Considered adding `start` and `end` to the TypeScript layout for everyone: plugins that spread nodes or compare keys would see a shape that typescript-estree does not produce, and the ESLint oracle test pins that shape. Considered oxlint's layout for every file under `bunfig.toml`: it changes `.js` files too (oxlint field order, `null` for absent fields, inherited `loc`, oxlint scopes and tokens), while the documented use case is ESLint plugins from npm. - `.oxlintrc.json` is not a substitute: it flips `has_no_foreign_config` and the other behaviours keyed on it. ### Downsides - Each plugin worker thread loads the layouts table once. It grows from 71,530 to 98,250 bytes (+26,720). Templates and Structures are made per node type on first use, so files that never hit the new layout make none. - A plugin that detects the parser by `"start" in node` sees typescript-estree's nodes with espree's offsets under `bunfig.toml` alone. No such check was found in the test suite or in the plugins that the docs name. - What stays typescript-estree's in this mode: an absent field is `undefined`, not `null` as in oxlint. A rule written for oxlint that checks `=== null` still differs. The docs bullet says so. <details><summary>Notes</summary> - Self-reviewed: 4 concerns raised, 4 addressed (docs wording, the synthesized nodes in `worker/ast.js`, a regex token shape without a test, the tree oracle run in the new mode). Review on the PR found two more, both addressed: selectors with `[start]` or `[end]` evaluated natively against the old rule, now through the same `has_start_end`; the synthesized nodes read a per-file global, now they look at the node they extend. - The tree oracle under `bunfig.toml` matches the ESLint oracle with `start: a, end: b,` inserted before every `range: [a, b]` of the non-`.js` files, including the nodes behind `TSMappedType.typeParameter` and `TSImportType.argument`. The only other difference is `sourceType`, which Bun derives from the file where ESLint's config sets it, so the test masks it. - Layout kinds in C++ now have `isTypeScript` and `isOxlint` predicates in place of `==` and `>=` comparisons, so a new kind at the end cannot fall into the wrong branch. - The `visitorKeys` numbering (0 typescript-estree, 1 espree, 2 oxlint) is unchanged. The new kind maps to typescript-estree's keys. </details>
…#46486) ### What does this PR do? Follow-up to oven-sh#46468. It fixes the three cases that the reviews of that pull request left open, and three more that the reviews of this one found. All are in `find_in_project`, on macOS and Linux. A native dependency is a package in `nativeDependencies` of the project's package.json, or in the built-in list when the project has no such field. For those, `bun install` links `node_modules/.bin/<name>` into the platform package: a dependency with an `os` and a `cpu`. | # | Case | Own bin file | Before | After | |---|---|---|---|---| | 1 | A folder above the project has the name of an optional dependency that comes before the platform package | `0644` | `is not executable`, exit code 126 | platform binary | | 1 | the same | `0755` | stub | platform binary | | 2 | The package is not a native dependency. `.bin/<name>` is the bin of one of its optional dependencies, which has an `os` and a `cpu` | `0755` | bin of the dependency | own file | | 3 | `.bin/<name>` is the bin of an optional dependency without `os` and `cpu` | missing or not executable | `is not executable`, exit code 126 | `.bin/<name>`, as before oven-sh#46468 | | 4 | The platform package of a native dependency is in `dependencies` | `0644` | `is not executable`, exit code 126 | platform binary | With case 3 alone, `.bin/<name>` of an unrelated package would also run in two layouts. Both keep the error of `main`: | # | Layout | Own bin file | Result | |---|---|---|---| | 5 | A folder above the project has the name of an optional dependency, and a package.json | not executable | `is not executable`, exit code 126 | | 6 | `.bin/<name>` is in `@scope/first`, and the package has the optional dependency `first` | not executable | `is not executable`, exit code 126 | | # | Change | |---|---| | 1 | `dependencies_with` returns every dependency whose name is in the real path of the link, not only the first | | 2 | `is_in_platform_package` also asks `List::is_native_dependency`. That reads the project's package.json with the parser of the installer. It looks up the `name` in the package's own package.json, so an alias works | | 3 | `find_without_executable_file` accepts a link into any optional dependency again | | 4 | `is_in_platform_package` looks in `dependencies` and `optionalDependencies`. The installer has no filter on the kind | | 5 | `dependencies_with` skips a folder that the package itself is in | | 6 | `dependencies_with` skips a folder whose parent begins with `@` | ### How did you verify your code works? - The tests in `bunx.test.ts` whose names begin with `after an install, a package whose optional dependency`, `a package that cannot run` and `the native dependency`. I ran each on a build without its fix first, and each failed there. All pass now. - `after an install, esbuild in a project with nativeDependencies <undefined | []>` covers the built-in list. It passed before too. - The rest of `bunx.test.ts` and `bun-install-native-binlink.test.ts` pass on macOS arm64, but for `should handle postinstall scripts correctly with symlinked bunx`. My machine does not let a copy of bun run from the temp folder. That test asks for `esbuild@latest`, and a request with a version does not reach this code. Linux is left to CI.
Fixes oven-sh#47006 ### Problem - `bun install` writes `[0.02ms] ".env"` to stderr whenever a `.env` file exists. `--silent` and `--quiet` do not remove it. Every install-family command (`add`, `remove`, `update`, `bunx`, ...) prints it. - `PackageManager::init` allocates its dotenv loader with `Loader::init()` (`src/install/PackageManager.rs:2384`) and never sets `quiet`. `Loader::load` (`src/dotenv/env_loader.rs:660`) prints the line unless `quiet` is set. ### Fix - The loader gets a `quiet_loaded_files` flag that hides only the `[Nms] ".env"` line. The `quiet` flag keeps its meaning: it also hides the `error loading .env file` messages (`env_loader.rs:816`, `:835`, `:879`), which `bun run` relies on. - Install sets `env.quiet_loaded_files = !cli.log_level.is_verbose()` right after the loader is allocated. This is the gate install already uses for its other `print_elapsed` timing traces. The line shows with `--verbose` (and under `RUNNER_DEBUG`, which promotes the level). - The `.env` files are still loaded, and an unreadable `.env` still prints `EACCES error loading .env file` at every level, as before. - Verified: `test/cli/install/bun-install-env-file.test.ts` (46 pass, 1 skip as root. The three new "not printed" cases fail on bun 1.4.3). Also `test/cli/run/env.test.ts` and `test/cli/run/log-test.test.ts`. ### Background - `bun run` and the transpiler already set `quiet` on their loaders: `run_command.rs:660` forces it, `transpiler.rs:1175` derives it from the log level (default `Warn`, so hidden). Install was the only `Loader::load` caller that left the line on. - Considered setting `quiet` on the install loader, as `bun run` does. That also hides the read error for a `.env` that carries the registry token, so a failed auth would have no explanation. The separate flag keeps that message. - Considered flipping the `Loader::init()` default to hidden. It changes nothing for any live loader today (every other `init()` user calls only `load_process`, and the transpiler overwrites the field) and still needs the install line. ### Downsides - A user who read the `[Nms] ".env"` line from the default `bun install` output must pass `--verbose` now. stderr lines for `bun install` with a `.env` in an empty project: 2 to 1 (default), 1 to 0 (`--silent`), 3 to 3 (`--verbose`). - Cost for other callers: one `bool` per `Loader` and one extra compare per `load`, no allocation or syscall. Binary size and instruction deltas were not measured: `bloaty`, `perf` and `strace` are not installed in this environment. <details><summary>Notes</summary> - Repro: `package.json` + `.env` (`FOO=bar`), then `bun install --silent`. Before: stderr is `[0.18ms] ".env"`. After: stderr is empty. - `cli.log_level` is the value `Options::load` later copies into `options.log_level` (`PackageManagerOptions.rs:1143`), so the bunfig and `.npmrc` paths cannot diverge from it. - A second `PackageManager::init` in one process (the `link` retry) reuses the loader and assigns the flag again. - The EACCES test is skipped as root. Checked by hand as `nobody` with a mode 000 `.env`: default and `--silent` both print `EACCES error loading .env file`, as on main. - The first revision set `quiet` on the install loader. Review pointed out that this also hid the read errors, so the loader got the separate flag. - The tests that assert the line is absent after `--no-env-file` or `env = false` pass `--verbose` now, so the assertion can still fail. - Debug binary `size` (PR build): text 643722302, data 65837697, bss 12169944. </details> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Change
Merge upstream Bun into the OpenClaw fork while retaining upstream and fork history. Resolve all 84 merge conflicts and preserve the fork's runtime, transport, module-hook, worker, path, and verified engine-artifact contracts across upstream's AOT and typed-binding changes.
Frozen inputs:
34cbc70fa1ddb580aa34c2ca624d19ea23f9bbce191755ec115ece3dd642eba3cb0143cecb5e5d7a, followed by landed decorator fix fix(parser): keep decorated private assignment targets as references #217 at7b573c05d0c52dffc67d4d25daf108bed5930cf2bace183eb495961bd69ac59d1a45a5f78b32e564; landed-fix merge:b691e0e7f014bdc39d7279acc8040c8618b8cb26Both frozen inputs are ancestors of this branch. Land with a merge commit to retain that history. The retained automation branch follows the documented sync-recovery route.
Reconciliation includes the UTF-16/JsScope node:path port, AOT HTTP response/transport ownership, compiled module-hook admission, worker and async-context contracts, and the Windows regression selector. Source-only type/generator jobs now check out the exact fork engine commit from the manifest; native builds retain complete SHA-256-verified fork archives with no upstream fallback.
Carry Peter Steinberger's hardened GNU verifier fix from the overlapping AOT stack in #208, preserving his original authorship and message from 62fdec7. Fortified copies can inline without
__memcpy_chk; exact stack-protector and checked-formatting requirements remain.Validation
Prior-head evidence at
2f741a3dac3f907396e4121f878fbf64304555ab:git diff --check; preserved upstream whitespace findings in 67 imported files were verified byte-identical to the frozen upstream.At current head
dd5eed75f82e5972e3a3928032bbede7eafd2795, the three verifier controls are separate test cases, preserving all assertions and the default five-second limit. This fixes the combined case's native ASan timeout. Independent review of that test change found no P0–P2 issues.The upstream port is open at oven-sh#47550. A native Linux x64 debug/ASan build at frozen upstream
34cbc70franbun bd -j4 test test/internal/build-hardened-flags.test.ts: original import policy 13 passed / 1 failed at the accepted-copy case; fixed policy 14 passed / 0 failed / 151 assertions. Prettier and build-script TypeScript checking passed. Both changed files exactly match this sync's files. That result qualifies the upstream verifier port; it does not qualify a native build of this fork or a hardened release binary.At this same head, formatting and source lints pass. Lint passes JavaScript lint and build/CI TypeScript checking before failing on missing engine AOT generator sources; bun-types reaches the same generator gap. Native builds and Rust setup stop on missing AOT archive checksums before compilation. These are setup failures, not runtime test results.
The fork’s SQLite diagnostics from #212 are also submitted upstream at oven-sh#47557, with native/AOT proof recorded there. That port’s loader, native-hook classification, and Node disposal corrections are not yet included in this pushed head.
Remaining qualification
This PR remains draft. The committed engine manifest still pins
b82bc917e99110b61c3a21202d6def7457aa194cand contains no AOT archives or generators. Linux/Darwin native builds and Rust setup stop before Bun compilation; generator/type jobs stop on missing engine AOT sources. These failures do not qualify the reconciled runtime.The producer selection at engine
42e4245f4180941634b482a7e8ef7fca47467de5still builds non-AOT twins. The sync requires eight AOT build/release variants, plus the Linux x64 debug-ASan AOT archive for the Rust setup as currently implemented.BUN_WEBKIT_GENERATORS_ONLYis exported but has no build owner at this source head. The existing canonical alternative is a verifiedbun-webkit-aot-sourcespayload plus a repaired generator-only consumer. The exact required labels, optional musl targets and producer/consumer evidence are recorded in openclaw/WebKit#34 (comment). This selection gap must be resolved before the combined-head qualification can pass.Paired engine work is tracked in openclaw/WebKit#34. Qualify the required engine variants and update the source pin/checksums together, then rerun combined-head native builds, affected runtime/AOT regressions, Rust and generated-type gates, and the six-platform Bun dry run. Retained-run/Darwin changes and the qualification harness in the separate AOT stack remain under review; this sync does not claim they have all migrated.
Consumer integration follows qualification: update and validate the shared six-platform runtime in
openclaw/openclawand the Darwin ARM64/Linux x64 toolchain inopenclaw/birdclaw, including their documented Node/Bun replay, installer, package and runtime acceptance gates. No consumer pin or Bun release has been changed by this PR.Reviewed port follow-ups prepared locally
The pushed sync head above is unchanged. Four signed local checkpoints retain the SQLite loader/hook/disposal corrections, optional-trace guards and published types, the hardening fixture repair, and the generator-only WebKit consumer repair. Upstream
34cbc70fa1ddb580aa34c2ca624d19ea23f9bbceand landed fork commit7b573c05remain ancestors. The local sync head isc8530468f98bf51f38094aaf9ee60c93d08e5a4f; these follow-ups are not yet part of this PR's pushed head.Local commit
c8530468f98bf51f38094aaf9ee60c93d08e5a4ffreezes the existingBUN_WEBKIT_GENERATORS_ONLYflag through ninja regeneration, selects the checksum-pinnedbun-webkit-aot-sources.tar.gzwithout native outputs or configure-time archive acquisition, enables clone-only Rust setup, and rejects native/default/runtime targets in that setup. The existing source-only--mode=codegencontract and Rust output paths are preserved. Fresh independent static review completed with no actionable P0–P3 findings, andgit diff --checkpasses. Added regressions and the real Rust setup replay have not run: the source payload and native engine qualification remain pending. This checkpoint is not pushed and does not satisfy the native test gate.b204527216a209b1f73ad62dd773772a56d64577: fresh native Debug/ASan verifier tests pass 14/14 with 151 assertions, including the path-independent shell fixture.f9a7311c0f0ab356038cc3f96cc2a9c5b0a82aa2: native SQLite/diagnostics tests pass 171/171 with 900 assertions; exception checks, generated/source/packed types, regular/AOT executables and the real lazy-loaderSQLITE_OMIT_TRACEquery/close/dispose smoke pass. The native implementation, published overrides and public type fixture in the local sync match that reviewed port.Those upstream-port results qualify their pinned upstream engine context. Full fork qualification and pushing the prepared integration still require the missing AOT archives/generator outputs from the existing WebKit producer handoff. Keep the eventual sync merge history-preserving; no squash/rebase merge.