Skip to content

fix(fetch): follow credential callback navigation after load - #1431

Closed
lanyue-llk wants to merge 2 commits into
codex/preserve-painted-markdown-textfrom
codex/risk011-navigation-handoff
Closed

lanyue-llk wants to merge 2 commits into
codex/preserve-painted-markdown-textfrom
codex/risk011-navigation-handoff

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

A page can reach Load while the main document still owns a credentialed Fetch/XHR callback that immediately hands off to a top-level navigation. The CLI currently freezes that bootstrap document, so native Markdown can be empty even though the page is completing its own same-document authentication flow.

This change reuses the renderer’s typed, owner-bound navigation handoff. At Load, it observes only explicit credentials-including Window Fetch/XHR requests owned by the current main document. It waits within the existing bounded navigation window, finishes as soon as that request chain settles, and follows a successor navigation through the existing owner state machine. Ordinary requests, workers, resource loads, long timers, polling, and URL-specific rules are excluded.

Behavior tests cover a credentialed bootstrap callback that performs a same-origin top-level replacement. A negative control verifies that an unrelated four-second request and five-second timer do not delay the result. The tests run through the repository CI.

PR stack

GitHub dependency chain:

#1334 → #1335 → #1336 → #1337 → #1380 → #1428 → #1431 → #1432

This PR targets codex/preserve-painted-markdown-text, the head branch of #1428. Its Files changed view therefore contains only this navigation-lifecycle fix. Merge the stack from left to right. #919 is a separate historical combination and is not a dependency. #1429 targets main independently because it only adds reusable comparison CI.

@lanyue-llk
lanyue-llk force-pushed the codex/risk011-navigation-handoff branch from 87940e6 to 6b6b3ba Compare October 12, 2026 08:08
@github-actions

github-actions Bot commented Oct 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 8b63b90fdd → HEAD ff4656e4db; benchmark order: base-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 485.5 s 477.6 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 273.8 MiB 267.1 MiB -6.7 MiB
Periodic peak PSS 270.6 MiB 263.5 MiB -7.1 MiB
RSS · first 10 avg 179.5 MiB 184.7 MiB +5.2 MiB
RSS · last 10 avg 186.5 MiB 195.1 MiB +8.6 MiB
RSS · last − first window +7.1 MiB +10.4 MiB +3.3 MiB
RSS · warm slope / 100 nav +4.0 MiB +7.4 MiB +3.4 MiB
PSS · first 10 avg 176.6 MiB 181.3 MiB +4.7 MiB
PSS · last 10 avg 183.2 MiB 191.5 MiB +8.3 MiB
PSS · last − first window +6.6 MiB +10.2 MiB +3.6 MiB
PSS · warm slope / 100 nav +3.9 MiB +7.5 MiB +3.6 MiB
Peak file descriptors 60 64 4
Peak threads 31 31 0

HEAD memory by 50-navigation quarter

HEAD range Avg RSS Final RSS Peak RSS Avg PSS Final PSS Peak FD
1–50 180.6 MiB 166.2 MiB 227.9 MiB 177.0 MiB 162.6 MiB 52
51–100 187.8 MiB 180.9 MiB 222.6 MiB 184.2 MiB 177.3 MiB 54
101–150 190.2 MiB 172.2 MiB 225.5 MiB 186.6 MiB 168.6 MiB 51
151–200 192.0 MiB 185.5 MiB 225.2 MiB 188.4 MiB 181.9 MiB 53

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 12, 2026 •

Copy link
Copy Markdown

Spider Bench A/B

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

Public HEAD: 179 / 240 rows; 37 / 48 sites produced rows; 11 unexpected empty sites.

✅ Deterministic fixture contract is clean.

Common ancestor 8b63b90fdd5b → HEAD ff4656e4db09; benchmark order: base-first; workflow: success.

Public 48-site run · informational

Metric Base HEAD Δ
Run status success success —
Extracted rows / contract 179 / 240 179 / 240 0 (0.00%)
Contract fill 74.58% 74.58% 0.00 pp (0.00%)
Sites with rows 37 / 48 37 / 48 0 (0.00%)
Sites meeting row contract 35 / 48 35 / 48 0 (0.00%)
Unexpected empty sites 11 11 0 (0.00%)
Partial-row sites 2 2 0 (0.00%)
Site outcomes extracted: 35; HTTP error + rows: 2; empty: 8; HTTP error + empty: 1; snapshot error + empty: 2 extracted: 36; HTTP error + rows: 1; empty: 8; HTTP error + empty: 1; snapshot error + empty: 2 —
Observed duration 50.39 s 46.49 s -3.90 s (-7.75%)
Estimated CPU 46.66 s 45.11 s -1.55 s (-3.32%)
Peak PSS 256.43 MiB 266.48 MiB +10.05 MiB (+3.92%)
Peak RSS 260.05 MiB 270.03 MiB +9.98 MiB (+3.84%)
Peak threads 27 26 -1 (-3.70%)
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 25 / 40 25 / 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.539, 3.04, 4.042, 5.544, 6.045, 7.046, 8.547, 10.049, 11.05, 12.553, 14.054, 15.555, 17.058, 18.059, 19.561, 21.062, 21.563, 22.564, 24.067, 25.57, 26.571, 28.074, 29.574, 31.076, 32.579, 33.58, 35.082, 36.583, 38.085, 39.588, 40.588, 42.09, 43.591, 45.092, 46.594, 47.595, 49.097]
    y-axis "CPU percent" 0 --> 500
    line [137.77, 111.89, 123.73, 105.78, 147.7, 193.93, 91.77, 166.05, 73.8, 181.64, 55.83, 55.92, 147.88, 39.94, 5.99, 61.92, 4, 0, 3.99, 5.98, 143.82, 37.94, 81.85, 101.88, 133.73, 149.91, 165.85, 135.84, 133.99, 37.94, 113.87, 95.96, 97.8, 96.02, 21.95, 20, 171.75, 144.03]
Loading
xychart-beta
    title "Base memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.036, 1.538, 2.539, 3.04, 4.042, 5.544, 6.045, 7.046, 8.547, 10.049, 11.05, 12.553, 14.054, 15.555, 17.058, 18.059, 19.561, 21.062, 21.563, 22.564, 24.067, 25.57, 26.571, 28.074, 29.574, 31.076, 32.579, 33.58, 35.082, 36.583, 38.085, 39.588, 40.588, 42.09, 43.591, 45.092, 46.594, 47.595, 49.097, 50.392]
    y-axis "Memory MiB" 0 --> 500
    line [12.62, 114.98, 120.29, 135.4, 129.85, 148.25, 169.45, 168.84, 167.98, 178.07, 181.27, 151.43, 178.06, 195.8, 146.9, 147.43, 159.86, 145.85, 145.85, 141.94, 146.33, 177.89, 158.74, 168.1, 260.05, 210.09, 221.66, 166.69, 165.52, 204.73, 152.23, 156.68, 168.72, 154.65, 183.07, 173.48, 163.22, 177.77, 190.88, 0]
    line [9.43, 111.47, 116.83, 131.86, 126.35, 143.75, 165.5, 165.3, 164.43, 175.17, 177.75, 147.89, 174.65, 191.36, 143.33, 143.87, 156.25, 142.19, 142.18, 138.27, 142.76, 174.9, 155.1, 164.47, 256.43, 206.5, 218.02, 163.06, 161.88, 200.98, 148.59, 153.04, 165.02, 151.02, 179.78, 169.84, 159.58, 174.14, 186.01, 0]
Loading

HEAD

xychart-beta
    title "HEAD CPU"
    x-axis "Elapsed seconds" [1.038, 1.538, 2.54, 3.541, 4.041, 5.042, 6.544, 8.046, 9.047, 10.549, 11.549, 13.051, 14.053, 15.555, 17.056, 18.058, 19.56, 20.563, 22.065, 23.566, 24.567, 26.068, 27.07, 28.072, 28.572, 29.574, 31.076, 32.579, 33.58, 35.082, 36.083, 37.584, 39.086, 40.088, 41.589, 42.589, 44.092, 45.093]
    y-axis "CPU percent" 0 --> 500
    line [19.95, 127.9, 141.71, 151.89, 114.05, 199.55, 155.86, 99.97, 171.76, 149.55, 111.94, 131.95, 101.71, 1.99, 105.78, 49.95, 0, 0, 3.99, 71.96, 72.02, 113.91, 155.77, 99.85, 109.96, 131.98, 131.8, 87.88, 157.84, 129.97, 101.85, 91.92, 61.91, 129.67, 49.97, 22, 17.97, 138.06]
Loading
xychart-beta
    title "HEAD memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.036, 1.038, 1.538, 2.54, 3.541, 4.041, 5.042, 6.544, 8.046, 9.047, 10.549, 11.549, 13.051, 14.053, 15.555, 17.056, 18.058, 19.56, 20.563, 22.065, 23.566, 24.567, 26.068, 27.07, 28.072, 28.572, 29.574, 31.076, 32.579, 33.58, 35.082, 36.083, 37.584, 39.086, 40.088, 41.589, 42.589, 44.092, 45.093, 46.487]
    y-axis "Memory MiB" 0 --> 500
    line [12.46, 79.79, 112.42, 125.88, 128.56, 142.56, 155.83, 164.5, 164.93, 176.15, 165.12, 178.68, 163.12, 160.39, 148.46, 170.49, 146.42, 149.36, 146.87, 145.91, 159.01, 184.95, 166.76, 188.44, 270.03, 258.71, 213.55, 221.94, 158.91, 162.95, 176.97, 171.98, 159.89, 167.37, 215.41, 180.52, 166.58, 174.57, 183.89, 0]
    line [9.34, 76.27, 108.67, 122.37, 125.03, 139.07, 152.39, 160.91, 161.34, 172.65, 161.87, 175.02, 159.56, 156.81, 143.29, 166.91, 142.82, 145.76, 143.28, 142.32, 155.41, 181.36, 163.22, 185.36, 266.48, 254.65, 209.96, 217.61, 155.35, 159.39, 173.38, 168.38, 156.48, 163.79, 211.93, 176.93, 162.98, 170.98, 180.35, 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.87 s +0.01 s (+0.03%)
Estimated CPU 0.43 s 0.45 s +0.02 s (+4.62%)
Peak PSS 66.75 MiB 66.92 MiB +0.17 MiB (+0.26%)
Peak RSS 70.13 MiB 70.39 MiB +0.26 MiB (+0.37%)
Peak threads 18 18 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 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.002749%
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 ✅ 52/52 groups passed; 621 scenarios
WebMainBench ✅ 545/545 completed; 0 unexpected failures
Release regression — ✅ HEAD/base failures 0/0; raw binary +0.002749%

Package and image size

Metric Base HEAD Delta Delta %
Raw binary 149.02 MiB 149.02 MiB +4.20 KiB +0.002749%
Stripped binary 102.65 MiB 102.65 MiB +4.00 KiB +0.003805%
gzip binary 51.15 MiB 51.15 MiB +1.08 KiB +0.002062%
Rootfs 155.92 MiB 155.93 MiB +10.00 KiB +0.006263%
gzip rootfs 60.05 MiB 60.04 MiB −249 B −0.000395%

Startup latency and PSS

Case Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta
Serve ready 27.23 ms 27.35 ms +0.12 ms 4.12 MiB 4.24 MiB +130.50 KiB
CDP first page 50.61 ms 52.77 ms +2.16 ms 3.95 MiB 4.43 MiB +485.00 KiB
CDP warm page 12.18 ms 12.84 ms +0.66 ms 49.75 MiB 49.56 MiB −198.00 KiB
CLI about:blank 14.94 ms 16.27 ms +1.33 ms 4.24 MiB 3.67 MiB −587.00 KiB
CLI local JS 20.87 ms 19.85 ms −1.02 ms 3.56 MiB 2.48 MiB −1.08 MiB

Concurrency matrix

Concurrency Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta HEAD failures Unstable B/H
1 19.35 ms 18.92 ms −0.43 ms 560.00 KiB 568.00 KiB +8.00 KiB 0 0/0
5 21.85 ms 21.82 ms −0.03 ms 13.50 MiB 18.31 MiB +4.80 MiB 0 0/0
10 21.47 ms 21.48 ms +0.01 ms 13.03 MiB 17.36 MiB +4.33 MiB 0 0/0
25 20.90 ms 22.03 ms +1.13 ms 13.30 MiB 13.20 MiB −107.00 KiB 0 0/0
100 21.67 ms 21.14 ms −0.53 ms 12.88 MiB 13.00 MiB +121.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 41.36s
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 3.31 ms 24.51 ms
Chromium 8 8 47/47 258.76 ms 88.93 ms
Operation p50 Chromium Moli Delta Delta %
navigate 41.78 ms 5.93 ms −35.85 ms −85.81%
observe 1.03 ms 0.87 ms −0.16 ms −15.33%
fill 4.38 ms 3.60 ms −0.78 ms −17.80%
click 4.89 ms 3.71 ms −1.18 ms −24.07%
Idle-resource episode Peak RSS Peak PSS Average CPU Peak CPU Peak processes Sampler
Moli 65.80 MiB 62.46 MiB 0.74% 10.01% 1 ✅
Chromium 1285.31 MiB 410.98 MiB 2.04% 95.93% 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 19.39 ms 20.46 ms 710.00 KiB
Long-lived CDP session 13 0 17.95 ms 18.39 ms —
CDP smoke — ✅ 52/52 groups passed; 621 scenarios

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

Slowest group Scenarios Duration Status
scrollbar-visibility 22 28.55 s ✅
target-lifecycle 24 17.23 s ✅
dom-input 27 13.08 s ✅
chromium-cdp 56 11.82 s ✅
multi-page 45 11.25 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.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Closing after the consolidation audit. Inferring a likely navigation from credentialed XHR/fetch activity is a site-driven heuristic and is intentionally excluded from #1501. Explicit completion contracts remain the correct interface.

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