Repository navigation
fix(browser): complete remaining protocol and rendering contracts - #731
lanyue-llk wants to merge 5 commits into
Conversation
50b81ee to
7ac5464
Compare
lanyue-llk
left a comment
There was a problem hiding this comment.
已对照 #640 的审查关注点检查协议边界、默认行为与生命周期,并核对本 PR 的改动及 CI。下面两处会影响新增 Inspector 接口的实际客户端使用;其余输入、下载和绘制路径未发现足以评论的确定性回归。
lanyue-llk
left a comment
There was a problem hiding this comment.
复查最新提交:上轮两条 Inspector 评论对应的单会话行为已修复。Rust 结构整体符合仓库既有风格;以下两处是可定位的功能边界,另有一处新增状态没有生产用途。
lanyue-llk
left a comment
There was a problem hiding this comment.
复查最新提交的跨目标状态、分块模糊、Inspector、输入及下载链路。上一轮三项修复在当前代码和新增测试覆盖的场景下成立;下面这处是浏览器范围状态的后续生命周期缺口。
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. |
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, 1.536, 2.537, 3.539, 4.039, 4.54, 5.039, 6.539, 7.541, 9.043, 10.044, 11.546, 12.547, 14.05, 15.052, 16.554, 17.556, 19.057, 20.057, 21.557, 22.558, 24.061, 25.062, 26.563, 27.564, 29.066, 30.067, 31.569, 32.57, 34.072, 35.072, 36.574, 37.576, 39.078, 40.079, 41.581, 42.58, 44.083]
y-axis "CPU percent" 0 --> 200
line [27.98, 123.8, 55.89, 133.76, 121.84, 127.99, 162.02, 148.1, 173.56, 185.64, 145.92, 139.83, 157.86, 123.7, 2, 69.98, 77.97, 0, 74, 79.91, 143.82, 135.62, 111.96, 123.77, 145.95, 149.9, 107.91, 37.95, 43.95, 113.7, 8, 137.94, 109.76, 17.96, 95.9, 167.82, 26, 117.84]
xychart-beta
title "Base memory: RSS then PSS"
x-axis "Elapsed seconds" [0.035, 1.035, 1.536, 2.537, 3.539, 4.039, 4.54, 5.039, 6.539, 7.541, 9.043, 10.044, 11.546, 12.547, 14.05, 15.052, 16.554, 17.556, 19.057, 20.057, 21.557, 22.558, 24.061, 25.062, 26.563, 27.564, 29.066, 30.067, 31.569, 32.57, 34.072, 35.072, 36.574, 37.576, 39.078, 40.079, 41.581, 42.58, 44.083, 45.082]
y-axis "Memory MiB" 0 --> 500
line [12.15, 89.14, 111.35, 119.04, 116.37, 132.19, 141.34, 157.78, 178.04, 159.48, 178.16, 175, 175.39, 154.63, 162.78, 144.2, 145.59, 149.19, 139.62, 147.79, 168.85, 169.7, 194.12, 279.91, 223.29, 160.37, 172.46, 162.4, 154.27, 153.52, 163.75, 155.23, 228.59, 193.66, 161.87, 177.56, 202.5, 157.43, 201.89, 0]
line [8.89, 85.51, 107.64, 115.37, 112.66, 128.5, 137.64, 154.14, 174.92, 155.54, 174.44, 171.25, 171.64, 150.93, 159.01, 140.43, 141.83, 145.42, 135.85, 144.02, 165.08, 163.93, 190.38, 275.91, 219.64, 156.71, 167.94, 158.91, 150.49, 149.74, 159.98, 151.46, 224.56, 190.09, 158.09, 173.78, 199.94, 153.74, 198.13, 0]
HEADxychart-beta
title "HEAD CPU"
x-axis "Elapsed seconds" [1.036, 1.536, 2.538, 4.041, 5.544, 6.545, 8.046, 9.549, 11.05, 12.05, 13.552, 15.054, 16.056, 17.559, 19.062, 20.064, 20.565, 21.567, 23.069, 24.57, 25.573, 27.075, 27.576, 28.578, 29.579, 31.079, 32.58, 33.582, 35.083, 36.585, 37.586, 39.088, 40.589, 42.09, 43.09, 44.593, 46.095, 47.095]
y-axis "CPU percent" 0 --> 200
line [15.96, 121.92, 49.9, 125.79, 179.62, 149.86, 79.92, 189.77, 53.97, 87.99, 139.84, 89.96, 29.93, 73.86, 5.99, 3.99, 0, 0, 55.89, 69.95, 117.8, 119.93, 99.94, 133.76, 151.84, 151.99, 97.93, 95.75, 151.82, 69.92, 13.98, 87.94, 20.02, 7.99, 83.93, 115.84, 67.84, 112.03]
xychart-beta
title "HEAD memory: RSS then PSS"
x-axis "Elapsed seconds" [0.035, 1.036, 1.536, 2.538, 4.041, 5.544, 6.545, 8.046, 9.549, 11.05, 12.05, 13.552, 15.054, 16.056, 17.559, 19.062, 20.064, 20.565, 21.567, 23.069, 24.57, 25.573, 27.075, 27.576, 28.578, 29.579, 31.079, 32.58, 33.582, 35.083, 36.585, 37.586, 39.088, 40.589, 42.09, 43.09, 44.593, 46.095, 47.095, 48.242]
y-axis "Memory MiB" 0 --> 500
line [12.21, 76.14, 120.22, 122.82, 139.9, 164.73, 179.71, 169, 190.77, 164.31, 188.24, 193.91, 164.56, 146.95, 165.18, 149.15, 148.13, 148.13, 147.12, 155.35, 165.25, 167.58, 188.35, 257.92, 199.82, 205.39, 230.24, 145.65, 170.96, 179.2, 172.03, 167.59, 180.01, 164.78, 151.34, 166.1, 185.8, 152.58, 185.09, 0]
line [8.89, 72.51, 116.5, 119.11, 136.12, 161.01, 175.88, 165.66, 187.11, 160.48, 184.41, 190.38, 160.71, 143.11, 161.34, 145.31, 144.29, 144.29, 143.28, 151.5, 161.41, 163.82, 184.51, 254.11, 195.98, 201.54, 226.59, 141.82, 167.29, 175.36, 168.2, 163.74, 177, 160.94, 147.49, 161.93, 183.48, 148.75, 181.26, 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. |
CI Regression ReportSource CI run · source state at render:
Release regression — ✅ HEAD/base failures 0/0; raw binary +0.123316%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 — ✅ 53/53 groups passed; 622 scenariosWorkers: 4 · cumulative group time: 194.57 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. |
6764ef7 to
09188b2
Compare
09188b2 to
31619c6
Compare
31619c6 to
42c1734
Compare
42c1734 to
a1dc627
Compare
a1dc627 to
e692b1f
Compare
66a74a6 to
0979cdd
Compare
0979cdd to
b1fe859
Compare
6fb2683 to
cb02c2b
Compare
cb02c2b to
1cb3f28
Compare
1cb3f28 to
363b0a8
Compare
363b0a8 to
8bc70d3
Compare
8bc70d3 to
eadcda7
Compare
eadcda7 to
1bb1325
Compare
1bb1325 to
b980a0f
Compare
b980a0f to
fb2f6b3
Compare
|
依赖 stylo pr 1 的合入 |
Purpose
Extend #640 with browser-client protocol, rendering and emulation support. Each target retains its own effective environment; protocol commands use the renderer and paint owners already responsible for the output.
Overall design
Full-size overview · All current PR diagrams
Implementation flow (Mermaid)
Scope and ownership
Inspector geometry uses main's native node references. Worker fixtures retain the renderer stack budget.
Dependencies
main → #640 → #731 → #853. This PR targets #640; headfb2f6b397.Stylo #1, pinned at
0db9840e674f6ad45c4df06961501b1a26bd2827, supplies preferred text scale and preserves the WebMCP selector APIs required by current main.Reproduce affected cases
Local fixtures and expected behavior
Each case below is an existing regression test at this PR's pinned head. The fixtures create their own pages and local services; Rainbond, WebArena credentials and model calls are unnecessary. Follow the repository's Rust toolchain and install cargo-nextest before running. Initial compilation is still required; the filter runs only the listed cases.
schema_discovery_lists_unique_dispatchable_domainsbrowser_window_bounds_readback_preserves_unspecified_dimensionsscroll_gesture_uses_hit_target_and_honors_wheel_cancellationinspector_highlight_rect_is_visible_and_hide_restores_original_pixelsinspector_highlight_tracks_live_node_geometry_and_rejects_stale_idsos_text_scale_updates_css_environment_and_preserves_media_preferencescontext_media_keeps_each_page_text_scale_across_reloadvision_deficiency_changes_capture_pixels_without_mutating_domblurred_vision_accepts_4k_capturewebsocket_cdp_plain_anchor_attachment_download_keeps_documentExpected result: all selected tests pass. To run one case, replace the expression after
-Ewithtest(the_case_name). Test failures print the expected/actual assertion. These are regression case identifiers, with inputs and assertions linked to the exact source version.Links to the original client badcases
These recorded scenario IDs came from the 12-case browser-client cohort supporting #731. They are client scenarios, independent of the 812-task WebArena dataset.
pw_raw_schema_getdomainsschema_discovery_lists_unique_dispatchable_domainsv2_t2_browser_windowbrowser_window_bounds_readback_preserves_unspecified_dimensionsv2_t2_misc_input_scrollscroll_gesture_uses_hit_target_and_honors_wheel_cancellationv4_cdp_dom_highlightrect/v4_cdp_dom_hidehighlightinspector_highlight_rect_is_visible_and_hide_restores_original_pixelsv4_cdp_dom_highlightnodeinspector_highlight_tracks_live_node_geometry_and_rejects_stale_idsv4_cdp_emulation_setemulatedostextscaleos_text_scale_updates_css_environment_and_preserves_media_preferencesv4_cdp_emulation_setemulatedvisiondeficiencyvision_deficiency_changes_capture_pixels_without_mutating_domsc_dl_download_checksum__pwwebsocket_cdp_plain_anchor_attachment_download_keeps_documentThe vision regression above asserts grayscale pixel behavior; the original client case used protanopia. The download regression asserts attachment/navigation behavior; the original Playwright case additionally checked downloaded bytes. Both are useful checks at their stated scope.
Evaluation reports
Current-head validation
CI report for #731: all 20 checks passed, including Nextest, protocol smoke tests, the 1,020-case frontend differential, 545-page WebMainBench, navigation soak and release comparisons.
The cumulative #640 + #731 + #853 local tree passed formatting, all-feature Clippy and 19,809 tests, with 14 ignored. This is cumulative coverage; the linked CI verifies this PR's own head.