Repository navigation
fix(fetch): read constructed Blob bodies on file-reading tasks - #1690
Conversation
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 Public 48-site run · informational
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 timelinesThese 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. Basexychart-beta
title "Base CPU"
x-axis "Elapsed seconds" [1.036, 2.037, 2.538, 3.538, 5.04, 6.042, 7.545, 8.547, 9.548, 11.05, 12.052, 13.554, 14.555, 15.557, 17.059, 18.061, 19.563, 20.565, 22.067, 23.069, 24.071, 25.573, 26.574, 28.077, 28.577, 29.078, 30.079, 31.58, 32.581, 34.083, 35.084, 36.586, 37.588, 38.59, 40.091, 41.092, 42.594, 43.095]
y-axis "CPU percent" 0 --> 200
line [31.97, 105.91, 135.84, 107.92, 123.74, 139.7, 157.67, 85.79, 135.95, 117.78, 19.96, 52.01, 125.75, 115.94, 43.91, 127.75, 85.79, 103.77, 111.7, 101.81, 111.72, 125.79, 97.82, 9.99, 0, 35.97, 69.94, 113.9, 17.98, 151.86, 91.9, 0, 0, 105.84, 153.81, 41.97, 137.74, 167.66]
xychart-beta
title "Base memory: RSS then PSS"
x-axis "Elapsed seconds" [0.036, 1.036, 2.037, 2.538, 3.538, 5.04, 6.042, 7.545, 8.547, 9.548, 11.05, 12.052, 13.554, 14.555, 15.557, 17.059, 18.061, 19.563, 20.565, 22.067, 23.069, 24.071, 25.573, 26.574, 28.077, 28.577, 29.078, 30.079, 31.58, 32.581, 34.083, 35.084, 36.586, 37.588, 38.59, 40.091, 41.092, 42.594, 43.095, 43.21]
y-axis "Memory MiB" 0 --> 500
line [14.16, 85.96, 106.82, 117.43, 127.08, 151.52, 137.23, 132.21, 134.07, 135.65, 137.05, 130.97, 124.6, 161.92, 145.58, 123.93, 144.21, 146.44, 141.55, 280.22, 184.96, 197.65, 133.02, 196.64, 129.07, 129.07, 131.54, 133.29, 143.61, 141.1, 170.37, 150.58, 126.33, 126.23, 156.75, 163.11, 149.11, 163.79, 175.91, 0]
line [11.03, 82.73, 103.51, 114.12, 123.78, 148.2, 133.92, 128.91, 130.78, 132.35, 133.91, 127.84, 121.25, 158.65, 142.26, 120.61, 140.98, 143.02, 138.04, 281.35, 181.47, 189.56, 129.62, 193.29, 125.73, 125.62, 128.09, 129.99, 140.14, 137.65, 167.07, 147.13, 122.88, 122.78, 154.08, 159.24, 145.68, 160.36, 172.46, 0]
HEADxychart-beta
title "HEAD CPU"
x-axis "Elapsed seconds" [1.036, 1.537, 2.538, 4.04, 4.54, 5.04, 6.54, 7.542, 9.044, 10.044, 11.546, 12.548, 14.051, 15.051, 16.554, 17.555, 19.058, 20.06, 21.563, 23.063, 24.065, 25.567, 26.568, 28.069, 29.07, 30.571, 31.573, 33.074, 34.076, 34.577, 35.578, 36.58, 38.083, 39.084, 40.585, 41.586, 43.087, 44.089]
y-axis "CPU percent" 0 --> 200
line [4, 109.72, 109.84, 115.91, 163.79, 124.04, 130.01, 135.88, 107.92, 125.99, 85.97, 133.73, 5.99, 44.02, 115.74, 121.94, 135.74, 109.84, 149.74, 128.01, 81.8, 91.88, 87.96, 69.96, 67.95, 53.94, 45.88, 80.02, 45.92, 2, 91.96, 101.71, 99.92, 99.87, 124.04, 157.83, 91.93, 111.89]
xychart-beta
title "HEAD memory: RSS then PSS"
x-axis "Elapsed seconds" [0.035, 1.036, 1.537, 2.538, 4.04, 4.54, 5.04, 6.54, 7.542, 9.044, 10.044, 11.546, 12.548, 14.051, 15.051, 16.554, 17.555, 19.058, 20.06, 21.563, 23.063, 24.065, 25.567, 26.568, 28.069, 29.07, 30.571, 31.573, 33.074, 34.076, 34.577, 35.578, 36.58, 38.083, 39.084, 40.585, 41.586, 43.087, 44.089, 45.142]
y-axis "Memory MiB" 0 --> 500
line [13.84, 64.63, 97.96, 110.52, 148.1, 133.71, 142.52, 132.28, 160.3, 155.82, 154.89, 129.06, 134.75, 132.07, 138.02, 162.16, 153.58, 159.45, 255.64, 197.86, 164.03, 148.97, 158.33, 155.18, 135.18, 140.8, 149.43, 144.59, 145.71, 144.62, 144.62, 147.75, 172.52, 177.36, 177.36, 165.8, 148.27, 143.43, 171.71, 0]
line [10.68, 61.24, 94.57, 107.12, 144.88, 131.07, 139.18, 128.81, 156.97, 152.48, 151.44, 125.6, 132.25, 128.6, 134.63, 158.77, 150.2, 156.04, 251.68, 194.24, 160.39, 145.46, 154.69, 151.73, 131.66, 137.42, 145.98, 141.12, 142.4, 141.29, 141.29, 144.42, 169.19, 174.02, 174.02, 162.87, 145.32, 141.52, 167.57, 0]
Deterministic fixture · required contractThe fixture exercises 15 routes: 8 are expected to emit rows and 7 intentionally exercise empty, loading, or timeout behavior.
Full HTML, JSON, CSV, logs, and page snapshots: workflow run and full 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. |
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 Common ancestor Session resilience
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
HEAD memory by 50-navigation quarter
Raw reports and per-navigation boundary samples: workflow run and full Public-site timing and memory are observational. Use the A/B deltas and trend shape as evidence, not as a deterministic performance threshold. |
CI Regression ReportSource CI run · source state at render:
Release regression — ✅ HEAD/base failures 0/0; raw binary +0.006053%Package and image size
Startup latency and PSS
Concurrency matrix
Frontend differential — ✅ 1,020/1,020 cases matched; 0 issues
Agent episodes · Moli vs Chromium — ✅ 8/8 Moli episodes passed; 0 failures
Runtime and CDP session contracts — ✅ 26 contract cases; 0 failures
CDP smoke — ✅ 108/108 groups passed; 1,402 scenariosWorkers: 4 · cumulative group time: 470.73 s · failed groups: 0
WebMainBench · 545 pages — ✅ 545/545 completed; 0 unexpected failures
Frozen HTML · Linux · Diagnostics: All artifact fields are parsed by the trusted default-branch renderer; missing or invalid inputs remain visible as unavailable. |
7c2dc73 to
bce8b5f
Compare
bce8b5f to
b9ebae5
Compare
b9ebae5 to
3c81fab
Compare
Constructing a Request or Response from a Blob eagerly copied its bytes and bypassed the Blob FileReading task and current stream state. Retain a typed native BodyInit source and create Blob-backed streams through the shared FileReading FIFO, preserving source metadata, MIME, realm ownership, and the receiver-owned Networking completion from #1689. Keep typed RequestInit conversion, bytes::Bytes storage, and lazy Blob I/O; XHR and beacon retain their existing buffered paths.
Propagate Blob/File read failures through both direct fetch and inherited Request uploads before starting transport. Fetch materializes only the selected input body, so an explicit replacement does not read an unreadable old body. Copy public and internal native Headers lists with their guards and immutability when cloning a Blob-backed Response; this fix is included here so this layer is independently safe to merge.
The unchanged Window/child and worker fixtures retain 856 and 76 assertions. New regressions use a normally responding local HTTP server and assert TypeError plus zero requests for unreadable Blob/File/FormData uploads, with successful replacement-body and GET controls. A separate 64-assertion Window/child Blob/File matrix checks independent Headers identity, mutation, entries, MIME and realm. Preserve the existing unreadable-source construction/NotReadableError checks, all 12 Request/Response/fetch/XHR paths, multipart errors, and zero author string coercions.
Integrate current main's native HTML/XML Document serialization and UTF-8 XHR charset policy with typed BodyInit buffering. Preserve URLSearchParams/text charset rewriting and the existing Blob/File/FormData/BufferSource policy.
Rebased onto main
57da451d9657through the existing PR dependencies. Preserve this layer's reviewed behavior and the unchanged original JS fixtures.Depends on #1689. One topic commit.
Validation before committing
3c81fabcc888, with 32 build jobs, 16 Nextest threads, and zero retries:cargo fmt --allcargo clippy --workspace --all-targets --all-features -- -D warningscargo nextest run --no-fail-fast: 22,377 passed, 20 skipped.