Skip to content

fix(fetch): tee Response bodies for every public source - #1692

Merged
ldm0 merged 1 commit into
wpt/20261018-request-body-native-transferfrom
wpt/20261018-response-body-native-tee
Nov 4, 2026
Merged

ldm0 merged 1 commit into
wpt/20261018-request-body-native-transferfrom
wpt/20261018-response-body-native-tee

Conversation

@ldm0

@ldm0 ldm0 commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Response.clone copied replay bytes or invoked public constructors for several body sources, so streams, cancellation and independently mutable clone state diverged across sources.

Clone every public Response body through native tee operations in the receiver realm, preserve null/filtered bodies, and retain flattened replay metadata. Reuse the independent public and internal native Headers list copying introduced in #1690, preserving guards and immutability without invoking public constructors. Keep the complete Window/child/Worker source matrix, byte-copy, BYOB, lock, cancellation, error and null-body fixtures. Select the shared body consumer reader directly from the already-resolved native source, retaining one reader decision after the obsolete object lookup helper is removed. A retained network producer marks body usage only while it still belongs to that public owner; tee reads cannot consume a former owner branch. Response admission consults the shared actual-body disturbance check, including after reader release. Preserve all original UTF-8, Blob URL and Service Worker filter regressions and add a public Service Worker clone/read/release admission regression.

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

Depends on #1691. One topic commit.

Validation before committing 7dc7d7faf805, with 32 build jobs, 16 Nextest threads, and zero retries:

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

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Spider Bench A/B

✅ All benchmark browser service runs completed; results are informational.

Public HEAD: 189 / 240 rows; 39 / 48 sites produced rows; 9 unexpected empty sites.

✅ Deterministic fixture contract is clean.

Common ancestor 847298c1f903 → HEAD 07534aefd1be; benchmark order: base-first; workflow: success.

Public 48-site run · informational

Metric Base HEAD Δ
Run status success success —
Extracted rows / contract 189 / 240 189 / 240 0 (0.00%)
Contract fill 78.75% 78.75% 0.00 pp (0.00%)
Sites with rows 39 / 48 39 / 48 0 (0.00%)
Sites meeting row contract 37 / 48 37 / 48 0 (0.00%)
Unexpected empty sites 9 9 0 (0.00%)
Partial-row sites 2 2 0 (0.00%)
Site outcomes extracted: 38; HTTP error + rows: 1; empty: 8; snapshot error + empty: 1 extracted: 37; HTTP error + rows: 2; empty: 8; snapshot error + empty: 1 —
Observed duration 49.42 s 51.99 s +2.57 s (+5.20%)
Estimated CPU 44.98 s 41.45 s -3.53 s (-7.85%)
Peak PSS 251.99 MiB 251.43 MiB -0.56 MiB (-0.22%)
Peak RSS 254.48 MiB 255.27 MiB +0.79 MiB (+0.31%)
Peak threads 32 31 -1 (-3.12%)
Mismatched sites 0 0 0
Timeout with items 0 0 0
Category rows Base HEAD Δ
news 35 / 40 35 / 40 0
stocks 20 / 40 20 / 40 0
tech 35 / 40 35 / 40 0
sports 27 / 40 27 / 40 0
games 37 / 40 37 / 40 0
life 35 / 40 35 / 40 0

Public-site content, timing, and memory are noisy. This single A/B run reports evidence only; site outcome counts explain missing rows without treating them as a deterministic regression.

CPU and memory timelines

These are bounded 40-point views of the same complete process-tree samples used by the HTML report. CPU uses 100% per occupied logical core; memory lines are RSS first and PSS second when complete PSS samples are available.

Base

xychart-beta
    title "Base CPU"
    x-axis "Elapsed seconds" [1.538, 2.54, 3.04, 4.042, 5.543, 7.044, 8.545, 9.547, 11.048, 12.55, 14.051, 15.052, 16.555, 17.056, 18.058, 19.561, 20.562, 22.065, 23.568, 25.07, 26.072, 27.574, 29.076, 30.579, 31.581, 33.083, 34.585, 36.087, 37.089, 38.589, 40.091, 41.592, 42.594, 44.097, 45.597, 47.099, 48.1, 49.101]
    y-axis "CPU percent" 0 --> 200
    line [131.95, 117.86, 115.87, 131.8, 137.99, 141.94, 89.82, 101.79, 135.91, 6, 103.8, 93.97, 39.91, 0, 17.96, 79.85, 43.97, 99.78, 113.74, 147.73, 145.73, 63.93, 99.82, 43.91, 73.82, 113.86, 49.97, 129.74, 131.88, 7.99, 97.98, 99.88, 99.77, 99.85, 93.91, 65.81, 135.91, 175.76]
Loading
xychart-beta
    title "Base memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.037, 1.538, 2.54, 3.04, 4.042, 5.543, 7.044, 8.545, 9.547, 11.048, 12.55, 14.051, 15.052, 16.555, 17.056, 18.058, 19.561, 20.562, 22.065, 23.568, 25.07, 26.072, 27.574, 29.076, 30.579, 31.581, 33.083, 34.585, 36.087, 37.089, 38.589, 40.091, 41.592, 42.594, 44.097, 45.597, 47.099, 48.1, 49.101, 49.425]
    y-axis "Memory MiB" 0 --> 500
    line [13.81, 102.12, 103.01, 116.33, 140.28, 132.66, 143.14, 149.16, 145.76, 137.46, 123.97, 149.33, 143.75, 121.89, 121.9, 130.32, 128.86, 151.38, 142.38, 254.48, 187.32, 196.97, 144.62, 181.67, 132.53, 135.8, 146.06, 142.43, 234.12, 227.25, 150.04, 145.5, 173.62, 173.72, 173.72, 164.51, 129.99, 145.11, 176.18, 0]
    line [10.63, 98.73, 99.61, 112.96, 136.88, 129.2, 139.65, 145.45, 142.3, 133.37, 120.51, 145.88, 140.41, 118.31, 118.32, 126.76, 125.44, 148.08, 139, 251.99, 183.83, 193.42, 141.08, 177.98, 128.98, 132.27, 142.51, 138.88, 230.5, 223.77, 146.5, 141.95, 170.07, 170.17, 170.17, 160.64, 126.44, 141.56, 172.51, 0]
Loading

HEAD

xychart-beta
    title "HEAD CPU"
    x-axis "Elapsed seconds" [1.537, 2.539, 3.039, 4.04, 4.54, 6.042, 7.044, 8.546, 10.049, 11.551, 12.052, 13.053, 14.554, 16.054, 17.554, 19.054, 20.054, 21.555, 23.057, 24.557, 26.059, 27.561, 29.062, 30.564, 32.065, 33.066, 34.569, 36.07, 37.573, 39.076, 40.579, 42.082, 43.583, 45.086, 46.087, 47.589, 49.091, 50.592]
    y-axis "CPU percent" 0 --> 200
    line [109.91, 107.94, 117.93, 112.02, 149.89, 127.9, 143.71, 139.88, 123.7, 16, 0, 111.72, 54.02, 18, 4, 0, 0, 1.99, 87.95, 112.06, 105.81, 151.75, 121.78, 133.85, 121.8, 57.92, 59.95, 89.95, 43.86, 89.8, 9.99, 139.83, 99.85, 99.85, 99.9, 145.83, 23.98, 121.86]
Loading
xychart-beta
    title "HEAD memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.036, 1.537, 2.539, 3.039, 4.04, 4.54, 6.042, 7.044, 8.546, 10.049, 11.551, 12.052, 13.053, 14.554, 16.054, 17.554, 19.054, 20.054, 21.555, 23.057, 24.557, 26.059, 27.561, 29.062, 30.564, 32.065, 33.066, 34.569, 36.07, 37.573, 39.076, 40.579, 42.082, 43.583, 45.086, 46.087, 47.589, 49.091, 50.592, 51.995]
    y-axis "Memory MiB" 0 --> 500
    line [13.99, 93.54, 118.61, 144.89, 138.61, 141.71, 147.7, 144.01, 144.59, 176.2, 121.47, 121.96, 148.92, 118.01, 122.13, 118.96, 118.95, 118.95, 118.88, 143.87, 146.12, 255.27, 182.21, 165.47, 131.02, 154.18, 133.98, 140.66, 142.53, 148.7, 145.77, 130.08, 152.99, 164.01, 164.03, 164.03, 139.04, 141.94, 151.03, 0]
    line [10.64, 90.14, 115.35, 141.14, 135.29, 135.83, 144.2, 140.53, 140.85, 172.55, 117.89, 118.38, 145.34, 114.43, 118.55, 115.38, 115.38, 115.38, 115.3, 140.38, 142.58, 251.43, 178.66, 162.22, 127.44, 150.77, 130.29, 137.65, 138.86, 145.03, 142.21, 126.41, 149.38, 160.33, 160.35, 160.36, 135.37, 138.27, 147.63, 0]
Loading

Deterministic fixture · required contract

The fixture exercises 15 routes: 8 are expected to emit rows and 7 intentionally exercise empty, loading, or timeout behavior.

Metric Base HEAD Δ
Run status success success —
Extracted rows / contract 40 / 40 40 / 40 0 (0.00%)
Contract fill 100.00% 100.00% 0.00 pp (0.00%)
Sites with rows 8 / 15 8 / 15 0 (0.00%)
Sites meeting row contract 15 / 15 15 / 15 0 (0.00%)
Unexpected empty sites 0 0 0
Partial-row sites 0 0 0
Site outcomes extracted: 7; HTTP error + rows: 1; empty: 3; timeout + empty: 4 extracted: 7; HTTP error + rows: 1; empty: 3; timeout + empty: 4 —
Observed duration 19.87 s 19.86 s -0.01 s (-0.05%)
Estimated CPU 0.42 s 0.42 s 0.00 s (0.00%)
Peak PSS 69.92 MiB 69.99 MiB +0.07 MiB (+0.11%)
Peak RSS 73.55 MiB 73.71 MiB +0.16 MiB (+0.22%)
Peak threads 21 21 0 (0.00%)
Mismatched sites 0 0 0
Timeout with items 0 0 0

Full HTML, JSON, CSV, logs, and page snapshots: workflow run and full spider-bench-results artifact.

The public-web A/B is informational. The exact HEAD fixture contract runs as a separate required CI check; timing and public-site content deltas remain non-blocking.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Sequential Navigation Soak A/B

✅ HEAD completed the 200-navigation resilience and memory observation.

One browser process, one target, and one CDP session navigate CSDN → SegmentFault → Huaban → example.com repeatedly. This run issued 200 Page.navigate commands per binary.

Common ancestor 847298c1f9 → HEAD 07534aefd1; benchmark order: base-first; workflow: success.

Session resilience

Metric Base HEAD
Attempted / planned 200 / 200 200 / 200
Direct observable pass 197 / 200 194 / 200
Failures / recovered 3 / 3 6 / 6
Recovery failures 0 0
Lifecycle order violations 0 0
Network order violations 0 0
Wall time 577.8 s 636.8 s

A public-page failure is reported separately from an unrecoverable session. The soak requires all navigation attempts, zero failed recovery, zero lifecycle/network ordering violations, and complete resource evidence.

Process-tree memory

Metric Base HEAD Δ
Boundary samples 200 200 0
Boundary RSS samples 200 200 0
Boundary PSS samples 200 200 0
Periodic peak RSS 253.3 MiB 256.5 MiB +3.2 MiB
Periodic peak PSS 250.8 MiB 253.1 MiB +2.3 MiB
RSS · first 10 avg 180.6 MiB 186.6 MiB +6.0 MiB
RSS · last 10 avg 180.2 MiB 201.4 MiB +21.2 MiB
RSS · last − first window -0.4 MiB +14.8 MiB +15.2 MiB
RSS · warm slope / 100 nav +5.9 MiB +6.2 MiB +0.3 MiB
PSS · first 10 avg 177.3 MiB 183.8 MiB +6.5 MiB
PSS · last 10 avg 177.2 MiB 197.9 MiB +20.7 MiB
PSS · last − first window -0.1 MiB +14.1 MiB +14.2 MiB
PSS · warm slope / 100 nav +6.0 MiB +5.8 MiB -0.3 MiB
Peak file descriptors 69 67 -2
Peak threads 33 32 -1

HEAD memory by 50-navigation quarter

HEAD range Avg RSS Final RSS Peak RSS Avg PSS Final PSS Peak FD
1–50 184.4 MiB 163.3 MiB 227.2 MiB 181.5 MiB 160.4 MiB 60
51–100 194.4 MiB 226.6 MiB 228.6 MiB 191.6 MiB 223.3 MiB 61
101–150 185.0 MiB 181.4 MiB 224.2 MiB 181.9 MiB 178.2 MiB 60
151–200 195.3 MiB 228.5 MiB 232.1 MiB 191.8 MiB 224.9 MiB 62

Raw reports and per-navigation boundary samples: workflow run and full sequential-navigation-soak-results artifact.

Public-site timing and memory are observational. Use the A/B deltas and trend shape as evidence, not as a deterministic performance threshold.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

CI Regression Report

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

Check Status Signal
Release regression ✅ HEAD/base failures 0/0; raw binary −0.003031%
Frontend differential ✅ 1,020/1,020 cases matched; 0 issues
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 — ✅ HEAD/base failures 0/0; raw binary −0.003031%

Package and image size

Metric Base HEAD Delta Delta %
Raw binary 153.28 MiB 153.28 MiB −4.76 KiB −0.003031%
Stripped binary 105.86 MiB 105.86 MiB −4.00 KiB −0.003690%
gzip binary 52.85 MiB 52.85 MiB −1.34 KiB −0.002481%
Rootfs 160.19 MiB 160.19 MiB 0 B 0.00%
gzip rootfs 61.89 MiB 61.89 MiB −2.54 KiB −0.004008%

Startup latency and PSS

Case Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta
Serve ready 26.88 ms 26.86 ms −0.03 ms 4.79 MiB 4.68 MiB −114.00 KiB
CDP first page 49.16 ms 48.58 ms −0.58 ms 4.87 MiB 4.32 MiB −558.50 KiB
CDP warm page 12.39 ms 11.64 ms −0.75 ms 52.30 MiB 52.45 MiB +152.00 KiB
CLI about:blank 17.61 ms 18.22 ms +0.61 ms 3.90 MiB 3.94 MiB +45.00 KiB
CLI local JS 24.80 ms 25.34 ms +0.54 ms 4.09 MiB 3.61 MiB −497.50 KiB

Concurrency matrix

Concurrency Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta HEAD failures Unstable B/H
1 22.20 ms 23.50 ms +1.30 ms 598.00 KiB 601.00 KiB +3.00 KiB 0 0/0
5 25.42 ms 27.03 ms +1.61 ms 12.68 MiB 12.03 MiB −674.50 KiB 0 0/0
10 26.24 ms 27.48 ms +1.23 ms 13.75 MiB 13.27 MiB −483.00 KiB 0 0/0
25 27.08 ms 27.08 ms −0.00 ms 12.95 MiB 14.08 MiB +1.14 MiB 0 0/0
100 27.57 ms 26.77 ms −0.80 ms 13.58 MiB 13.45 MiB −135.00 KiB 0 0/0
Frontend differential — ✅ 1,020/1,020 cases matched; 0 issues
Match DOM mismatch Diagnostic mismatch Moli error Reference error Infrastructure error Mismatched frames Duration
1,020 0 0 0 0 0 0 6m 42.75s
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.59 ms 29.89 ms
Chromium 8 8 47/47 246.15 ms 89.96 ms
Operation p50 Chromium Moli Delta Delta %
navigate 44.29 ms 5.97 ms −38.32 ms −86.52%
observe 0.93 ms 0.99 ms +0.06 ms +6.26%
fill 3.60 ms 3.27 ms −0.33 ms −9.11%
click 5.22 ms 3.86 ms −1.36 ms −26.02%
Idle-resource episode Peak RSS Peak PSS Average CPU Peak CPU Peak processes Sampler
Moli 70.07 MiB 68.42 MiB 0.81% 11.99% 1 ✅
Chromium 1289.84 MiB 352.00 MiB 0.69% 20.12% 13 ✅
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.19 ms 24.03 ms 661.00 KiB
Long-lived CDP session 13 0 18.15 ms 18.61 ms —
CDP smoke — ✅ 108/108 groups passed; 1,402 scenarios

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

Slowest group Scenarios Duration Status
dom-input 62 28.54 s ✅
dom-input 62 28.40 s ✅
scrollbar-visibility 22 27.64 s ✅
scrollbar-visibility 22 27.63 s ✅
target-lifecycle 25 22.82 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.

@ldm0
ldm0 added this pull request to stack #1695 October 18, 2026 11:51
@ldm0
ldm0 force-pushed the wpt/20261018-response-body-native-tee branch from 5b6df70 to a195b6f Compare November 3, 2026 14:51
@ldm0
ldm0 force-pushed the wpt/20261018-response-body-native-tee branch from a195b6f to 07534ae Compare November 3, 2026 19:04
@ldm0
ldm0 force-pushed the wpt/20261018-response-body-native-tee branch from 07534ae to 7dc7d7f Compare November 4, 2026 07:02
@ldm0
ldm0 merged commit 0e27616 into main Nov 4, 2026
5 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