Skip to content

fix(wait): keep domstable open for async scripts, starting iframes and workers - #2776

Open
lanyue-llk wants to merge 3 commits into
mainfrom
fix/domstable-pending-loads
Open

lanyue-llk wants to merge 3 commits into
mainfrom
fix/domstable-pending-loads

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

PR #2776 at a glance

**Track:** Web Fetch (Browser Eval). Replaces part of #1584.

Closes #2770.
Replaces part of #1584.

Problem. moli fetch URL --wait domstable returned while a parser-inserted async script, a starting iframe or a dedicated Worker script was still loading, so the snapshot missed whatever they write. With each of those delayed 1.8-3 s, e.g. moli fetch http://127.0.0.1:PORT/async.html --wait domstable --dump html returned after ~1.3 s with initial instead of async-ran.

Reproduce (steps from #2770)

Use a server where /delay?d=SEC&body=JS sleeps SEC seconds and then returns JS as JavaScript.

<!-- async.html -->
<p id=s>initial</p>
<script async src="/delay?d=3&body=document.getElementById('s').textContent='async-ran'"></script>

<!-- frame.html: the iframe document (or a script inside it) is delayed 1.8 s -->
<iframe src="/delay?d=1.8&ct=text/html&body=<p>child-doc-ran</p>"></iframe>

<!-- worker.html -->
<p id=s>initial</p>
<script>const w=new Worker('/delay?d=1.8&body=postMessage(%27from-worker%27)');w.onmessage=e=>{s.textContent=e.data}</script>
moli fetch http://127.0.0.1:PORT/async.html --wait domstable --dump html

Expected

  • async.html: async-ran, as Chrome --dump-dom and moli's own --wait networkidle show (3.55 s).
  • frame.html: the child content, as in Chrome.
  • worker.html: from-worker. This is moli's own domstable contract, since a worker script that loads quickly is waited for (0.40 s). Chrome's dump-dom does not wait for workers, so there is no Chromium reference for this case.

Actual

  • async.html (classic and type=module): returns after 1.25 s with initial.
  • frame.html: returns after 1.24 s without the child content.
  • worker.html: returns after 0.39 s with initial.

For comparison, domstable does wait correctly for a fetch() with the same 3 s delay (3.40 s) and for scripts inserted from JavaScript.

Change. In runtime/page_dom.rs, advance_dom_stable_wait_turn only treated post-DOMContentLoaded runtime script work, WebCrypto and OPFS as pending. It now also checks three existing load signals, as a separate pending_loads:

  • has_post_domcontentloaded_load_delaying_runtime_work() for parser-inserted async scripts (made pub(crate) in script_vm/post_parse_lifecycle.rs);
  • has_pending_child_document_lifecycle() for starting iframes;
  • a new one-line has_loading_dedicated_workers() over the existing dedicated-worker loading count (script_vm/runtime_observability.rs).

While any of them is true, the stability timer does not start, the same as for an in-flight fetch(). They are deliberately not latched into saw_post_domcontentloaded_runtime_work. A page whose async script or iframe loaded briefly therefore keeps the 350 ms base quiet window instead of switching to the 1200 ms runtime window.

Verification.
Issue fixtures (local server, delays as in the issue), --wait domstable --dump html --with-frames:

page v1.1.23 this branch
async.html (classic async, 3 s) 1.27 s, initial ~3.5 s, async-ran
module.html (type=module, 3 s) 3.43 s, async-ran 3.47 s, async-ran (already worked)
frame.html (iframe doc, 1.8 s) 1.29 s, no child srcdoc ~2.3 s, srcdoc holds child-doc-ran
worker.html (worker script, 1.8 s) 0.42 s, initial ~2.25 s, from-worker
  • New test fetch_with_domstable_waits_for_async_scripts_iframes_and_workers (moli-core/tests/fetch_behaviors.rs, fixture routes in moli-test-support/src/routes_wait.rs) covers all three loads with a 1.8 s delay.
  • cargo nextest run -p moli -p moli-core -E 'test(domstable) | test(dom_stable)': 25 of 26 passed. The failure was cli_quiet_page_domstable_uses_remaining_best_effort_budget, which then passed 2 of 3 re-runs. That test leaves 250 ms of budget and is timing-sensitive on this loaded host (load average ~10). Against the same scenario (500 ms page, --timeout 750), origin/main also failed 1 of 10 runs, while this branch passed 10 of 10. The page has no async script, iframe or worker, so pending_loads is false and the code path is identical to main.
  • cargo fmt --all clean; cargo clippy -p moli-renderer-v8 --all-targets --all-features -- -D warnings clean. The earlier revision was also clippy-clean for moli-test-support and moli-core. Workspace clippy was not run locally.
  • Rebased onto main after refactor(html): serialize page exports without DOM copies #2836 (head 421b330). The only adaptation: serialize_html_async now takes &mut self, so the new test binds let mut page. On the rebased debug build the issue fixtures give async-ran (3.41 s), the child srcdoc with child-doc-ran (2.24 s) and from-worker (2.22 s). fetch_with_domstable_waits_for_async_scripts_iframes_and_workers passes; -p moli -p moli-core -E 'test(domstable) | test(dom_stable)': 25 of 26, the timing-sensitive cli_quiet_page_domstable_uses_remaining_best_effort_budget again failed once and then passed 4 of 5 re-runs (load average ~12). Clippy on moli-renderer-v8, moli-core and moli-test-support with --all-targets --all-features -D warnings is clean.
  • Not run locally: the full workspace nextest (the renderer test binary does not link within local RAM); left to CI.

Cost. The extra wait happens only while a real parser-inserted async script, starting iframe or loading dedicated Worker is pending. It ends when that load finishes and is always bounded by the existing --wait/--timeout deadline. A dedicated Worker whose script never finishes loading therefore makes domstable wait until that deadline, the same as a hanging fetch() does today. On pages without such loads the three checks are constant-time boolean reads once per poll, and the quiet window is unchanged.
Measured with /usr/bin/time -l on debug builds of origin/main (cbf4d01) and this branch, same profile. Runs alternate main and branch, and each figure is the median of 7:

--wait domstable case main wall / max RSS branch wall / max RSS
ordinary local article (no async/iframe/worker) 0.42 s / 81.2 MB 0.43 s / 81.3 MB
async script delayed 200 ms 0.62 s / 84.1 MB 0.62 s / 83.9 MB
iframe document delayed 200 ms 0.65 s / 86.0 MB 0.66 s / 85.9 MB
async script delayed 3 s 1.32 s / 79.3 MB (wrong output) 3.48 s / 79.4 MB
iframe document delayed 1.8 s 1.27 s / 84.3 MB (wrong output) 2.26 s / 86.2 MB
worker script delayed 1.8 s 0.43 s / 84.2 MB (wrong output) 2.24 s / 85.4 MB

The long-delay pages take longer by design: each now waits for its load plus the 350 ms base quiet window, instead of returning before the content arrives.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review of 37bd3a6

Changes needed (1)

  1. Brief loads now switch domstable to the longer 1200 ms quiet window, adding about 850 ms on ordinary pages. moli-renderer-v8/src/runtime/page_dom.rs:1492-1500. The three new signals are ORed into pending_runtime_work, and line 1497 latches that value into state.saw_post_domcontentloaded_runtime_work. Once the latch is set, dom_stable_window_for_snapshot (page_dom.rs:132-137) uses DOM_STABLE_COMPLETE_RUNTIME_WINDOW (1200 ms) instead of the 350 ms base window for the rest of the wait. So a page with an analytics async script or an ad/embed iframe that is pending for even one 120 ms poll now pays the long window, even though nothing is left running.
    • Measured on v1.1.23 (local server, 200 ms delay, --wait domstable): async.html returns in 0.60 s, frame.html in 0.61 s, plain page in 0.40 s. Under this change both will take about 1.45 s. Your own table shows the extra window: classic async with a 3 s delay takes 4.29 s, but type=module with the same 3 s delay takes 3.45 s.
    • Smallest fix: keep the three load signals in the "do not start the timer" gate and in the snapshot's pending: field, but leave them out of the saw_post_domcontentloaded_runtime_work latch. For example, compute pending_loads separately and use pending_subresource_requests == 0 && !pending_runtime_work && !pending_loads. The base window is still safe here: when the loaded script starts a fetch() it counts as a subresource, and a timer longer than 350 ms is already caught by has_long_pending_timeout. The worker case should still pass, because the worker's postMessage reaches the page as a DOM change after the load finishes.

Checked, not blocking:

  • Unbounded pending state. A 404 or failed worker script calls forget_worker (script_vm/dedicated_worker_client_event_body.rs:~170), and terminate() forgets the worker too, so neither stays Loading. Long-lived running workers are not counted, because has_loading_dedicated_workers counts only Loading. For a never-loading iframe or a hanging async script, networkidle already waits the same way: has_pending_child_document_lifecycle is the same signal in page_network.rs:36, and on v1.1.23 a 60 s async script makes networkidle use the whole 4 s --timeout. In every case the shared deadline returns the best-effort page (moli-core/src/runtime/mod.rs:851-869). One difference: networkidle ignores worker script loads. On v1.1.23 a 60 s worker script gives networkidle 0.56 s, but with this change domstable will wait the whole --timeout (25 s by default). This matches how domstable already treats a hanging fetch(), and the fixed deadline still bounds it, so I am not counting it as a finding.
  • Navigation. Workers are cleared with their realm (retire_window_realm_resources, the same path as WebCrypto and OPFS). The async-delay check is scoped to the current main-document owner, and the child lifecycle is scoped to current owners. TriggeredNavigation is checked before the signals.
  • Default path. --wait done, the CLI default, does not use the domstable wait (moli/src/app/readiness.rs:59-71), so it is unaffected.
  • Test. The new fixture runs each kind with a 1.8 s delay. Without the fix, every kind would return at the 1.2 s interactive window, so the test fails. It does not lock in any behavior that differs from Chromium.
  • CI. Nextest, Clippy, Format and CDP smoke pass. The release builds are still pending.
  • Body. The Cost section and the picture are pending.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review of 34cb4f2

No blocking findings

Checked:

  • Round 1 fix. moli-renderer-v8/src/runtime/page_dom.rs:1497-1504: pending_loads is computed after the saw_post_domcontentloaded_runtime_work latch and never feeds it. It only gates the stability timer (line 1518) and the snapshot's runtime: field (line 1513). So once a load ends, the snapshot changes, the timer restarts, and dom_stable_window_for_snapshot (page_dom.rs:126-141) picks the 350 ms base window for a complete document. While an async script or iframe is still pending, the document is interactive, so the stability window is 1200 ms either way. This also explains why the earlier 4.29 s async result is now ~3.5 s.
  • Whole diff. Making has_post_domcontentloaded_load_delaying_runtime_work pub(crate) changes only its visibility. It still returns false before DOMContentLoaded and is scoped to the current main-document owner. has_loading_dedicated_workers counts only Loading workers (context_host/activity.rs:301), so running workers do not hold the wait. has_pending_child_document_lifecycle is the signal networkidle already uses. Every wait stays bounded by the shared deadline.
  • Cost. The numbers are plausible. Ordinary page 0.42 vs 0.43 s. 200 ms async/iframe match v1.1.23 (0.60/0.61 s in round 1), which confirms no long window. Long delays are about load + 350 ms + overhead (3.48, 2.26, 2.24 s). RSS changes are noise.
  • Test. Each of the three kinds uses a 1.8 s delay, longer than the 1.2 s interactive window, so the test fails without the fix. It does not lock in any behavior that differs from Chromium.
  • Body/picture. The picture matches the current body: the pending_loads diagram with the "not latched, 350 ms" note, the before/after table and the first three Cost rows. Closes #2770, the title format and the not-run statements are accurate.
  • CI. Format, Windows storage, Node and Python harness pass. Nextest, Clippy, CDP smoke and the release builds are still pending, so their results are not judged here.

@ldm0

ldm0 commented Nov 12, 2026

Copy link
Copy Markdown
Member

Hmmm, this change would make time-to-domstable on some pages dramatically larger.

@github-actions

github-actions Bot commented Nov 12, 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.00%
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 ✅ 118/118 groups passed; 1,784 scenarios
WebMainBench ✅ 545/545 completed; 0 unexpected failures
Release regression — ✅ HEAD/base failures 0/0; raw binary 0.00%

Package and image size

Metric Base HEAD Delta Delta %
Raw binary 154.51 MiB 154.51 MiB 0 B 0.00%
Stripped binary 106.92 MiB 106.92 MiB 0 B 0.00%
gzip binary 53.41 MiB 53.41 MiB −406 B −0.000725%
Rootfs 161.42 MiB 161.42 MiB 0 B 0.00%
gzip rootfs 62.51 MiB 62.51 MiB +691 B +0.001054%

Startup latency and PSS

Case Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta
Serve ready 26.96 ms 26.89 ms −0.06 ms 4.71 MiB 4.75 MiB +42.50 KiB
CDP first page 50.54 ms 49.88 ms −0.66 ms 5.09 MiB 5.24 MiB +155.00 KiB
CDP warm page 11.58 ms 11.98 ms +0.40 ms 53.45 MiB 53.38 MiB −68.50 KiB
CLI about:blank 14.55 ms 13.41 ms −1.14 ms 4.41 MiB 4.23 MiB −185.50 KiB
CLI local JS 26.99 ms 26.08 ms −0.91 ms 4.72 MiB 3.45 MiB −1.27 MiB

Concurrency matrix

Concurrency Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta HEAD failures Unstable B/H
1 24.50 ms 24.38 ms −0.12 ms 611.00 KiB 628.00 KiB +17.00 KiB 0 0/0
5 27.83 ms 27.63 ms −0.20 ms 29.14 MiB 14.77 MiB −14.37 MiB 0 0/0
10 27.59 ms 28.67 ms +1.09 ms 15.55 MiB 12.67 MiB −2.88 MiB 0 0/0
25 27.42 ms 29.11 ms +1.70 ms 12.64 MiB 13.60 MiB +978.25 KiB 0 0/0
100 27.61 ms 27.82 ms +0.21 ms 11.93 MiB 11.85 MiB −81.50 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 7m 18.06s
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.54 ms 31.88 ms
Chromium 8 8 47/47 350.79 ms 94.13 ms
Operation p50 Chromium Moli Delta Delta %
navigate 43.45 ms 6.32 ms −37.13 ms −85.46%
observe 1.64 ms 0.98 ms −0.66 ms −39.97%
fill 4.25 ms 3.94 ms −0.31 ms −7.19%
click 5.49 ms 4.46 ms −1.03 ms −18.75%
Idle-resource episode Peak RSS Peak PSS Average CPU Peak CPU Peak processes Sampler
Moli 70.02 MiB 68.22 MiB 0.92% 10.08% 1 ✅
Chromium 1327.27 MiB 441.06 MiB 1.56% 76.04% 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 24.48 ms 24.77 ms 763.00 KiB
Long-lived CDP session 13 0 18.13 ms 18.82 ms —
CDP smoke — ✅ 118/118 groups passed; 1,784 scenarios

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

Slowest group Scenarios Duration Status
dom-input 62 19.55 s ✅
dom-input 62 19.49 s ✅
fetch-resource-dispatch 72 18.42 s ✅
fetch-resource-dispatch 72 18.12 s ✅
scrollbar-visibility 22 15.87 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 Nov 12, 2026 •

Copy link
Copy Markdown

Spider Bench A/B

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

Public HEAD: 184 / 240 rows; 38 / 48 sites produced rows; 10 unexpected empty sites.

✅ Deterministic fixture contract is clean.

Common ancestor ea3f6d2b90cb → HEAD 421b3308f6e2; benchmark order: base-first; workflow: success.

Public 48-site run · informational

Metric Base HEAD Δ
Run status success success —
Extracted rows / contract 184 / 240 184 / 240 0 (0.00%)
Contract fill 76.67% 76.67% 0.00 pp (0.00%)
Sites with rows 38 / 48 38 / 48 0 (0.00%)
Sites meeting row contract 36 / 48 36 / 48 0 (0.00%)
Unexpected empty sites 10 10 0 (0.00%)
Partial-row sites 2 2 0 (0.00%)
Site outcomes extracted: 36; HTTP error + rows: 2; empty: 8; HTTP error + empty: 1; snapshot error + empty: 1 extracted: 37; HTTP error + rows: 1; empty: 8; HTTP error + empty: 1; snapshot error + empty: 1 —
Observed duration 61.48 s 46.69 s -14.78 s (-24.05%)
Estimated CPU 41.75 s 39.41 s -2.34 s (-5.60%)
Peak PSS 247.52 MiB 240.55 MiB -6.97 MiB (-2.82%)
Peak RSS 251.26 MiB 244.39 MiB -6.86 MiB (-2.73%)
Peak threads 31 32 +1 (+3.23%)
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 32 / 40 32 / 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, 3.54, 4.542, 5.043, 7.046, 8.548, 10.551, 12.053, 13.554, 15.557, 16.057, 17.057, 19.06, 20.562, 22.064, 24.067, 25.569, 27.572, 29.074, 31.075, 32.577, 34.078, 36.08, 37.582, 39.584, 41.085, 42.586, 43.086, 44.589, 46.092, 48.094, 49.595, 51.597, 53.099, 54.6, 56.602, 58.105, 60.106]
    y-axis "CPU percent" 0 --> 200
    line [125.91, 105.82, 157.59, 117.82, 89.83, 109.82, 125.93, 55.86, 21.97, 3.99, 0, 0, 0, 3.99, 2, 69.95, 67.87, 45.97, 81.95, 97.9, 111.94, 115.73, 115.91, 105.88, 101.76, 77.99, 112, 113.94, 45.9, 131.91, 25.98, 0, 0, 115.9, 0, 123.85, 139.81, 133.86]
Loading
xychart-beta
    title "Base memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.037, 1.538, 3.54, 4.542, 5.043, 7.046, 8.548, 10.551, 12.053, 13.554, 15.557, 16.057, 17.057, 19.06, 20.562, 22.064, 24.067, 25.569, 27.572, 29.074, 31.075, 32.577, 34.078, 36.08, 37.582, 39.584, 41.085, 42.586, 43.086, 44.589, 46.092, 48.094, 49.595, 51.597, 53.099, 54.6, 56.602, 58.105, 60.106, 61.475]
    y-axis "Memory MiB" 0 --> 500
    line [13.95, 102.88, 117.81, 126.46, 143.66, 149.13, 137.28, 141.86, 139.15, 122.04, 121.11, 121.11, 121, 121.59, 121.59, 121.77, 128.06, 147.95, 135.73, 133.39, 235.26, 179.15, 209.52, 163.13, 154.45, 145.27, 144.72, 232.61, 251.26, 226.79, 232.9, 229.76, 233.74, 232.28, 154.49, 133.43, 161.09, 147.73, 167.82, 0]
    line [10.38, 99.13, 114.07, 122.76, 140.15, 145.38, 133.53, 138.13, 135.38, 118.27, 117.34, 117.34, 117.23, 117.81, 117.81, 117.93, 124.24, 144.16, 132.37, 129.35, 231.43, 175.31, 205.7, 159.34, 150.61, 141.14, 140.88, 229.04, 247.52, 222.95, 229.07, 225.93, 229.91, 228.44, 150.65, 129.59, 157.29, 144.05, 164.11, 0]
Loading

HEAD

xychart-beta
    title "HEAD CPU"
    x-axis "Elapsed seconds" [1.037, 1.538, 2.539, 4.04, 5.043, 6.545, 8.046, 9.048, 10.548, 12.051, 13.054, 14.554, 15.554, 17.054, 18.557, 19.557, 21.058, 22.06, 23.563, 25.064, 26.067, 27.568, 28.569, 30.07, 31.572, 32.573, 34.074, 34.574, 35.575, 36.576, 38.078, 39.079, 40.58, 42.082, 43.084, 43.585, 44.586, 45.588]
    y-axis "CPU percent" 0 --> 200
    line [27.96, 117.87, 109.98, 139.76, 123.78, 145.71, 109.75, 119.9, 113.94, 91.84, 81.79, 52.02, 126.01, 123.96, 103.86, 119.87, 123.9, 37.93, 113.84, 97.92, 71.84, 17.98, 35.95, 123.85, 27.99, 13.99, 27.98, 0, 49.96, 11.99, 29.96, 43.97, 10, 77.89, 115.86, 153.81, 63.94, 125.66]
Loading
xychart-beta
    title "HEAD memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.037, 1.037, 1.538, 2.539, 4.04, 5.043, 6.545, 8.046, 9.048, 10.548, 12.051, 13.054, 14.554, 15.554, 17.054, 18.557, 19.557, 21.058, 22.06, 23.563, 25.064, 26.067, 27.568, 28.569, 30.07, 31.572, 32.573, 34.074, 34.574, 35.575, 36.576, 38.078, 39.079, 40.58, 42.082, 43.084, 43.585, 44.586, 45.588, 46.693]
    y-axis "Memory MiB" 0 --> 500
    line [13.98, 87.59, 102.34, 105.99, 137.98, 141.34, 161.35, 147.03, 142.01, 151.11, 135.3, 138.68, 128.52, 150.62, 140.06, 223.68, 179.62, 208.43, 137.41, 163.17, 136.59, 144.49, 139.23, 161.52, 244.39, 229.34, 225.45, 232.49, 232.49, 236.55, 234.04, 232.14, 232.55, 151.49, 146.21, 152.29, 170.43, 146.07, 161.88, 0]
    line [10.35, 83.77, 98.55, 102.3, 134.18, 137.53, 154.44, 143.12, 138.17, 147.24, 131.47, 135.45, 124.7, 146.86, 136.22, 220.06, 175.52, 205.13, 133.56, 159.52, 132.73, 140.82, 134.44, 158.36, 240.55, 225.49, 221.62, 228.65, 228.65, 232.71, 230.19, 228.3, 228.79, 147.65, 142.36, 148.33, 167.99, 142.23, 158.06, 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.86 s 19.87 s +0.01 s (+0.04%)
Estimated CPU 0.43 s 0.43 s 0.00 s (0.00%)
Peak PSS 69.75 MiB 69.70 MiB -0.06 MiB (-0.09%)
Peak RSS 73.45 MiB 73.26 MiB -0.19 MiB (-0.26%)
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 Nov 12, 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 ea3f6d2b90 → HEAD 421b3308f6; benchmark order: base-first; workflow: success.

Session resilience

Metric Base HEAD
Attempted / planned 200 / 200 200 / 200
Direct observable pass 197 / 200 196 / 200
Failures / recovered 3 / 3 4 / 4
Recovery failures 0 0
Lifecycle order violations 0 0
Network order violations 0 0
Wall time 595.2 s 607.2 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 248.0 MiB 253.8 MiB +5.8 MiB
Periodic peak PSS 244.5 MiB 250.0 MiB +5.5 MiB
RSS · first 10 avg 171.9 MiB 170.7 MiB -1.2 MiB
RSS · last 10 avg 198.4 MiB 198.9 MiB +0.6 MiB
RSS · last − first window +26.5 MiB +28.3 MiB +1.8 MiB
RSS · warm slope / 100 nav +9.7 MiB +6.1 MiB -3.6 MiB
PSS · first 10 avg 168.3 MiB 166.9 MiB -1.3 MiB
PSS · last 10 avg 194.8 MiB 195.3 MiB +0.5 MiB
PSS · last − first window +26.5 MiB +28.4 MiB +1.9 MiB
PSS · warm slope / 100 nav +9.6 MiB +6.3 MiB -3.4 MiB
Peak file descriptors 66 66 0
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 179.0 MiB 156.2 MiB 220.6 MiB 175.3 MiB 152.4 MiB 59
51–100 184.2 MiB 129.3 MiB 217.1 MiB 180.5 MiB 125.9 MiB 59
101–150 188.1 MiB 163.1 MiB 224.9 MiB 184.7 MiB 159.8 MiB 59
151–200 192.1 MiB 202.2 MiB 228.6 MiB 188.6 MiB 198.6 MiB 63

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.

@lanyue-llk
lanyue-llk force-pushed the fix/domstable-pending-loads branch from 3d96be7 to 421b330 Compare November 13, 2026 13:28
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.

--wait domstable returns before parser async scripts, starting iframes and Worker scripts finish

2 participants