Skip to content

fix(html): preserve child meta refresh with shared scheduling - #1661

Merged
ldm0 merged 1 commit into
mainfrom
fix/child-meta-refresh-1118
Oct 25, 2026
Merged

ldm0 merged 1 commit into
mainfrom
fix/child-meta-refresh-1118

Conversation

@ldm0

@ldm0 ldm0 commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Child meta refreshes could be lost or reordered when load callbacks moved, removed, or inserted declarations. Zero-delay refreshes could navigate before the iframe owner's load event completed. Register declarations in parser/DOM processing order, retain them on their owning Document across adoption, and arm child timers after owner-load delivery.

Main and child Documents share MetaRefreshScheduler for candidate priority, revisions, and deadlines. Shorter declarations replace slower ones; newly processed equal-delay declarations restart the delay. Repeated internal work and timer-post retries preserve the existing deadline. Queued work carries Document identity and revision, and consumes the saved navigation only after validation. Navigation type is chosen when the refresh fires while preserving the registered target URL, including exact-fragment behavior.

Same-value HTML meta content and http-equiv assignments retain semantic notifications independently of MutationObserver recording. Ordinary setters use document-aware qualified-name matching and the actual Attr local name and namespace. XML/XHTML case and observer filters stay correct, and writing a namespaced Attr through setAttribute() does not restart refresh timing.

Regression coverage includes declaration order and competing delays, independent iframes, load/adoption boundaries, sandbox/shadow handling, stale selected tasks, saved target URLs, fragment navigation, same-value setters, XML case, and namespace identity. Page tests use the existing workflow deadline throughout selected-task waits.

Validation for f9497ecc371d87bca11506e2d26b424c1269f216:

  • cargo fmt --all
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo nextest run --no-fail-fast: 20,828 passed, 19 skipped, default profile/parallelism, no retries.
  • History cleanup preserves the exact Git tree and PR diff. The existing 180/180 browser observations and 24/24 focused WPT observations were verified on this same source tree before cleanup; browser/WPT runs were not repeated for the history-only change. Repository case lists were preserved.

A separate compatibility gap recorded during review is child pageshow -> document.open() losing a pending nonzero refresh while Chromium retains it. That issue is tracked separately.

@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 737ef5f557 → HEAD fb50cdd83f; benchmark order: base-first; workflow: success.

Session resilience

Metric Base HEAD
Attempted / planned 200 / 200 200 / 200
Direct observable pass 200 / 200 196 / 200
Failures / recovered 0 / 0 4 / 4
Recovery failures 0 0
Lifecycle order violations 0 0
Network order violations 0 0
Wall time 531.6 s 552.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 242.8 MiB 293.5 MiB +50.7 MiB
Periodic peak PSS 239.7 MiB 290.8 MiB +51.2 MiB
RSS · first 10 avg 184.4 MiB 192.5 MiB +8.1 MiB
RSS · last 10 avg 185.3 MiB 191.1 MiB +5.7 MiB
RSS · last − first window +1.0 MiB -1.4 MiB -2.4 MiB
RSS · warm slope / 100 nav +4.7 MiB +5.3 MiB +0.6 MiB
PSS · first 10 avg 180.3 MiB 189.1 MiB +8.8 MiB
PSS · last 10 avg 182.1 MiB 187.7 MiB +5.6 MiB
PSS · last − first window +1.8 MiB -1.4 MiB -3.2 MiB
PSS · warm slope / 100 nav +4.6 MiB +5.3 MiB +0.7 MiB
Peak file descriptors 59 57 -2
Peak threads 29 29 0

HEAD memory by 50-navigation quarter

HEAD range Avg RSS Final RSS Peak RSS Avg PSS Final PSS Peak FD
1–50 182.2 MiB 124.1 MiB 224.5 MiB 179.0 MiB 121.0 MiB 53
51–100 184.7 MiB 127.7 MiB 226.2 MiB 181.5 MiB 124.6 MiB 52
101–150 186.7 MiB 183.0 MiB 230.0 MiB 183.2 MiB 179.1 MiB 52
151–200 189.8 MiB 188.9 MiB 230.6 MiB 186.7 MiB 185.3 MiB 52

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

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 737ef5f55709 → HEAD fb50cdd83ff5; benchmark order: base-first; workflow: success.

Public 48-site run · informational

Metric Base HEAD Δ
Run status success success —
Extracted rows / contract 184 / 240 189 / 240 +5 (+2.72%)
Contract fill 76.67% 78.75% +2.08 pp (+2.71%)
Sites with rows 38 / 48 39 / 48 +1 (+2.63%)
Sites meeting row contract 36 / 48 37 / 48 +1 (+2.78%)
Unexpected empty sites 10 9 -1 (-10.00%)
Partial-row sites 2 2 0 (0.00%)
Site outcomes extracted: 36; HTTP error + rows: 2; empty: 7; HTTP error + empty: 1; snapshot error + empty: 2 extracted: 38; HTTP error + rows: 1; empty: 6; HTTP error + empty: 1; snapshot error + empty: 2 —
Observed duration 43.14 s 53.22 s +10.08 s (+23.37%)
Estimated CPU 38.49 s 44.15 s +5.66 s (+14.69%)
Peak PSS 242.73 MiB 245.58 MiB +2.85 MiB (+1.18%)
Peak RSS 246.27 MiB 249.27 MiB +3.00 MiB (+1.22%)
Peak threads 27 25 -2 (-7.41%)
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 32 / 40 +5
games 37 / 40 37 / 40 0
life 30 / 40 30 / 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.038, 2.04, 2.541, 3.546, 4.547, 5.047, 6.048, 7.548, 8.548, 9.549, 11.053, 12.054, 13.556, 14.557, 15.56, 17.06, 18.061, 19.563, 20.564, 22.066, 23.068, 24.069, 25.569, 26.57, 28.072, 29.074, 30.075, 31.578, 32.578, 34.081, 35.082, 36.083, 36.585, 37.586, 38.588, 40.089, 41.09, 42.593]
    y-axis "CPU percent" 0 --> 200
    line [17.96, 41.94, 79.89, 117.06, 82.01, 144.04, 129.79, 94.03, 109.97, 57.86, 31.92, 131.97, 25.95, 119.89, 99.77, 22.01, 57.9, 77.96, 87.8, 99.9, 109.97, 133.81, 119.99, 91.82, 89.92, 99.86, 109.76, 37.9, 17.99, 85.9, 45.96, 0, 2, 2, 135.86, 154.11, 85.8, 179.72]
Loading
xychart-beta
    title "Base memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.037, 1.038, 2.04, 2.541, 3.546, 4.547, 5.047, 6.048, 7.548, 8.548, 9.549, 11.053, 12.054, 13.556, 14.557, 15.56, 17.06, 18.061, 19.563, 20.564, 22.066, 23.068, 24.069, 25.569, 26.57, 28.072, 29.074, 30.075, 31.578, 32.578, 34.081, 35.082, 36.083, 36.585, 37.586, 38.588, 40.089, 41.09, 42.593, 43.139]
    y-axis "Memory MiB" 0 --> 500
    line [13.07, 72.96, 103.34, 94.05, 106.71, 127.65, 139.06, 150.55, 150.43, 148.42, 134.26, 136.66, 145.53, 136.87, 151.21, 150.89, 116.19, 124.11, 166, 148.83, 246.27, 195.8, 182.93, 165.87, 146.96, 184.81, 146.67, 146.45, 136.1, 138.18, 176.87, 151.65, 127.02, 124.07, 125.13, 161.64, 158.63, 135.09, 163.07, 0]
    line [9.18, 68.91, 99.3, 90, 102.71, 123.03, 134.96, 146.4, 146.34, 144.5, 130.37, 132.79, 141.79, 130.88, 147.52, 146.32, 112.49, 120.47, 162.35, 145.48, 242.73, 192.59, 179.36, 162.23, 143.35, 181.5, 143.12, 143.16, 132.52, 134.79, 173.32, 147.87, 123.44, 120.65, 121.72, 158.17, 154.93, 131.6, 159.48, 0]
Loading

HEAD

xychart-beta
    title "HEAD CPU"
    x-axis "Elapsed seconds" [1.535, 2.536, 3.037, 4.038, 4.538, 6.04, 7.543, 9.043, 10.545, 12.045, 13.545, 15.045, 16.547, 18.048, 19.55, 21.052, 22.554, 24.055, 25.558, 27.061, 27.562, 28.063, 29.565, 31.067, 32.57, 34.071, 35.571, 37.076, 38.579, 40.08, 41.581, 43.084, 44.586, 46.088, 47.595, 49.097, 50.598, 52.101]
    y-axis "CPU percent" 0 --> 200
    line [15.99, 89.9, 121.84, 121.86, 153.99, 127.78, 139.79, 80.01, 119.95, 112.03, 127.98, 6, 3.99, 0, 2, 2, 3.99, 125.81, 113.71, 127.72, 99.74, 111.85, 129.82, 123.76, 139.88, 123.89, 103.97, 71.95, 79.87, 89.98, 0, 63.95, 99.87, 99.88, 99.21, 103.75, 31.98, 131.68]
Loading
xychart-beta
    title "HEAD memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.034, 1.535, 2.536, 3.037, 4.038, 4.538, 6.04, 7.543, 9.043, 10.545, 12.045, 13.545, 15.045, 16.547, 18.048, 19.55, 21.052, 22.554, 24.055, 25.558, 27.061, 27.562, 28.063, 29.565, 31.067, 32.57, 34.071, 35.571, 37.076, 38.579, 40.08, 41.581, 43.084, 44.586, 46.088, 47.595, 49.097, 50.598, 52.101, 53.223]
    y-axis "Memory MiB" 0 --> 500
    line [12.96, 79.01, 95.09, 114.98, 136.04, 126.43, 146.34, 142.16, 153.45, 140.44, 140.12, 145.72, 131.46, 116.95, 121.43, 120.43, 120.48, 120.37, 141.85, 135.62, 180.69, 249.27, 231.07, 183.41, 167.74, 146.45, 155.68, 143.6, 139.32, 177.18, 153.36, 143.14, 142.62, 160.84, 164.33, 164.46, 166.15, 147.09, 155.46, 0]
    line [9.65, 75.7, 91.35, 111.54, 132.43, 123.04, 142.21, 138.62, 149.77, 136.76, 136.43, 142.04, 127.75, 113.22, 117.72, 116.66, 116.7, 116.59, 138.08, 131.96, 176.98, 245.58, 226.94, 179.71, 164.05, 142.8, 152.05, 139.94, 135.59, 174.31, 149.78, 139.52, 138.86, 157.21, 160.69, 160.69, 162.44, 143.27, 151.78, 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.94 s 19.94 s +0.00 s (0.00%)
Estimated CPU 0.44 s 0.45 s +0.01 s (+2.26%)
Peak PSS 65.83 MiB 65.85 MiB +0.02 MiB (+0.03%)
Peak RSS 69.80 MiB 69.97 MiB +0.17 MiB (+0.25%)
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 18, 2026 •

Copy link
Copy Markdown

CI Regression Report

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

Check Status Signal
Release regression ✅ HEAD/base failures 0/0; raw binary +0.000735%
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 ⚪ artifact unavailable or invalid
WebMainBench ✅ 545/545 completed; 0 unexpected failures
Release regression — ✅ HEAD/base failures 0/0; raw binary +0.000735%

Package and image size

Metric Base HEAD Delta Delta %
Raw binary 150.59 MiB 150.59 MiB +1.13 KiB +0.000735%
Stripped binary 103.62 MiB 103.62 MiB 0 B 0.00%
gzip binary 51.70 MiB 51.71 MiB +4.82 KiB +0.009105%
Rootfs 157.49 MiB 157.49 MiB 0 B 0.00%
gzip rootfs 60.62 MiB 60.63 MiB +4.62 KiB +0.007438%

Startup latency and PSS

Case Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta
Serve ready 26.91 ms 26.83 ms −0.08 ms 4.83 MiB 5.53 MiB +725.50 KiB
CDP first page 67.30 ms 48.60 ms −18.70 ms 5.48 MiB 5.32 MiB −161.00 KiB
CDP warm page 14.39 ms 12.20 ms −2.18 ms 51.37 MiB 51.37 MiB +2.00 KiB
CLI about:blank 15.91 ms 15.18 ms −0.73 ms 4.75 MiB 4.80 MiB +52.50 KiB
CLI local JS 17.62 ms 19.38 ms +1.77 ms 4.86 MiB 4.20 MiB −679.50 KiB

Concurrency matrix

Concurrency Base p50 HEAD p50 Delta Base PSS HEAD PSS Delta HEAD failures Unstable B/H
1 17.18 ms 18.03 ms +0.85 ms 666.00 KiB 678.00 KiB +12.00 KiB 0 0/0
5 20.17 ms 21.00 ms +0.83 ms 13.57 MiB 18.71 MiB +5.14 MiB 0 0/0
10 19.71 ms 22.88 ms +3.17 ms 28.45 MiB 13.45 MiB −15.00 MiB 0 0/0
25 20.50 ms 20.33 ms −0.17 ms 28.45 MiB 13.47 MiB −14.97 MiB 0 0/0
100 19.83 ms 21.29 ms +1.46 ms 13.77 MiB 13.88 MiB +115.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 51.27s
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.33 ms 35.52 ms
Chromium 8 8 47/47 509.49 ms 139.59 ms
Operation p50 Chromium Moli Delta Delta %
navigate 41.50 ms 6.01 ms −35.49 ms −85.52%
observe 1.55 ms 1.61 ms +0.06 ms +3.98%
fill 5.58 ms 6.29 ms +0.71 ms +12.68%
click 5.84 ms 4.43 ms −1.41 ms −24.10%
Idle-resource episode Peak RSS Peak PSS Average CPU Peak CPU Peak processes Sampler
Moli 66.24 MiB 64.54 MiB 0.76% 10.00% 1 ✅
Chromium 1283.20 MiB 406.06 MiB 0.60% 6.01% 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 17.92 ms 18.93 ms 736.00 KiB
Long-lived CDP session 13 0 18.03 ms 18.84 ms —
CDP smoke — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

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 force-pushed the fix/child-meta-refresh-1118 branch from 7febf96 to e60d48f Compare October 20, 2026 22:10
@ldm0 ldm0 changed the title fix(html): preserve child meta refresh across load and adoption fix(html): preserve child meta refresh with shared scheduling Oct 21, 2026
@ldm0
ldm0 force-pushed the fix/child-meta-refresh-1118 branch from 66cf11b to 25b31c5 Compare October 25, 2026 07:43
Process parser and script-created refresh declarations in order and retain them
on their owning Document across load callbacks and adoption. Share candidate
priority and deadline state between main and child documents, and arm child
timers after owner load completes.

Consume queued work by exact Document identity and revision, classify navigation
when it fires, and keep the registered target URL. Reprocess same-value meta
attributes using the matched Attr identity so XML case, namespaces, observer
records, and refresh deadlines remain correct.

Cover competing declarations, stale tasks, independent frames, load/adoption
boundaries, sandbox/shadow handling, saved targets, and fragment navigation.
@ldm0
ldm0 force-pushed the fix/child-meta-refresh-1118 branch from fb50cdd to f9497ec Compare October 25, 2026 18:49
@ldm0
ldm0 merged commit b2fc3dd into main Oct 25, 2026
12 of 21 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