Repository navigation
Conversation
…s cause Bumps WEBKIT_VERSION to pick up oven-sh/WebKit#340 and adds coverage for the AggregateError rejected by Promise.any on every code path (fast path microtask, empty iterable, subclass slow path, thenable).
|
The preview build of oven-sh/WebKit#340 is published as Verified locally with and CI #80570 finished with no code failures: the three Ready for review. Once oven-sh/WebKit#340 is merged I'll retarget |
|
Found 1 issue this PR may fix:
🤖 Generated with Claude Code |
…35534) Adds a self-contained GitHub Action that scans `claude`-labeled PRs for multi-line comment blocks added under `src/` and leaves a review line comment on each one asking for it to be deleted (and the thread resolved once done). ### Behavior - Triggers on `pull_request_target` (`opened` / `synchronize` / `reopened` / `labeled`), gated on `github.repository == 'oven-sh/bun'` and the `claude` label being present. The `labeled` trigger covers the normal case where `auto-label-claude-prs.yml` applies the label after open. - Fetches PR files via `pulls.listFiles` and parses the unified diff in `actions/github-script`. No repo checkout. - A group is **2+ consecutive added lines** that are pure comment lines (`//`, `///`, `//!`, `/* ... */`, `* ` continuation) in `.rs` / `.c` / `.cpp` / `.h` / `.ts` / `.js` and friends. Groups containing `SAFETY:` are skipped. - Posts one standalone review line comment per consecutive group via `pulls.createReviewComment` (no review summary). - Each comment carries `<!-- comment-cop:<path>:<sha12> -->` keyed on the group's content hash, so reruns (new pushes, relabels) skip groups that already have a marker. - On each run, any existing comment-cop thread whose flagged block is no longer present in the diff is auto-resolved via `resolveReviewThread`. ### Verification Dry-ran the parser against the five most recent open `claude` PRs via `gh api repos/oven-sh/bun/pulls/<n>/files`: ``` #35531 src/runtime/webcore/Blob.rs:5245-5246 #35529 src/http_jsc/websocket_client.rs:907-910 #35528 src/runtime/webcore/FileSink.rs:917-920 #35526 src/http_jsc/websocket_client.rs:2179-2182 #35532 (clean) ``` Cross-checked `#35531` line numbers against the fetched head ref; `Blob.rs:5245` is the first line of the flagged block. `actionlint` and prettier both pass. <!-- robobun:evidence:begin --> --- **no test proof** · iteration 0 · build/CI scripts only; test-proof not applicable <!-- robobun:evidence:end -->
…35534) Adds a self-contained GitHub Action that scans `claude`-labeled PRs for multi-line comment blocks added under `src/` and leaves a review line comment on each one asking for it to be deleted (and the thread resolved once done). ### Behavior - Triggers on `pull_request_target` (`opened` / `synchronize` / `reopened` / `labeled`), gated on `github.repository == 'oven-sh/bun'` and the `claude` label being present. The `labeled` trigger covers the normal case where `auto-label-claude-prs.yml` applies the label after open. - Fetches PR files via `pulls.listFiles` and parses the unified diff in `actions/github-script`. No repo checkout. - A group is **2+ consecutive added lines** that are pure comment lines (`//`, `///`, `//!`, `/* ... */`, `* ` continuation) in `.rs` / `.c` / `.cpp` / `.h` / `.ts` / `.js` and friends. Groups containing `SAFETY:` are skipped. - Posts one standalone review line comment per consecutive group via `pulls.createReviewComment` (no review summary). - Each comment carries `<!-- comment-cop:<path>:<sha12> -->` keyed on the group's content hash, so reruns (new pushes, relabels) skip groups that already have a marker. - On each run, any existing comment-cop thread whose flagged block is no longer present in the diff is auto-resolved via `resolveReviewThread`. ### Verification Dry-ran the parser against the five most recent open `claude` PRs via `gh api repos/oven-sh/bun/pulls/<n>/files`: ``` #35531 src/runtime/webcore/Blob.rs:5245-5246 #35529 src/http_jsc/websocket_client.rs:907-910 #35528 src/runtime/webcore/FileSink.rs:917-920 #35526 src/http_jsc/websocket_client.rs:2179-2182 #35532 (clean) ``` Cross-checked `#35531` line numbers against the fetched head ref; `Blob.rs:5245` is the first line of the flagged block. `actionlint` and prettier both pass. <!-- robobun:evidence:begin --> --- **no test proof** · iteration 0 · build/CI scripts only; test-proof not applicable <!-- robobun:evidence:end -->
|
Closing this PR because it has been inactive for more than 90 days. |
|
The stale sweep closed this. The work continues in oven-sh/WebKit#895, with a smaller scope.
The test rows for Bun are in the body of oven-sh/WebKit#895. They go in with the WebKit bump that first includes that change. |
What does this PR do?
Bumps
WEBKIT_VERSIONto pick up oven-sh/WebKit#340 and adds test coverage for theAggregateErrorthatPromise.anyrejects with.Problem
The
AggregateErrorrejected byPromise.anyhas no.stack(it isundefined, not even an own property), an empty.message, and a spurious owncause: undefined:A user-constructed
new AggregateError(...)in the same process has a stack and no owncause, so this is specific to thePromise.anyconstruction path. The result is that the most common real-worldAggregateError(aPromise.anyfan-in where every branch rejected) is an undebuggable rejection.Cause
The five
Promise.anyrejection sites inJSPromiseConstructor.cpp/JSMicrotask.cppcallcreateAggregateError(vm, structure, errors, String(), jsUndefined()).ErrorInstance::finishCreationinstallscausewhenever the passedJSValueis non-empty, sojsUndefined()becomes an owncause: undefined; the nullString()leaves no ownmessage.The async paths (
promiseAnyResolveJob, the reject element functions) run from a native internal microtask with no JS frames on the stack, som_stackTraceis an empty vector andmaterializeErrorInfoIfNeeded's Bun branch (gated on!m_stackTrace->isEmpty()) never runs, leaving.stackunmaterialized.Fix (in oven-sh/WebKit#340)
createAggregateErrorForPromiseAnyRejection, which passes an emptyJSValue()forcauseand, underUSE(BUN_JSC_ADDITIONS), V8's"All promises were rejected"message. Route all five call sites through it.materializeErrorInfoIfNeeded, drop theisEmpty()gate on the Bun branch so the embedder hook still runs for zero-frame errors and produces the"Name: message"header;line/column/sourceURLare only set when there are frames.Verification
With this bump:
which matches Node. The new test covers every
Promise.anyrejection path: the fast-path internal microtask, the empty-iterable synchronous rejection, the subclass slow path (both async and empty), and a custom thenable. It also asserts that user-constructedAggregateErrorwith and without an explicitcauseis unchanged.This is the error-object half of #29157; #35174 covers the
console.dir/Bun.inspectprint path that currently skips the aggregate header. With both in, the #29157 repro printsAggregateError: All promises were rejectedfollowed by the member errors.Also in this range (oven-sh/WebKit 549170099226..6e83cef951dc)