Repository navigation
fix(navigation): keep hash setters within the current document - #1786
Conversation
Clearing Location.hash produced a URL without a target fragment and entered the full-URL navigation path, interrupting load/harness completion and replacing srcdoc documents. Preserve explicit hash-setter intent in the shared Location route and compare encoded fragments before taking any navigation. Keep the main branch's full href/assign no-fragment behavior and retired-facade checks. Cover top-level hash removal, canonical hash reassignment, and srcdoc Document identity, origin and NavigateEvent metadata. Fixes: 536fa76 (PR #1701) Validate this independent patch on main ce0781f: - cargo fmt --all - cargo clippy --workspace --all-targets --all-features -- -D warnings - cargo nextest run --no-fail-fast Summary [ 493.678s] 20436 tests run: 20436 passed (9 slow), 18 skipped Original-commit: 9446bea
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.000080%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 — ✅ 52/52 groups passed; 622 scenariosWorkers: 4 · cumulative group time: 203.80 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. |
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 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.035, 2.036, 2.536, 3.538, 4.539, 6.042, 7.042, 8.042, 9.543, 10.542, 11.543, 13.043, 14.044, 15.045, 16.546, 17.547, 18.549, 20.051, 21.052, 22.053, 22.553, 23.555, 24.555, 25.557, 27.058, 28.059, 29.06, 30.561, 31.562, 32.563, 34.064, 35.065, 36.066, 37.569, 38.571, 39.572, 41.075, 41.576]
y-axis "CPU percent" 0 --> 200
line [2, 67.89, 33.99, 115.85, 113.9, 117.78, 131.88, 84.01, 127.95, 86.01, 38, 124.05, 22, 101.85, 107.95, 5.99, 39.93, 47.89, 117.98, 117.73, 99.94, 107.88, 105.98, 135.78, 131.89, 119.9, 99.96, 101.9, 23.99, 33.98, 39.97, 45.97, 4, 105.78, 129.86, 15.98, 129.66, 167.85]
xychart-beta
title "Base memory: RSS then PSS"
x-axis "Elapsed seconds" [0.034, 1.035, 2.036, 2.536, 3.538, 4.539, 6.042, 7.042, 8.042, 9.543, 10.542, 11.543, 13.043, 14.044, 15.045, 16.546, 17.547, 18.549, 20.051, 21.052, 22.053, 22.553, 23.555, 24.555, 25.557, 27.058, 28.059, 29.06, 30.561, 31.562, 32.563, 34.064, 35.065, 36.066, 37.569, 38.571, 39.572, 41.075, 41.576, 41.795]
y-axis "Memory MiB" 0 --> 500
line [13.59, 62.61, 92.32, 84.39, 113.5, 135.91, 161.98, 140.93, 152.33, 136.18, 131.92, 139.49, 153.29, 135.54, 129.66, 154.96, 116.81, 120.47, 152.23, 137.3, 141.59, 213.11, 174.51, 208.59, 156.96, 155.83, 145.61, 132.73, 143.38, 133.45, 137.66, 128.78, 135.69, 124.49, 150.1, 157.76, 124.97, 166.5, 163.26, 0]
line [10.06, 58.92, 88.11, 79.53, 110.79, 132.43, 156.1, 137.23, 148.57, 132.38, 128.3, 136.01, 149.56, 131.78, 125.84, 150.97, 113.06, 116.72, 148.16, 133.55, 140.39, 209.4, 170.82, 204.89, 153.23, 152.88, 141.88, 128.97, 139.71, 129.7, 133.91, 125.03, 132.01, 120.74, 146.71, 154.01, 121.22, 162.78, 159.61, 0]
HEADxychart-beta
title "HEAD CPU"
x-axis "Elapsed seconds" [1.037, 1.538, 2.539, 4.041, 5.042, 6.543, 8.045, 9.047, 10.549, 11.551, 13.053, 14.055, 15.558, 17.061, 18.062, 19.564, 20.566, 22.069, 23.57, 24.571, 25.571, 26.072, 27.072, 28.574, 29.574, 31.075, 32.575, 33.575, 35.078, 36.08, 37.581, 39.082, 40.082, 41.584, 42.586, 44.089, 45.09, 46.091]
y-axis "CPU percent" 0 --> 200
line [0, 2, 15.99, 105.83, 113.88, 135.82, 121.79, 95.86, 107.75, 127.79, 119.8, 117.79, 79.83, 125.74, 3.99, 0, 39.98, 119.75, 116.03, 133.88, 99.95, 111.88, 102.02, 79.87, 131.9, 131.91, 106.12, 114.01, 35.92, 143.86, 63.92, 0, 0, 25.98, 127.61, 13.96, 129.9, 177.72]
xychart-beta
title "HEAD memory: RSS then PSS"
x-axis "Elapsed seconds" [0.036, 1.037, 1.538, 2.539, 4.041, 5.042, 6.543, 8.045, 9.047, 10.549, 11.551, 13.053, 14.055, 15.558, 17.061, 18.062, 19.564, 20.566, 22.069, 23.57, 24.571, 25.571, 26.072, 27.072, 28.574, 29.574, 31.075, 32.575, 33.575, 35.078, 36.08, 37.581, 39.082, 40.082, 41.584, 42.586, 44.089, 45.09, 46.091, 46.398]
y-axis "Memory MiB" 0 --> 500
line [13.59, 54.82, 54.82, 73.9, 103.63, 110.63, 119.57, 153.84, 133, 147.01, 154, 136.54, 133.09, 137.68, 137.3, 117.76, 117.81, 132.03, 164.23, 144.46, 150.43, 252.38, 234.13, 189.04, 132.26, 153.96, 150.59, 139.07, 126.85, 140.16, 196, 143.04, 129.13, 127.17, 138.45, 164.95, 126.73, 156.94, 165.25, 0]
line [10.08, 51.18, 51.18, 70.33, 100, 107.04, 115.94, 150.1, 129.51, 143.26, 150.46, 132.79, 129.3, 133.01, 134.08, 113.95, 114, 128.21, 160.46, 140.65, 146.75, 248.88, 229.97, 185.24, 128.68, 151.44, 146.83, 135.32, 123.03, 136.36, 191.2, 139.23, 125.32, 123.36, 134.57, 161.15, 122.8, 153.16, 161.45, 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. |
Clearing
Location.hashcould enter cross-document navigation and replace srcdoc Documents. Fix fragment construction and equality directly in the setter: retain an empty fragment when clearing a nonempty hash, compare encoded fragments, and treat absent and empty fragments as equivalent for no-op assignments. This follows the Location.hash setter steps.Reuse the existing same-document navigation route and remove the added
navigate_location_hashhelper andhash_setterrouting options. The final production change is confined to the setter. Tests cover empty/absent fragment no-ops without history or navigation events, encoded-fragment equality, and srcdoc Document/origin identity without child replacement tasks.Fixes the same-document regression introduced in
536fa76aee97f8cae5922a72aaf06381e8ad8fd6(#1701). This PR is independent of the other runtime splits from #1726.Validation on
a0d9b3ae81d:cargo fmt --allcargo clippy --workspace --all-targets --all-features -- -D warningscargo nextest run --no-fail-fast: 20,437 passed, 18 skipped, using default machine parallelism.The final PR changes one production file and one test file; no documentation or aggregate Cases snapshots are included.