Skip to content

fix(fetch): transfer Request bodies through native streams - #1691

Merged
ldm0 merged 1 commit into
wpt/20261018-constructed-blob-fetch-bodiesfrom
wpt/20261018-request-body-native-transfer
Nov 4, 2026
Merged

ldm0 merged 1 commit into
wpt/20261018-constructed-blob-fetch-bodiesfrom
wpt/20261018-request-body-native-transfer

Conversation

@ldm0

@ldm0 ldm0 commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Constructing or cloning a Request with native replay bytes copied those bytes instead of transferring or teeing its current public stream, bypassing cancellation, errors and task ordering.

Transfer every inherited Request body through a native stream proxy and clone through native tee operations in the Request realm. Preserve immutable replay metadata in a flattened native carrier while routing reads through the current stream. Keep main’s native Headers implementation and the complete transfer, lock/disturbance, clone, cancellation and realm fixtures. Copy the raw native header list when cloning so later no-cors refill retains individual entries. Propagate RequestInit signal lookup exceptions before transferring an input stream, preserving its unused state on failed conversion. The existing Window/worker exception and header guard regressions are unchanged.

Preserve current main's typed RequestInit conversion and bytes::Bytes snapshots. Signal conversion errors propagate before body transfer through the existing single-conversion path; do not repeat author property lookup.

Reuse the selected-body Fetch materialization introduced in #1690, including read error propagation and explicit replacement-body handling. The concrete child-realm Networking restoration and removed-iframe Worker regression are provided by #1689.

Rebased onto main 57da451d9657 through the existing PR dependencies. Preserve this layer's reviewed behavior and the unchanged original JS fixtures.

Depends on #1690. One topic commit.

Validation before committing 3ffbe25cb11f, with 32 build jobs, 16 Nextest threads, and zero retries:

  • cargo fmt --all
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • 189 focused tests passed.
  • cargo nextest run --no-fail-fast: 22,382 passed, 20 skipped.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

CI Regression Report

Source CI run · source state at render: failure · artifacts: 5/6

Check Status Signal
Release regression ⚪ artifact unavailable or invalid
Frontend differential ✅ 1,020/1,020 cases matched; 0 issues; 1 Chromium reference recoveries
Agent episodes ✅ 8/8 Moli episodes passed; 0 failures
Runtime/CDP contracts ✅ 26 contract cases; 0 failures
CDP smoke ✅ 108/108 groups passed; 1,402 scenarios
WebMainBench ✅ 545/545 completed; 0 unexpected failures
Release regression — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

Frontend differential — ✅ 1,020/1,020 cases matched; 0 issues; 1 Chromium reference recoveries
Match DOM mismatch Diagnostic mismatch Moli error Reference error Infrastructure error Mismatched frames Duration
1,020 0 0 0 0 0 0 8m 17.41s

Recovered Chromium reference infrastructure failures

  • react/network-storage-boundaries/redirect-method-chain — 1 failed attempt(s) before recovery · timed out waiting for Page.loadEventFired event after 92s
Agent episodes · Moli vs Chromium — ✅ 8/8 Moli episodes passed; 0 failures
Fast contract Episodes Passed Assertions Ready p50 Episode p50
Moli 8 8 47/47 28.70 ms 31.44 ms
Chromium 8 8 47/47 267.25 ms 87.56 ms
Operation p50 Chromium Moli Delta Delta %
navigate 43.97 ms 6.33 ms −37.64 ms −85.59%
observe 0.85 ms 0.93 ms +0.08 ms +9.80%
fill 3.73 ms 3.49 ms −0.24 ms −6.51%
click 3.37 ms 4.18 ms +0.81 ms +24.02%
Idle-resource episode Peak RSS Peak PSS Average CPU Peak CPU Peak processes Sampler
Moli 70.15 MiB 66.77 MiB 0.80% 12.00% 1 ✅
Chromium 1279.25 MiB 406.43 MiB 0.65% 6.02% 13 ⚠️ PSS partial
Runtime and CDP session contracts — ✅ 26 contract cases; 0 failures
Suite Cases Failures Median case p50 Median case p95 Median peak PSS p50
Synthetic fetch 13 0 23.97 ms 25.61 ms 874.00 KiB
Long-lived CDP session 13 0 18.19 ms 18.41 ms —
CDP smoke — ✅ 108/108 groups passed; 1,402 scenarios

Workers: 4 · cumulative group time: 459.99 s · failed groups: 0

Slowest group Scenarios Duration Status
dom-input 62 27.84 s ✅
dom-input 62 27.74 s ✅
scrollbar-visibility 22 27.64 s ✅
scrollbar-visibility 22 27.63 s ✅
target-lifecycle 25 22.07 s ✅
WebMainBench · 545 pages — ✅ 545/545 completed; 0 unexpected failures
Completed Successful Expected DNS failure Unexpected failures Panics Crashes Timeouts Empty output
545/545 544 1 0 0 0 0 0

Frozen HTML · Linux · --wait done · 45 seconds per page · no retries. Content quality is evaluated separately.

Diagnostics: webmainbench-results — every page's Markdown, stderr, and exit status. Source run and artifacts

All artifact fields are parsed by the trusted default-branch renderer; missing or invalid inputs remain visible as unavailable.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Spider Bench A/B

⚠️ Spider Bench infrastructure failed before a comparison could be produced.

Workflow: failure. Inspect the workflow run for the failing build, harness, or artifact step.

No benchmark result or performance conclusion is available for this run.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Sequential Navigation Soak A/B

⚠️ Benchmark infrastructure failed before a comparison could be produced.

Workflow: failure. Inspect the workflow run for the failing build, harness, or artifact step.

No navigation resilience or memory conclusion is available for this run.

@ldm0
ldm0 added this pull request to stack #1695 October 18, 2026 11:51
@ldm0
ldm0 force-pushed the wpt/20261018-request-body-native-transfer branch from 7ed4daf to 46a834c Compare November 3, 2026 14:40
@ldm0
ldm0 force-pushed the wpt/20261018-request-body-native-transfer branch from 46a834c to 847298c Compare November 3, 2026 18:54
@ldm0
ldm0 force-pushed the wpt/20261018-request-body-native-transfer branch from 847298c to 3ffbe25 Compare November 4, 2026 06:50
@ldm0
ldm0 merged commit a45e6e0 into main Nov 4, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant