Repository navigation
fix(renderer): export live rendered content through shared markdown conversion - #1337
lanyue-llk wants to merge 1 commit into
Conversation
efe538b to
73c4a29
Compare
73c4a29 to
3fae227
Compare
3fae227 to
0476c31
Compare
0476c31 to
c98074f
Compare
c98074f to
a0ad007
Compare
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.036, 1.537, 2.538, 4.039, 5.04, 6.541, 8.043, 9.043, 10.545, 11.546, 13.049, 14.05, 15.551, 17.054, 18.056, 19.557, 20.558, 22.06, 23.562, 24.562, 25.564, 26.065, 27.067, 28.568, 29.569, 31.072, 32.575, 33.575, 35.076, 36.077, 37.578, 39.081, 40.082, 41.583, 42.584, 44.085, 44.585, 45.085]
y-axis "CPU percent" 0 --> 500
line [1.99, 57.99, 127.8, 132.05, 151.55, 125.91, 177.8, 127.96, 167.86, 31.98, 101.89, 49.87, 121.9, 123.74, 77.82, 19.99, 57.97, 59.94, 119.9, 74.04, 115.68, 109.83, 117.81, 75.9, 155.88, 137.79, 113.81, 129.93, 23.93, 81.92, 107.8, 3.99, 75.91, 122.03, 55.91, 132.04, 195.96, 123.98]
xychart-beta
title "Base memory: RSS then PSS"
x-axis "Elapsed seconds" [0.035, 1.036, 1.537, 2.538, 4.039, 5.04, 6.541, 8.043, 9.043, 10.545, 11.546, 13.049, 14.05, 15.551, 17.054, 18.056, 19.557, 20.558, 22.06, 23.562, 24.562, 25.564, 26.065, 27.067, 28.568, 29.569, 31.072, 32.575, 33.575, 35.076, 36.077, 37.578, 39.081, 40.082, 41.583, 42.584, 44.085, 44.585, 45.085, 46.114]
y-axis "Memory MiB" 0 --> 500
line [12.39, 62.03, 100.54, 117.96, 143.36, 162.71, 142.68, 177.34, 167.88, 171.96, 171.08, 176.18, 174.95, 170.3, 158.32, 168.98, 148.13, 152.31, 180.29, 178.32, 201.72, 273.5, 196.84, 218.13, 158.2, 162.33, 204.98, 160.9, 162.96, 155.57, 178.19, 168.83, 177.75, 177.68, 184.99, 154.89, 192.66, 211.68, 203.67, 0]
line [9.16, 58.46, 96.96, 114.38, 139.79, 159.13, 139.09, 173.78, 164.45, 168.38, 168.22, 172.58, 171.35, 166.7, 154.75, 165.39, 144.53, 148.58, 176.12, 174.06, 198.15, 269.54, 193.32, 214.7, 154.26, 158.76, 201.81, 157.35, 159.36, 151.97, 175.02, 165.31, 174.15, 173.4, 180.49, 151.29, 189.21, 208.12, 200.08, 0]
HEADxychart-beta
title "HEAD CPU"
x-axis "Elapsed seconds" [1.039, 2.039, 3.541, 4.042, 6.044, 8.046, 9.547, 11.549, 13.553, 15.554, 17.555, 19.559, 21.564, 23.566, 25.569, 27.071, 29.073, 31.076, 33.078, 35.081, 37.083, 39.087, 41.089, 43.091, 44.592, 46.595, 48.598, 50.599, 52.601, 54.603, 56.607, 58.609, 60.613, 62.116, 64.119, 66.122, 68.124, 69.626]
y-axis "CPU percent" 0 --> 500
line [0, 137.96, 113.83, 109.82, 137.98, 95.97, 175.75, 179.79, 73.92, 133.86, 7.99, 7.98, 5.98, 5.99, 5.99, 0, 0, 0, 0, 0, 2, 123.94, 77.97, 49.99, 115.92, 107.77, 109.97, 105.91, 127.71, 89.88, 13.97, 159.71, 3.99, 71.85, 112.05, 37.92, 137.73, 215.91]
xychart-beta
title "HEAD memory: RSS then PSS"
x-axis "Elapsed seconds" [0.038, 1.039, 2.039, 3.541, 4.042, 6.044, 8.046, 9.547, 11.549, 13.553, 15.554, 17.555, 19.559, 21.564, 23.566, 25.569, 27.071, 29.073, 31.076, 33.078, 35.081, 37.083, 39.087, 41.089, 43.091, 44.592, 46.595, 48.598, 50.599, 52.601, 54.603, 56.607, 58.609, 60.613, 62.116, 64.119, 66.122, 68.124, 69.626, 70.096]
y-axis "Memory MiB" 0 --> 500
line [12.53, 55.22, 114.72, 124.67, 136.34, 156.66, 166.9, 163.11, 166.23, 146.57, 172.78, 147.91, 149.54, 149.42, 149.42, 149.42, 149.42, 149.42, 149.42, 149.42, 149.42, 149.42, 170.77, 152.18, 175.13, 169.25, 294.33, 219.25, 167.39, 185.25, 153, 153.7, 190.02, 152.73, 171.06, 162.01, 154.47, 175.66, 202.11, 0]
line [9.32, 51.68, 111.16, 120.6, 132.81, 153.34, 163.55, 159.57, 162.64, 142.98, 169.24, 144.28, 145.94, 145.82, 145.82, 145.82, 145.82, 145.82, 145.98, 145.93, 145.93, 146.04, 167.39, 148.79, 171.75, 166, 291.48, 215.93, 164, 182.02, 149.62, 150.31, 186.65, 149.34, 167.68, 158.6, 151.21, 172.04, 198.87, 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.104972%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; 621 scenariosWorkers: 4 · cumulative group time: 189.73 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. |
a0ad007 to
b7f4f45
Compare
b7f4f45 to
3d68030
Compare
3d68030 to
1acd30d
Compare
|
Closing after the consolidation audit. This earlier rendered-state export stack was not part of the measured fixed build and is much broader than the evidenced Web Fetch defects. It is intentionally not merged into #1501. |
问题与方案
序列化 HTML 不能完整反映页面当前状态:继承的隐藏样式与子元素自身样式、加载占位内容、折叠详情、动画终态、用户修改后的表单值和已解析资源地址,都可能影响导出的内容。只检查 HTML 属性会混入占位文字,也会误删可读正文。
本 PR 把真实页面状态接到共享转换器:
根因、方案与验收
CSS 语义的来源是 Stylo PR #2。固定提交包含 main 现有依赖;Stylo PR #1 的环境文字缩放是另一组能力,不是这里的前置条件。
动画效果按原始槽位处理
NoEffect、Underlying、Replace、Unknown。无终态保留效果的动画不会抹掉下层 opacity;无法确定的效果不能充当正文可见的证据。图中的单次淡入只展示一个受支持场景。修复机制图
范围与依赖
这是 #919 的运行时适配部分,基于 #1336 的
codex/content-tables-fragments;前置规则按 #1334 → #1335 → #1336 顺序提供。本组仅依赖 #1336 的公开 DOM 边界及共享转换接口。Stylo 依赖固定为1032a2947ec2f7cee1027d07084203be87e17643,该提交包含当前 main 的依赖0c7e8baf63b6714e7614834fadbc09710f3c3d27,增加样式来源与最终 opacity 接口。与当前 main 的冲突保留了
ComputedStyleRead,只补入本组的可见性查询。#919 早期关联的 parser 恢复修复已经在 main,本次无需再次复制。验证
真实页面专项测试覆盖隐藏继承与覆盖、折叠内容、懒加载占位、动画终态及覆盖、文字与背景对比、表单实时修改、资源 URL、CSS 文本边界和导出前后的 DOM 不变性。CLI 场景验证布局及数据表格导出。完整仓库测试交由 CI。
cargo fmt --all、构建元数据锁定检查和 diff 检查:通过。cargo test -p moli-renderer-v8 --locked --lib runtime::page_vm::tests::markdown_dump::markdown_uses_live_visibility_and_preserves_disclosure_content -- --exact:1 个专项通过,8949 个其他测试未执行。cargo test -p moli --locked --test fetch_cli markdown:::4 个 CLI 场景全部通过,包括布局表格、数据表格及无表头表格,在有无布局模式下核验导出。与 #1305 的关系
#1305 直接基于 main,负责执行调用者明确指定的脚本,等待 Promise 和导航后走标准导出路径。这四组修复负责导出内容的完整性与语义。双方没有代码前置依赖;组合后,交互后的 DOM 会使用这些共享转换规则。
默认只读采集和明确交互采集是不同的测量协议。报告中的历史成绩仍绑定原调用协议;不能给单一方法补交互后替换同一行成绩。
报告
完整 WebMainBench 报告 保留原已发布的完整运行:Moli 1.1.11,源码
721bd2e329f96c06573db6e6b257a149cf17a6fe,545/545 目标正文。该运行不对应拆分后的新分支。四组组合的生产代码及依赖锁定与 #919 净修复叠加该 main 后的冻结参考完全一致。原有场景覆盖保留;原生 DOM 验收随所属转换规则拆分,并增加不可用图片标签场景。HTTP 测试固定响应日期,消除跨秒比较的偶发失败。README 把差异数量 12 更正为 13。拆分没有生成新的基准分数。
已发布完整组合的实测证据
下表属于报告中已经认证的完整组合,源码为
721bd2e329f96c06573db6e6b257a149cf17a6fe,release 二进制 SHA-256 为fac987f54939fab2f5db7bf54af41b25cbb3aed3230528c170b4c22ada0b98ac。它不是本 PR 单独带来的收益,也不是 rebase 后的新测量。分项公共总体为全文 545、代码 110、公式 257、表格内容与结构各 179;综合分为五项均值的等权平均,目标正文数量另列。完整报告保留七种方法、逐页结果和失败分析。
后续文档 PR
#1380 以本分支为基线,统一整理中英文 README 的评测说明并加入 Web Fetch 结果;仅含文档修改,待本 PR 合入后再合入。
PR stack
GitHub 原生依赖链:#1334 → #1335 → #1336 → #1337 → #1380 → #1428 → #1431 → #1432。
每个 PR 的 GitHub base 都是左侧紧邻分支,因此 Files changed 只显示本层增量。按从左到右的顺序合入。#919 是保留的历史完整组合,不是这条链的依赖;#1429 独立面向
main,只提供通用 CI 评测入口。