Skip to content

fix(page): cancel provisional navigation on Page.stopLoading - #2800

Open
lanyue-llk wants to merge 3 commits into
mainfrom
fix/stop-loading-cancels-navigation
Open

lanyue-llk wants to merge 3 commits into
mainfrom
fix/stop-loading-cancels-navigation

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

PR #2800 at a glance

**Track:** Trajectory Replay (Browser Eval). Replaces part of #759.

Part of #2765.
Replaces part of #759.

Problem

Page.stopLoading during a provisional navigation did not cancel it: the pending Page.navigate never resolved, the slow response later committed, and the page moved to the URL the client had stopped. Chromium resolves Page.navigate with errorText: "net::ERR_ABORTED", fires Page.frameStoppedLoading, and keeps the current document. Repro (issue case 1): Page.navigate /home; send Page.navigate /slow (8 s response) without awaiting; after 1 s Page.stopLoading; read location.href + " | " + document.body.innerHTML.

Reproduce (steps from #2765, case 1)

The server's /home returns <p id=home>home page</p>. Its /slow waits 8 s and then returns <p id=slow>slow page</p>.

  1. Page.navigate /home, then wait 1 s.
  2. Send Page.navigate /slow without awaiting it.
  3. After 1 s, send Page.stopLoading.
  4. Evaluate location.href + " | " + document.body.innerHTML after 10 s.

Expected (Chromium): Page.navigate resolves with errorText: "net::ERR_ABORTED", frameStoppedLoading fires, and the page stays /home | <p id="home">home page</p>.

Actual: stopLoading returns {} and Page.navigate stays pending. Then /slow commits: a second frameNavigated (/slow) and loadEventFired arrive, and the page becomes /slow | <p id="slow">slow page</p>.

Change

moli-protocol/src/domains/page/termination.rs (PreparedPageStopLoading::prepare) only stopped the loaded document's lifecycle and Fetch-paused work. It now also cancels the target's uncommitted document navigation through the existing clear_pending_document_navigation_for_owner_if_loader_matches (which uses cancel_pending_document_navigation), and emits Page.frameStoppedLoading for the frame whose frameStartedLoading was already sent. The superseded-navigation path that already exists then resolves Page.navigate with net::ERR_ABORTED. Fetch-paused navigations keep their existing stop handling (Navigation stopped) unchanged.

moli-protocol/src/domains/page/navigation_cleanup.rs (PreparedNavigationFailureCleanup::superseded): the abandoned request now ends with Network.loadingFailed {type: "Document", errorText: "net::ERR_ABORTED", canceled: true}, built through the existing failed_navigation_progress_gate exactly as superseded_intercepted_navigation_events already does for intercepted navigations. Without it the request stayed in flight for Puppeteer/Playwright network-idle tracking. This also fixes the plain supersede case: a second Page.navigate during a pending one now reports loadingFailed (ERR_ABORTED, canceled) for the first request, as Chromium does (on main it was never terminated).

Test: stop_loading_aborts_a_provisional_navigation (protocol-server CDP test, with Network.enable): navigate, start a 30 s navigation, stop; expects errorText: net::ERR_ABORTED, frameStoppedLoading, Network.loadingFailed for the stopped request (Document, net::ERR_ABORTED, canceled: true), no frameNavigated, and location.pathname == "/home".

Known difference: on stop, moli sends frameStoppedLoading (with the stopLoading reply) before the request's loadingFailed (when the cancelled fetch settles); Chromium sends loadingFailed first. Both events arrive within the same turn of the client.

Not in this PR: case 2 of #2765 (stopping a streaming document keeps parsing; renderer crate) and the commit-timing addendum (headers-received-but-body-held responses commit before stop can abort them). Those need separate changes.

Verification

Before: released v1.1.23 (same code path as origin/main); after: debug build of this branch.

# before
stopLoading: {}
navigate result: pending
after 8s: /slow | <p id="slow">slow page</p>
events: frameStartedLoading(/slow) ... frameNavigated(/slow), loadEventFired
# after
stopLoading: {}
navigate result: {'frameId': ..., 'errorText': 'net::ERR_ABORTED', 'isDownload': False}
after 8s: /home | <p id="home">home page</p>
events: frameStartedLoading(/slow), frameStoppedLoading, Network.loadingFailed {requestId: <slow loader>, net::ERR_ABORTED, canceled: true}; no second frameNavigated

Plain supersede (Page.navigate /slow, then Page.navigate /body1 after 1 s), main vs this PR:

# main:    requestWillBeSent /slow, requestWillBeSent /body1, frameNavigated /body1, loadingFinished /body1   (no terminal event for /slow)
# this PR: requestWillBeSent /slow, requestWillBeSent /body1, loadingFailed /slow ERR_ABORTED canceled, frameNavigated /body1, loadingFinished /body1
  • cargo fmt --all: clean.
  • cargo clippy -p moli-protocol -p moli-protocol-server --all-targets --all-features -- -D warnings: passed.
  • cargo nextest run -p moli-protocol -E 'test(stop_loading) | test(stoploading) | test(stop_lifecycle)': 10 passed (existing Fetch-paused stop contracts unchanged).
  • cargo nextest run -p moli-protocol-server -E 'test(stop_loading)': 1 passed (new test).
  • cargo nextest run -p moli-protocol -p moli-protocol-server -E 'test(supersed) | test(stop_loading) | test(navigat)': 761 passed.
  • Not run locally: workspace-wide clippy and the full workspace nextest (the renderer test binary does not link within this machine's 16 GiB); left to CI. The new test was not run against an unfixed build.

Cost

Debug builds of origin/main (f935014) and this branch, /usr/bin/time -l, median of 5 runs:

main this PR
issue repro over CDP (moli serve, script has ~10.5 s of fixed sleeps) 17.20 s, 99.3 MB max RSS 10.71 s, 99.1 MB
ordinary page, moli fetch of a local 46 KB article 0.080 s, 88.7 MB 0.100 s, 89.0 MB (0.08–0.10 s run-to-run noise on this shared host; this path is not touched)

The repro gets faster because the stopped /slow response is no longer fetched, committed and evaluated. The new work runs only inside Page.stopLoading, and only when the target has an uncommitted navigation (one slot lookup otherwise); navigation, loading and fetch paths are unchanged. The added loadingFailed is built only for a navigation that is already being abandoned, and only when a Network listener is enabled.

@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 f067cec

Changes needed (1)

  1. The stopped document request never gets Network.loadingFailed. The new stop path is moli-protocol/src/domains/page/termination.rs:201-212. It cancels through clear_pending_document_navigation_for_owner_if_loader_matches, and the cancelled background navigation then resolves through PreparedRendererNavigationResult::superseded → PreparedNavigationFailureCleanup::superseded (domains/page/navigation_cleanup.rs:21-41). That path only calls push_superseded_navigation_result, so Page.navigate gets net::ERR_ABORTED but no network terminal event is sent.
    • Chrome 157, same repro with Network.enable: Network.loadingFailed {requestId: <slow loaderId>, type: "Document", errorText: "net::ERR_ABORTED", canceled: true}, then frameStoppedLoading.
    • moli: the existing superseded path already behaves this way on v1.1.23 when /slow is superseded by a second Page.navigate. The client sees requestWillBeSent(LID-2) and then nothing else for that request.
    • Effect: after a stop, the /slow request stays in flight in Puppeteer's and Playwright's network managers. There is no requestfailed, and Playwright networkidle waits never settle.
    • Smallest fix: in the superseded failure cleanup, emit the failed-progress events the way superseded_intercepted_navigation_events already does (network::failed_navigation_progress_gate(conn, &state, NET_ERR_ABORTED_ERROR_TEXT) drained until body-finished) instead of the bare result. Then add an assertion for Network.loadingFailed with canceled: true to stop_loading_aborts_a_provisional_navigation (cdp_dynamic_page.rs:4767) with Network.enable.

Checked, no issue:

  • The cancelled loader is the pending one: page_slot.rs:1203 current_document_loader_id prefers the uncommitted request.
  • The committed /home page and its workers stay. close_dedicated_workers_outside_navigation_page(.., None) spares the current residence.
  • The change is target-local because it is owner-scoped.
  • Stop with no navigation in flight is unchanged: no slot match, so no extra frameStoppedLoading, which matches Chrome.
  • A later navigation starts a fresh request. Fetch-paused stop is untouched.
  • The new test would hang or fail without the fix, because Page.navigate id 3 never resolves.
  • CI: Nextest, Clippy, Format, Node and Python harness tests and Windows storage pass. CDP smoke and the release builds are still queued.

Scope vs #2765: this PR fixes case 1 (provisional navigation, including the ERR_ABORTED result and no late commit), except for the missing loadingFailed above. It leaves case 2 open (stopping a streaming document keeps parsing the tail; renderer main_document_lifecycle_body.rs). It also leaves the addendum open: moli commits at response headers when the body is held (HTTP 500 or XML), so a stop in that window still lands on the new URL, and the XML case crashes (#2796). The body correctly says "Part of #2765" rather than "Closes".

Picture: 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 3414dbd (round 2)

No blocking findings

The round-1 finding is fixed. PreparedNavigationFailureCleanup::superseded (moli-protocol/src/domains/page/navigation_cleanup.rs:36-47) now drains failed_navigation_progress_gate(.., NET_ERR_ABORTED) before the Page.navigate result. This is the same construction superseded_intercepted_navigation_events uses (navigation.rs:1104). The stopped request now ends with loadingFailed {Document, net::ERR_ABORTED, canceled: true}, and the new test asserts that against the announced /slow requestId. The fixture's 30 s sleep means the test would time out if the event only arrived when the response settled.

Plain supersede: no double or stale loadingFailed.

  • superseded() is reached only from PreparedRendererNavigationResult::prepare_with_output / prepare_materialized (renderer_navigation.rs:433,465) and from prepare_failed_navigation_cleanup (navigation_cleanup.rs:78). Each of these runs once per navigation, when its outcome is not current. On every one of these paths the outcome's own progress gate is dropped undrained (failure is discarded and the Loaded/ResponseCommitReady gate is never published). So no responseReceived/loadingFinished/loadingFailed for that request was sent earlier.
  • Fetch-paused navigations that a new navigation retires go through take_superseded_intercepted_document_navigations (navigation.rs:2756). They are removed from pending_fetch_navigations, so they never resolve through superseded(). Paused navigations that resolve on their own resolve as DocumentNavigationOutcome::Superseded → prepare_superseded_fetch_navigation (fetch/document_navigation.rs:125), not as Other. These paths are disjoint, so the request gets one terminal event.
  • A navigation whose native commit was already accepted still goes through publish_superseded (navigation_commit.rs:96). That path is unchanged: metadata only, no loadingFailed.
  • The event is gated on Network listeners and state.request_id, so it is not sent when Network is disabled.

Event order (disclosed difference). Chrome 157 orders stop as loadingFailed, then frameStoppedLoading. For plain supersede, Chrome also sends loadingFailed(old) before requestWillBeSent(new); moli sends it after. Neither common client depends on either order (checked in puppeteer-core 25.17.0 and playwright-core 1.65.0 from npm):

  • Puppeteer: FrameManager#onFrameStoppedLoading only adds DOMContentLoaded/load to the frame's lifecycle set. LifecycleWatcher#onRequestFailed only resolves navigationResponseReceived when the id matches the latest navigation request. Completion still needs a loaderId change, which a stop never produces in either browser.
  • Playwright (Chromium): crPage does not subscribe to Page.frameStoppedLoading at all. crNetworkManager._onLoadingFailed → frames.requestFailed aborts the pending document only when pendingDocument().request === request. With moli's supersede order, requestWillBeSent(new) has already replaced the pending document, so the old failure only emits requestfailed. With Chrome's order, it aborts the old pending document first. The end state is the same either way, and page.goto rejects from the Page.navigate errorText in both cases.
  • Matching Chrome's stop order is not cheap. It would mean either moving frameStoppedLoading into the async superseded cleanup with a "stopped" marker on the navigation state, or emitting loadingFailed eagerly in Page.stopLoading and then de-duplicating the later one. Either adds state for no client-visible gain. Leaving it as disclosed is right. Optionally, the body's supersede sentence ("as Chromium does") could say the event is the same and the order differs.

Other checks: the cost claims are plausible (the only new work is on paths that are already abandoning a navigation). The test covers the fix. CI at 3414dbd: Nextest, Clippy, Format, Node/Python harness tests and Windows storage pass; CDP smoke and the release builds are still pending. The body says Part of #2765, which is correct because case 2 and the commit-timing addendum stay open. The picture is still a <!-- picture --> placeholder.

@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.002536%
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 ❌ 126/128 groups passed; 2,202 scenarios
WebMainBench ✅ 545/545 completed; 0 unexpected failures
Release regression — ✅ HEAD/base failures 0/0; raw binary +0.002536%

Package and image size

Metric Base HEAD Delta Delta %
Raw binary 159.16 MiB 159.16 MiB +4.13 KiB +0.002536%
Stripped binary 107.20 MiB 107.21 MiB +4.00 KiB +0.003644%
gzip binary 53.27 MiB 53.27 MiB +962 B +0.001722%
Rootfs 166.07 MiB 166.07 MiB 0 B 0.00%
gzip rootfs 62.37 MiB 62.37 MiB +4.51 KiB +0.007066%

Startup latency and PSS

Case Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta
Serve ready 28.15 ms 27.60 ms −0.55 ms 5.39 MiB 4.88 MiB −525.00 KiB
CDP first page 65.89 ms 52.29 ms −13.60 ms 5.23 MiB 4.83 MiB −409.50 KiB
CDP warm page 18.61 ms 13.22 ms −5.39 ms 54.22 MiB 53.47 MiB −762.50 KiB
CLI about:blank 22.44 ms 16.40 ms −6.04 ms 3.09 MiB 4.45 MiB +1.36 MiB
CLI local JS 31.27 ms 28.96 ms −2.32 ms 3.49 MiB 4.33 MiB +862.00 KiB

Concurrency matrix

Concurrency Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta HEAD failures Unstable B/H
1 26.29 ms 25.45 ms −0.84 ms 719.00 KiB 701.00 KiB −18.00 KiB 0 0/0
5 29.83 ms 30.20 ms +0.37 ms 13.35 MiB 13.32 MiB −28.50 KiB 0 0/0
10 29.24 ms 28.87 ms −0.37 ms 20.17 MiB 13.41 MiB −6.76 MiB 0 0/0
25 27.47 ms 28.30 ms +0.83 ms 13.05 MiB 13.27 MiB +220.00 KiB 0 0/0
100 27.95 ms 32.05 ms +4.10 ms 13.38 MiB 13.43 MiB +60.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 13m 28.57s
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 3382.41 ms 38.28 ms
Chromium 8 8 47/47 531.33 ms 119.32 ms
Operation p50 Chromium Moli Delta Delta %
navigate 53.48 ms 7.57 ms −45.92 ms −85.85%
observe 1.23 ms 1.11 ms −0.12 ms −9.50%
fill 3.77 ms 4.83 ms +1.06 ms +28.19%
click 6.38 ms 5.03 ms −1.36 ms −21.23%
Idle-resource episode Peak RSS Peak PSS Average CPU Peak CPU Peak processes Sampler
Moli 71.79 MiB 67.97 MiB 0.83% 10.01% 1 ✅
Chromium 1304.46 MiB 361.38 MiB 1.38% 19.99% 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 27.75 ms 30.46 ms 1.04 MiB
Long-lived CDP session 13 0 20.00 ms 21.69 ms —
CDP smoke — ❌ 126/128 groups passed; 2,202 scenarios

Workers: 4 · cumulative group time: 520.58 s · failed groups: 2

Slowest group Scenarios Duration Status
dom-input 64 23.80 s ✅
fetch-resource-dispatch 72 23.57 s ✅
dom-input 64 23.33 s ✅
fetch-resource-dispatch 72 22.89 s ✅
scrollbar-visibility 22 19.93 s ✅

Failed groups

  • chromium-cdp — failed · Traceback (most recent call last): File "/__w/moli/moli/moli-cdp-smoke/moli_cdp_smoke/runner.py", line 856, in _run_worker await run_smoke(endpoint, fixtu
  • chromium-cdp — failed · Traceback (most recent call last): File "/__w/moli/moli/moli-cdp-smoke/moli_cdp_smoke/runner.py", line 856, in _run_worker await run_smoke(endpoint, fixtu
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: 189 / 240 rows; 39 / 48 sites produced rows; 9 unexpected empty sites.

✅ Deterministic fixture contract is clean.

Common ancestor cbaf7dc3a41f → HEAD 2e916b2f0165; benchmark order: head-first; workflow: success.

Public 48-site run · informational

Metric Base HEAD Δ
Run status success success —
Extracted rows / contract 190 / 240 189 / 240 -1 (-0.53%)
Contract fill 79.17% 78.75% -0.42 pp (-0.53%)
Sites with rows 40 / 48 39 / 48 -1 (-2.50%)
Sites meeting row contract 37 / 48 37 / 48 0 (0.00%)
Unexpected empty sites 8 9 +1 (+12.50%)
Partial-row sites 3 2 -1 (-33.33%)
Site outcomes extracted: 39; HTTP error + rows: 1; empty: 7; snapshot error + empty: 1 extracted: 37; HTTP error + rows: 2; empty: 8; snapshot error + empty: 1 —
Observed duration 81.14 s 56.89 s -24.25 s (-29.89%)
Estimated CPU 41.20 s 42.41 s +1.21 s (+2.94%)
Peak PSS 204.73 MiB 240.52 MiB +35.78 MiB (+17.48%)
Peak RSS 207.72 MiB 243.62 MiB +35.90 MiB (+17.28%)
Peak threads 31 33 +2 (+6.45%)
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 36 / 40 35 / 40 -1
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.335, 2.837, 4.839, 7.342, 9.343, 11.847, 13.849, 16.353, 18.356, 20.859, 22.861, 25.365, 27.369, 29.871, 31.875, 34.376, 36.376, 38.88, 40.884, 43.385, 45.387, 47.886, 49.888, 52.391, 54.391, 56.893, 58.896, 61.398, 62.9, 63.4, 65.903, 67.904, 70.408, 72.409, 74.914, 76.917, 77.418, 79.42]
    y-axis "CPU percent" 0 --> 200
    line [0, 0, 2, 92.04, 101.85, 137.85, 129.91, 137.64, 111.71, 25.98, 21.98, 2, 0, 5.99, 6, 0, 0, 5.99, 6, 0, 0, 6, 6.01, 129.8, 2, 54.01, 21.99, 129.87, 102.01, 127.82, 111.96, 81.92, 87.93, 77.95, 0, 107.67, 171.93, 71.95]
Loading
xychart-beta
    title "Base memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.334, 1.335, 2.837, 4.839, 7.342, 9.343, 11.847, 13.849, 16.353, 18.356, 20.859, 22.861, 25.365, 27.369, 29.871, 31.875, 34.376, 36.376, 38.88, 40.884, 43.385, 45.387, 47.886, 49.888, 52.391, 54.391, 56.893, 58.896, 61.398, 62.9, 63.4, 65.903, 67.904, 70.408, 72.409, 74.914, 76.917, 77.418, 79.42, 81.141]
    y-axis "Memory MiB" 0 --> 500
    line [14.15, 58.88, 59.12, 59.13, 121.35, 119.86, 132.23, 136.55, 148.04, 142.59, 143.35, 121.17, 123.04, 121.86, 121.8, 121.8, 121.8, 121.8, 121.93, 122.45, 122.5, 123.03, 123.5, 123.97, 139.38, 117.45, 131.56, 144.17, 157.67, 207.72, 181.81, 169.74, 146.34, 166.29, 151.04, 127.85, 159.11, 156.07, 136.55, 0]
    line [11.22, 55.85, 56.08, 56.09, 118.31, 116.89, 129.46, 133.51, 146.15, 139.54, 140.31, 118.13, 119.89, 118.68, 118.78, 118.78, 118.78, 118.78, 118.91, 119.41, 119.46, 119.98, 120.46, 121.58, 136.29, 114.42, 128.65, 141.13, 154.65, 204.73, 178.74, 166.24, 143.28, 163.27, 148.02, 124.8, 156.82, 152.91, 133.68, 0]
Loading

HEAD

xychart-beta
    title "HEAD CPU"
    x-axis "Elapsed seconds" [1.537, 3.039, 4.541, 5.042, 6.043, 6.544, 8.047, 9.549, 11.052, 12.553, 14.555, 16.058, 17.56, 19.06, 20.561, 22.062, 24.065, 25.567, 27.07, 28.571, 30.074, 31.577, 33.579, 35.081, 36.584, 38.086, 39.588, 41.088, 43.091, 44.593, 46.095, 46.596, 47.597, 49.099, 50.601, 52.605, 54.107, 55.609]
    y-axis "CPU percent" 0 --> 200
    line [113.92, 127.83, 87.84, 155.65, 131.88, 125.69, 123.76, 123.91, 83.79, 129.98, 0, 5.99, 17.97, 6, 0, 6, 3.99, 133.74, 43.9, 43.98, 53.89, 85.8, 137.91, 109.86, 115.79, 111.93, 111.87, 39.97, 97.83, 39.9, 123.79, 103.72, 121.84, 7.99, 37.88, 129.75, 77.92, 113.8]
Loading
xychart-beta
    title "HEAD memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.035, 1.537, 3.039, 4.541, 5.042, 6.043, 6.544, 8.047, 9.549, 11.052, 12.553, 14.555, 16.058, 17.56, 19.06, 20.561, 22.062, 24.065, 25.567, 27.07, 28.571, 30.074, 31.577, 33.579, 35.081, 36.584, 38.086, 39.588, 41.088, 43.091, 44.593, 46.095, 46.596, 47.597, 49.099, 50.601, 52.605, 54.107, 55.609, 56.886]
    y-axis "Memory MiB" 0 --> 500
    line [14.22, 92.95, 121.64, 118.24, 146.89, 147.67, 132.43, 142.26, 149.41, 137.54, 152.58, 117.3, 116.61, 121.85, 118.7, 118.78, 119.72, 120.8, 144.5, 118.21, 125.51, 124.09, 154.1, 143.46, 182.97, 198.42, 151.79, 154.61, 138.98, 143.8, 144.2, 236.25, 243.62, 227.85, 157.43, 139.18, 162.36, 144.23, 163.34, 0]
    line [11.26, 89.77, 118.46, 115.42, 143.84, 144.21, 129.12, 139.08, 146.26, 134.37, 149.65, 114.1, 113.41, 118.68, 115.53, 115.6, 116.55, 117.62, 141.32, 115.03, 122.33, 120.89, 150.97, 140.3, 179.89, 195.25, 148.59, 151.5, 135.86, 140.69, 141.09, 232.28, 240.52, 224.75, 154.32, 136.68, 159.28, 141.26, 160.26, 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 20.04 s 23.17 s +3.14 s (+15.67%)
Estimated CPU 0.46 s 0.69 s +0.23 s (+50.00%)
Peak PSS 71.42 MiB 69.65 MiB -1.77 MiB (-2.48%)
Peak RSS 74.74 MiB 72.72 MiB -2.02 MiB (-2.70%)
Peak threads 23 24 +1 (+4.35%)
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 cbaf7dc3a4 → HEAD 2e916b2f01; benchmark order: head-first; workflow: success.

Session resilience

Metric Base HEAD
Attempted / planned 200 / 200 200 / 200
Direct observable pass 199 / 200 199 / 200
Failures / recovered 1 / 1 1 / 1
Recovery failures 0 0
Lifecycle order violations 0 0
Network order violations 0 0
Wall time 530.2 s 591.5 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 258.9 MiB 240.5 MiB -18.4 MiB
Periodic peak PSS 254.9 MiB 235.7 MiB -19.1 MiB
RSS · first 10 avg 152.7 MiB 167.6 MiB +14.9 MiB
RSS · last 10 avg 190.2 MiB 194.6 MiB +4.4 MiB
RSS · last − first window +37.5 MiB +27.0 MiB -10.5 MiB
RSS · warm slope / 100 nav +5.6 MiB +9.6 MiB +3.9 MiB
PSS · first 10 avg 148.9 MiB 164.3 MiB +15.3 MiB
PSS · last 10 avg 186.5 MiB 190.8 MiB +4.3 MiB
PSS · last − first window +37.5 MiB +26.5 MiB -11.0 MiB
PSS · warm slope / 100 nav +5.8 MiB +9.2 MiB +3.4 MiB
Peak file descriptors 75 72 -3
Peak threads 35 36 1

HEAD memory by 50-navigation quarter

HEAD range Avg RSS Final RSS Peak RSS Avg PSS Final PSS Peak FD
1–50 175.1 MiB 158.9 MiB 203.7 MiB 171.9 MiB 155.9 MiB 64
51–100 174.1 MiB 133.6 MiB 209.2 MiB 171.0 MiB 130.6 MiB 65
101–150 187.2 MiB 162.5 MiB 214.3 MiB 184.0 MiB 159.3 MiB 64
151–200 186.6 MiB 196.7 MiB 215.7 MiB 183.0 MiB 193.1 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.

@lanyue-llk
lanyue-llk force-pushed the fix/stop-loading-cancels-navigation branch from d0ae75d to 69842e7 Compare November 13, 2026 12:13
@ldm0
ldm0 force-pushed the fix/stop-loading-cancels-navigation branch from 69842e7 to 5dd642f Compare November 19, 2026 21:01
@ldm0
ldm0 force-pushed the fix/stop-loading-cancels-navigation branch from 5dd642f to 2e916b2 Compare November 20, 2026 04:08
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.

2 participants