build(webkit): qualify complete rebased batch and exact Bun sync - #6
Merged
Merged
Conversation
Make JSC stack positions select the same syntax tokens as Node 24: call and constructor starts, property reads, and async `await` continuations. Keep those positions separate from exception-expression divots and debugger line tables. Both captured `StackFrame` and live `StackVisitor` readers use the metadata; executable line overrides and release-private builtin position policy are preserved. The two sparse vectors are owned by each unlinked code block, remapped through bytecode rewriting/optimization, and decoded into owned storage on both cache paths. The cache revision advances with the metadata. Property reads and calls retain distinct tokens, so `(null.x)()` can fail at `x` before reaching the call. The paired Bun adapter in [openclaw/bun#114](openclaw/bun#114) also preserves error constructors and runtime call syntax. Rewriting `new Error()` into `Error()` moved the reported column and made a returning arrow eligible for JSC proper-tail-call elision. Preserving `new` restores the frame without disabling tail calls. Callee parentheses, computed access, and opening delimiter mappings are required for the broader normal-transpile corpus; TypeScript generic/non-null suffixes and cache invalidation are covered. This continues the source-position work in [oven-sh/bun#35179](oven-sh/bun#35179), [WebKit#37396](oven-sh/bun#37396), and [WebKit#41580](oven-sh/bun#41580) by @robobun. Native Linux qualification on one c7a.24xlarge host, with the unchanged W113 lane/Docker/ICU recipe: - 1,509,853 FFI checks; 121 JSC stress configurations; interpreter/JIT/bytecode-optimizer/eager-FTL modes; owned and persistent cold/warm caches. Each cache path creates three files totaling 33,024 bytes. - Raw JSC positions improve from 13/30 to 30/30 in the call corpus and from 4/28 to 28/28 in the added cases. The live visitor matches Node at 1:22, 2:21, 3:1. Async continuation control passes. - Paired Bun: 47/47 fork-selection results with zero regressions, 343 CallSite/util/source-map tests, and 68 minifier tests. Normal transpilation matches all 30 call shapes, all 28 added cases on both stack surfaces, and 14 TypeScript/generic/non-null/astral cases. The JavaScript/TypeScript module corpus and 58 raw-eval rows match as well. - Runtime cache replacement and warm replay match all 56 added observations. Existing custom-stack generated-versus-mapped and filename/eval-origin policies are preserved. - OpenClaw loader pair 8/8, SDK under its existing native-loader policy 67 pass/1 skip, Slack ordered shared-worker sequence 26/26, and real Proxyline probe pass. The original shared SDK policy retains its same two baseline tsconfig resolver failures. - ABBA, eight samples per arm: exception creation/formatting +7.6%; fresh 350-module startup 0.998× baseline. The exception overhead is an explicit tradeoff. - Final complete engine and Bun branch reviews are scoped-clean through P2. Exact-head [CI run 37240058657](https://github.com/openclaw/WebKit/actions/runs/37240058657) is green at `6e69d757023aa75398a670f487f90fe2a57e2b99`. Qualification caught and corrected a namespace-only result-checker assumption, repeated C++ default arguments in unity builds, private-builtin position leakage, missing transpiler delimiter metadata, TypeScript non-null suffix tracking, and the omitted live-stack reader. Exact position goldens were checked against Node; the original astral inline-snapshot assertion remains intact and passes. The Bun draft remains stacked on manifest commit `cf636c2f14914b3ba4b319874312d654cc5ea064` and also needs the namespace adapter from Bun oven-sh#106. Native baseline and candidate both include that adapter because current engine main requires its API. This PR does not publish artifacts or change the artifact recipe; batch publication stays with the coordinator.
Include landed engine main e9d324a without changing its source/test patch. Preserve the protected release gates while covering stack readers, execution tiers, minification, and owned/persistent/runtime cache replay. Build the exact prepared W150 runtime separately with only its artifact manifest changed. Require its startup and unchanged memory-release tests, in addition to the feature-adapter regression build, before assembly. Require explicit startup success and a cache-only marker that proves replay.
The stack-position change selects new, await, and call-start tokens rather than call parentheses. Update the four promise-combinator fixtures while preserving every error check, frame name/order, line number, and loop count. Node 24.21.0 independently matches all 64 revised source coordinates across 13 scenarios. The existing assertions failed in all 17 JSC configurations with the old columns; the other 1606 configurations passed. P2 review is clean.
ArrayBuffer payloads now retain their allocation-origin charge across worker transfers while external memory follows the current holder. Previously, unmaterialized typed-array vectors were missing, GC-holder estimates moved the wrong charge between VMs, and worker statistics waited for the worker event loop to become idle. The engine keeps separate origin, holder, native-object, and GC-epoch accounting. Fast/Oversize vectors are registered in C++, DFG and FTL, reconciled before sweep, and retired once during materialization. A packed weak link preserves view size, and Eden collections scan only the young prefix. Resizable, shared, native-adopted and WebAssembly storage have explicit ownership rules. JavaScript heap reporting and worker limits share the same backing-store classification. Worker inspections run on the owning VM thread through traps, an idle drain and atomic-wait wakeup. Teardown disposes pending callbacks. The matching Bun adapter is included in the existing qualification pipeline; engine and Bun must be rebuilt together. This extends the read-only engine check. Artifact publication remains a coordinator action. Builds on [oven-sh#303](oven-sh#303) and [oven-sh/bun#34406](oven-sh/bun#34406); thanks @robobun. Integrated onto source-position main `e9d324af5`. Exact-head [CI run 37242889997](https://github.com/openclaw/WebKit/actions/runs/37242889997) is green at `e95a3ef91cf0fda2d4e65ddc250513c0c669565c`. The accounting adapter is 010, after the common stack-position adapter 009. Validation on one direct AWS c7a.24xlarge Linux host, using the unchanged lane recipe: - JSC accounting and sampling: LLInt, baseline JIT, DFG, FTL and concurrent GC; namespace and source-position regressions also pass. - Node 24.21.0 and paired Bun: 24/24 API/ownership modes each, covering transfer, origin exit, detach, resize, native, shared, WebAssembly and serialization behavior. - Focused process (19), worker (7), native-buffer (1), worker-limit (14) and serializer (60) cases pass; combined source-position suites pass 96/96. - Unchanged OpenClaw worker-cpu/task-pool/transfer consumers: 38/38. Busy/waiting worker reads complete in approximately 1 ms. - Expanded paired fork selection: 45 files plus 2 dependency checks, 47/47 all-pass on both arms, identical outcomes and zero regressions. - Rust checks: 12/12 targets; subsequent runtime edits are C++/JS. - Codex P2 reviews: scoped-clean for engine and Bun. - Supplementary TSan accounting/lifecycle run passes with documented exact-frame suppressions for pre-existing GC races; 1,280 inspections and 1,280 queued cancellations across 20 VM lifetimes. This is scoped qualification, not an unsuppressed race-free claim. The only GC synchronization changes retained are atomic extra/external visited totals and the exercised parallel-helper activity assertion lock. One initial API run exposed startup allocation timing in the new busy/wait fixture, also reproducible on the prior candidate. Settling startup before allocating the fresh payload preserves all assertions, the 64 KiB bound, and the consumer. Node and Bun then passed 20 busy plus 20 wait repetitions each before the complete rerun. ABBA, eight samples per arm, against paired current-main engine plus the same common Bun adapters: | Workload | Before (ms) | After (ms) | Change | |---|---:|---:|---:| | buffer | 146.4802 | 149.3238 | +1.94% | | fast | 31.3784 | 31.4235 | +0.14% | | materialize | 144.8020 | 149.6641 | +3.36% | | oversize | 145.4974 | 146.3678 | +0.60% | | small | 4.6612 | 5.0975 | +9.36% | | stats | 2097.6425 | 2111.8061 | +0.68% | | eden-retained | 34.7131 | 34.8259 | +0.33% | Tiny-array tracking costs approximately 2.2 ns per allocation in this workload. These costs are explicit; no consumer assertion or benchmark threshold was relaxed.
Include landed engine main 6fceea9 with ArrayBuffer allocation ownership, worker VM inspection and accounting-related GC synchronization. Preserve its source/test patch except for composing inspection with upstream idle purging inside the same guarded atomic wait loop. Retain both lock-drop/continue paths and test inspections during purging and notification races. Add five accounting modes plus process, worker, native external-buffer and serializer regression gates. All Bun adapters apply to the exact prepared upstream-sync source; manifest-only compatibility stays separate. The protected final dispatch still requires every lane/test/assembly job and an exact source/run/attempt approval receipt before creating immutable assets.
The manifest-only W150 build exposes its old public TriState namespace marker access, which cannot compile against the landed private facade marker. Pair only the existing namespace adapter, preserving the engine API and removing the legacy prototype workaround rather than restoring a compatibility field. Bind the adapter digest and exact resulting tree before and after compilation. Allow only the candidate manifest to change afterward, and retain unchanged startup and memory-release tests. Require these identities during assembly. Document the atomic Bun namespace/manifest integration requirement explicitly.
The full stack adapter preserves new Error syntax. Match the ErrorEvent snapshot caret to its constructor token at 883:12, independently confirmed by Node 24.21.0, without changing its assertions or the minimal paired source. Retain selector result JSON before propagating a failed command status so subsequent qualification failures remain inspectable without changing retries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qualify the complete merged OpenClaw engine batch on upstream WebKit
5718a6ec579b98362ea7276a426deedcc6281ef5, including stack positions (#3,e9d324af) and ArrayBuffer ownership/worker inspection (#5,6fceea99). The source remains isolated onopenclaw/release-5718a6ec; this work does not change Bun main.The engine patches retain their original intent. The only substantive merge overlap is the atomic wait loop: it now preserves both owning-thread VM inspection and upstream's 100 ms allocator purge, with the waiter-list lock dropped for each operation and notification/timeout/termination rechecked afterward. A combined regression completes 40 inspections and eight notification windows while observing 3,210 purge calls. Lane and Docker recipes are unchanged.
The W150 compatibility build reproduces its exact prepared tree, applies only the required hash-pinned namespace counterpart, verifies the paired tree before/after compilation, and permits only the candidate manifest as a further tracked change. Bun oven-sh#106 (or the exact recorded namespace adapter) must accompany the manifest atomically. A manifest-only attempt failed on the removed public namespace marker; no legacy engine shim was restored. The separate full-feature build qualifies all remaining adapters.
Exact-head native run 37251493706 passed. The tested merge tree is identical to this head. It verifies W150 build/startup and all three unchanged memory-release tests without skips; W113 46/46 result rows in both arms; full sync selection 83 files/85 passing rows; 1,674 JSC stress and 1,639 module configurations; sampler/accounting/stack execution modes and actual cache replay; 343 stack/source-map tests, 68 minifier tests, 223 ALS/resolver tests, 78 inspector tests, namespace/worker/accounting/native-buffer/serializer gates, and heap counters. Twenty-three release-integrity tests, four verifier tests and P2 reviews pass.
Qualification corrected stale stack/caret goldens after independent Node 24.21.0 coordinate checks, without changing assertions, frame order or runtime code. The official runner's stdio bootstrap issue also reproduces in the original baseline: it retried 26 unfinished files in each W113 arm and 55 in the full sync arm, all passing afterward. That existing behavior is recorded, not hidden or modified.
The final publication dispatch must build all nine lanes and pass every test/assembly gate before protected approval. Exact source/run/attempt receipts, immutability verification and no-overwrite behavior remain mandatory. No release has yet been published.
Thanks @Jarred-Sumner for upstream idle-memory release and @robobun for the retained Proxy, namespace, source-position and accounting work. Existing contributor attribution is preserved in history.