Skip to content

Add Moli version success and resource comparison - #27

Merged
lanyue-llk merged 29 commits into
mainfrom
codex/moli-version-resource-report
Sep 22, 2026
Merged

lanyue-llk merged 29 commits into
mainfrom
codex/moli-version-resource-report

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Benchmark execution now supports only fixed layout off/on. The related harness PR Explain Moli repairs in WCXB interpretation #25 removes --try-layout, recovery scheduling and result replacement; this report retains its existing fixed-mode measurements.

  • Compare seven fixed Moli configurations in one 372-case success table and one code-generated memory/CPU chart. Keep the existing accuracy evidence; no accuracy rerun in this resource correction.

  • Align the four 1.1.9 release resource configurations with the original three: Docker Linux ARM64 on the Mac host, process-tree PSS and CPU, the official Lexbench collector, 557 tasks × 5 calls, jobs=1, 250 ms sampling, and the official profiler-off calibration paired with engine measurement.

  • Bind binaries, runner inputs, complete calls and calibration evidence. Reject incomplete runs, changed builds, polluted hosts and aggregates inconsistent with raw calls.

  • Use 1.1.4 layout off as the common baseline. Point labels show method and signed changes; ✦ means layout on. The legend owns exact values. Detailed distributions are expandable; both languages share one model.

  • Preserve distinct functional/resource build identities, compact success/failure diagnosis, raw evidence dialogs, keyboard return navigation and the existing report URL.

Results

Resource values below use the predeclared 209-task / 1,045-call chart population. The report also includes all 557 tasks / 2,785 calls per configuration.

Configuration Passed / 372 Peak PSS P50 (MiB) Change vs 1.1.4 Mean CPU (ms) Change vs 1.1.4
1.1.4 off 0 77.22 +0.00% 21.41 +0.00%
1.1.8 off 1 77.10 -0.15% 21.32 -0.40%
1.1.8 on 255 80.54 +4.30% 21.66 +1.16%
1.1.9 off 1 76.94 -0.36% 21.11 -1.39%
1.1.9 on 255 80.23 +3.90% 21.04 -1.70%
1.1.9 patched off 1 77.70 +0.63% 21.00 -1.92%
1.1.9 patched on 360 80.83 +4.68% 21.48 +0.36%

A case passes only if all three attempts pass. 1.1.4 includes one direct candidate check and 371 inherited failures. Patched accuracy belongs to build 87c87e95; resource evidence belongs to release build f315ff26. These are separately identified in the report.

Verification

  • 31 targeted tests plus 17 subtests; Ruff and diff checks.
  • Release evidence validation: 372 cases, 8,946 retained functional calls, 46,872 evidence files, 27 negative controls.
  • Packaged UI: 112 language/theme/viewport checks, six UI negative controls and ten evidence flows.
  • Four complete resource measurements (11,140 calls) and their official calibration pairs; all host-quality and observer-overhead checks passed.
  • No measured outputs, binaries or credentials committed. No Moli source changes or merges.

Published report

Related test tooling: lexmount/Lexbench-Headless-Browser#25

Published version: ver_460f324bc0c04d53a866517db54edd13. All 29 hosted files match the submitted package by SHA-256. Hosted success/failure evidence, Escape, focus restoration and nested bilingual navigation passed.

@lanyue-llk
lanyue-llk force-pushed the codex/moli-version-resource-report branch from 45ea382 to 556bb12 Compare September 20, 2026 09:27
@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 22s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

Two bugs found in scripts/plot_moli_version_resources.py:

1. Unguarded dict access crashes on unknown configuration IDs

scripts/plot_moli_version_resources.py lines 121 and 123:

color = COLORS[row["id"]]          # KeyError if id not in {"114_off","118_off","118_on"}
dx, dy, anchor = label_offsets[row["id"]]   # same

COLORS and label_offsets are both hardcoded to the same three keys. Any data file that adds a fourth configuration (or misspells an id) raises an unhandled KeyError inside the rendering loop with no diagnostic. The validation block at the top of render_chart only checks metrics and language; it never validates row["id"].

Fix this →

2. Y-axis silently clips data above 80 %

Lines 90 and 126:

for tick in range(0, 81, 20):
    y = _scale(tick, 0, 80, chart_bottom, top)   # axis drawn for 0–80 only
...
y = _scale(float(row["success_rate_pct"]), 0, 80, chart_bottom, top)  # value can exceed 80

_scale does no clamping. A success_rate_pct > 80 maps to a y above the top margin (a negative SVG coordinate), rendering the point off-screen with no error. The current data has a maximum of ~68.5 %, so the bug is dormant but will silently corrupt the chart if the ceiling is ever crossed.

Fix this →


No security issues found. The remaining changes (report_i18n.py, report-changes.json, test_report_changes.py) look correct.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 3s —— View job


Review 结论

有条件通过

问题及建议

  • [P1] scripts/plot_moli_version_resources.py:128-135:PSS-only 模式下 width=820,图例从 cursor=55 起每步 +420,第三项落在 x=895,超出 SVG 宽度边界,会被渲染引擎裁剪。双面板 width=1420 时不受影响。建议根据 width 动态计算图例间距,或在 PSS-only 路径显式缩小步长;同时在 test_pss_only_omits_cpu_content 中断言第三个图例 label 确实存在于输出中(当前只验证了"不含 CPU",未验证图例完整性)。

  • [P2] scripts/plot_moli_version_resources.py:61:chart_height = chart_bottom - top 赋值后全文未使用,属死代码,建议删除。

  • [P2] scripts/plot_moli_version_resources.py:106-110:label_offsets 字典在每次 panel 循环迭代内重复构造,与 panel 无关,应移至循环外。

  • [P2] tests/test_moli_version_resource_chart.py:缺少英文双面板输出的正向控制(只有英文 PSS-only 负向控制)。建议补充 language="en" 双面板渲染的断言,验证英文标签与数值均正确生成。

残余风险:report-changes.json 新条目的 comparison_kinds 设计为被 report_i18n.py 和 test_report_changes.py 同步跳过,逻辑一致,未见违规。chart_height 以外的 SVG 坐标计算逻辑正确。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35502379058. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 5m 8s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

  • [P2] scripts/plot_moli_version_resources.py:38:render_chart 对 metrics、language 和 row["id"] 均有前置校验,但未验证 data["resource_population"] 及其 chart_calls/chart_tasks 键是否存在。缺失时会在副标题格式化处抛出无诊断信息的 KeyError,建议补充显式 ValueError 校验,保持校验风格一致。

残余风险:前两轮自动 review 所列问题(未守护的 dict 访问、y 轴硬编码上限 80%、PSS-only 图例溢出宽度、死代码 chart_height、label_offsets 在循环内重建、英文双面板缺正向测试)均已在当前代码中修复,独立核实一致。report-changes.json 新条目的 comparison_kinds 设计与 report_i18n.py 及 test_report_changes.py 三处同步跳过,逻辑自洽。resource_population 以外的坐标计算、图例步长和双语输出逻辑正确。

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 19s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

Both bugs from the prior review are fixed in this push. No new bugs found.

Previously reported — now fixed:

  • Unguarded dict access (COLORS[row["id"]] / label_offsets[row["id"]]): Fixed. Lines 35–37 now validate all row IDs against COLORS before the rendering loop and raise a descriptive ValueError for any unknown id.
  • Y-axis silently clips data above 80 %: Fixed. y_max is now derived dynamically from the data (max(20, ceil(max_success_rate / 20) * 20)) and used consistently for both the grid ticks and _scale calls.

Also fixed (noted in other review):

  • Legend overflow in PSS-only mode: legend_step is now min(420, (width - 110) / len(rows)), bounding it to the available width.
  • label_offsets is constructed once outside the panel loop.

No security issues found. The remaining changes (report_i18n.py, report-changes.json, test_report_changes.py) look correct.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35503343269. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 40s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found. All issues from prior reviews have been fixed in this push:

  • ID validation guards both COLORS and label_offsets lookups (line 35–37)
  • Y-axis upper bound is derived dynamically from data, not hardcoded to 80 (lines 73–74)
  • resource_population fields validated with a descriptive ValueError (lines 38–46)
  • label_offsets constructed once outside the panel loop (lines 102–106)
  • Legend step bounded to available width (line 142)
  • All user-data text routed through html.escape() before SVG insertion

The remaining changes (report_i18n.py, report-changes.json, test_report_changes.py) are correct.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 50s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。

残余风险:

  • [P2] scripts/plot_moli_version_resources.py:142:legend_step = min(420, (width - 110) / len(rows)) 只限制了点间距,未留文字宽度。PSS-only 模式(width=820,3 行)下 legend_step≈237,第三个 dot 落在 x≈528,后跟英文标签"Moli 1.1.8 · layout on: 255/372 (68.5%)"(~40 字符 × 8.5px ≈ 340px),末端约在 x≈881,超出 SVG 宽度(820px)~61px。嵌入 HTML 时 SVG 默认 overflow:hidden,该标签末段会被视觉裁剪。发布的双面板(width=1420)不受影响;PSS-only 属辅助路径,影响有限,但建议在 legend_step 公式中预留固定文字宽度余量(如减去 150px),或在测试中断言第三个图例点的 x 坐标在有效范围内。

  • [P2] scripts/plot_moli_version_resources.py:metrics=("cpu",) 单面板路径无测试覆盖(现有测试仅覆盖双面板和 PSS-only)。如该路径被实际使用,建议补充。

前三轮自动 review 所列全部问题(未守护的 dict 访问、y 轴硬编码上限 80%、PSS-only 图例 dot 溢出、死代码 chart_height、label_offsets 在循环内重建、英文双面板缺正向测试、resource_population 字段缺校验)已逐一独立核实均已修复。report-changes.json 新条目置于 releases 数组首位,comparison_kinds 在 report_i18n.py 和 test_report_changes.py 三处同步跳过,逻辑自洽,发布条目计数(20)不受影响。双语一致性、证据字段和 SVG 坐标计算正确。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35503665548. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 37s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found. All issues from prior reviews have been fixed in this push:

  • ID validation guards COLORS and label_offsets lookups (lines 35–37)
  • Y-axis upper bound derived dynamically from data (lines 73–74)
  • resource_population fields validated with descriptive ValueError (lines 38–46)
  • label_offsets constructed once outside the panel loop (lines 102–106)
  • Legend step bounded to available width (line 142)
  • All user-data text routed through html.escape() before SVG insertion

The remaining changes (report_i18n.py, report-changes.json, test_report_changes.py) are correct.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 50s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。

残余风险:

  • [P2] scripts/plot_moli_version_resources.py:142:legend_step = min(420, (width - 110) / len(rows)) 仅约束点间距,未预留文字宽度。英文 PSS-only / CPU-only 模式(width=820,3 行)下,legend_step≈237,第三个图例点落在 x≈528,跟随的英文长标签(如 "Moli 1.1.8 · layout on: 255/372 (68.5%)",约 40 字符 × 8.5px ≈ 340px)末端约在 x≈880,超出 SVG 宽度(820px)约 60px。嵌入 HTML 时 overflow:hidden 会静默裁剪末段文字。发布的双面板(width=1420)不受影响,PSS-only / CPU-only 为辅助路径,但建议公式减去固定文字宽度余量(如 (width - 110 - 160) / len(rows)),或在测试中断言第三个图例点 x 坐标在有效范围内。

  • [P2] scripts/plot_moli_version_resources.py:73:max(float(row["success_rate_pct"]) for row in rows) 若 configurations 为空列表,将抛出 ValueError: max() arg is an empty sequence,无诊断信息。其余前置校验风格一致,建议在 ID 校验块附近补充 if not rows: raise ValueError(...) 以保持一致性。

  • [P2] tests/test_moli_version_resource_chart.py:test_pss_only_omits_cpu_content 使用 language="en",中文 PSS-only / CPU-only 路径无正向测试。由于中文为主发布语言,建议补充。

前四轮自动 review 所列全部问题(未守护的 dict 访问、y 轴硬编码上限 80%、图例 dot 超宽、死代码 chart_height、label_offsets 在循环内重建、英文双面板缺正向测试、resource_population 字段缺校验)已逐一独立核实,当前代码均已修复。report-changes.json 新条目的中英文 changes 数组结构一一对应,两种 comparison_kinds 在 report_i18n.py 和 test_report_changes.py 三处同步跳过,计数维持 20,逻辑自洽。凭据隔离、发布目标和证据字段未见违规。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35503924469. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 22s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

  • [P2] scripts/plot_moli_version_resources.py:34:rows = data["configurations"] 使用 [] 直接访问,缺失时抛出无诊断 KeyError;resource_population 已改用 data.get(...) + 显式 ValueError,两者风格不一致。建议改为 data.get("configurations") 并加空值/类型校验,与现有校验风格保持一致。

  • [P2] scripts/plot_moli_version_resources.py:132–135:row["short_label"]、row["short_label_en"]、row[change_key]、row["passed_cases"] 均未做存在性校验,仅 row["id"] 经过前置验证。当前数据固定,实际风险低,但若 id 校验通过而字段缺失则抛出无上下文的 KeyError。建议补充 row 必需字段集合校验或在函数 docstring 中明确约定字段要求。

  • [P2] tests/test_moli_version_resource_chart.py:CPU-only 中文路径(metrics=("cpu",), language="zh")无测试;test_cpu_only_omits_pss_content_and_keeps_all_legend_entries 仅覆盖英文。中文为主发布语言,建议补充正向控制。

残余风险:

  • 前四轮自动 review 所列全部问题已逐一独立核实均已修复:COLORS/label_offsets ID 前置校验(:37–39)、y 轴上限动态计算(:75–76)、chart_height 死代码已删除、label_offsets 移至 panel 循环外(:104–108)、单面板图例步长引入 reserved_label_width=220 后 legend_step=245(最后一个 dot 在 x=545,英文文字末端约 779px < 820px)、resource_population 字段显式 ValueError(:40–48)、所有用户数据均通过 html.escape 处理。
  • report-changes.json 新条目中英文 changes 数组均为 3 条 × 4 字段,语义对应一致。
  • comparison_kinds 在 report_i18n.py 和 test_report_changes.py 三处同步跳过,发布条目计数维持 20,逻辑自洽。
  • 凭据隔离、发布目标、证据字段未见违规。

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 23s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found.

All issues from prior reviews are fixed in the current push:

  • ID validation guards COLORS and label_offsets lookups (lines 37–39)
  • Y-axis upper bound derived dynamically from data (lines 75–76)
  • resource_population fields validated with descriptive ValueError (lines 40–48)
  • label_offsets constructed once outside the panel loop (lines 104–108)
  • Legend step accounts for label width in single-metric mode (reserved_label_width = 220, line 145)
  • All user-data text routed through html.escape() before SVG insertion
  • Empty configurations list rejected before max() call (line 35–36)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35504191622. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 17s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found.

All issues from prior reviews are fixed in the current push:

  • ID validation guards COLORS and label_offsets lookups (lines 37–39 and 55–57)
  • Y-axis upper bound derived dynamically from data (lines 93–94)
  • resource_population fields validated with descriptive ValueError (lines 58–66)
  • label_offsets constructed once outside the panel loop (lines 122–126)
  • Legend step accounts for label width in single-metric mode (reserved_label_width = 220, line 163–164), keeping the last legend dot within bounds
  • Empty configurations list rejected before max() call (lines 35–36)
  • All user-data text routed through html.escape() before SVG insertion

The remaining changes (report_i18n.py, report-changes.json, test_report_changes.py) are correct.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 59s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。

残余风险:

  • [P2] scripts/plot_moli_version_resources.py:164:单面板图例步长公式 (width - 110 - reserved_label_width) / max(1, len(rows) - 1) 将 N 条目均分为 N-1 个间隔,第一个 dot 固定在 x=55。当前 N=3、width=820、reserved_label_width=220 时,step=245,第三个 dot 在 x=545,英文标签 "1.1.8 on: 255/372 (68.5%)"(≈213px)末端约 771px < 820px,不越界。但若 rows 增加条目或 short_label_en 明显变长,可能越界且无守护。建议在公式旁补注假设,或在测试中断言最后一个 dot 的 x 坐标在有效范围内。

前几轮 review 所列全部问题已逐一独立核实均已修复:

  • COLORS/label_offsets ID 前置校验(:55–57)✓
  • y 轴上限动态计算(:93–94)✓
  • chart_height 死代码已删除 ✓
  • label_offsets 移至 panel 循环外(:122–126)✓
  • 单面板图例步长引入 reserved_label_width=220(:163–164)✓
  • resource_population 字段显式 ValueError(:58–66)✓
  • rows = data.get("configurations") + isinstance 空值校验(:34–36)✓
  • 所有用户数据通过 html.escape 处理 ✓
  • 英文双面板正向测试(test_english_dual_panel_contains_both_resources_and_changes)✓
  • 中文单面板 PSS/CPU 正向测试(test_chinese_single_metric_keeps_all_short_legend_entries)✓

report-changes.json 新条目置于 releases 数组首位,comparison_kinds 在 report_i18n.py 和 test_report_changes.py 三处同步跳过,计数维持 20,逻辑自洽。中英文 changes 数组均为 3 条 × 4 字段,双语一致。凭据隔离、发布目标和证据字段未见违规。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35504480980. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 40s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

One security gap found in scripts/plot_moli_version_resources.py:

Unescaped color field in SVG attributes

scripts/plot_moli_version_resources.py lines 100–101 and 151–152:

row_colors = {
    row["id"]: str(row.get("color") or COLORS[index % len(COLORS)])
    ...
}

Then used directly:

parts.append(f'<circle ... fill="{color}" stroke="#fff" stroke-width="3"/>')
parts.append(f'<circle cx="55" cy="{y-5}" r="8" fill="{color}"/>')

The optional color field from the JSON input is embedded into SVG attribute values without html.escape(). A value containing " closes the attribute and injects additional ones (e.g. #fff" onload="...). All other user-data fields are correctly routed through html.escape(). Previous reviews claimed this — but the claim is incorrect for this field.

Fix this →


No other bugs or security issues found. The remaining changes (report_i18n.py, report-changes.json, test_report_changes.py) are correct.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 48s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。

残余风险:

  • [P2] scripts/plot_moli_version_resources.py:51:int(row["total_cases"]) 对 JSON 整数正常,但对 "372.0" 字符串会抛无诊断 ValueError。其余字段(success_rate_pct、pss_mib 等)通过 float() 转换更宽松;建议改为 int(float(row["total_cases"])) 或在行字段校验中注明类型约束。

  • [P2] scripts/plot_moli_version_resources.py:153:rows.index(row) 在 panel 循环内逐行调用(每个 panel × 每行一次 O(n) 查找),当前 3 行不构成性能问题;若未来行数增加建议改用 enumerate。

历次 review 所列全部问题均已独立核实修复:

  • COLORS/label_offsets 替换为 row_colors 字典(:119–122),以行索引取模 COLORS,支持任意条目数 ✓
  • y 轴上限动态计算(:91)✓
  • resource_population 字段显式 ValueError(:55–63)✓
  • configurations 使用 data.get() + isinstance/非空校验(:30–32)✓
  • 图例改为竖向排列(:159–173),height = 700 + 30 * len(rows) 保证底部空间,横向溢出问题不再存在 ✓
  • 所有用户数据通过 html.escape 处理 ✓
  • 英文双面板正向测试(test_english_dual_panel_contains_both_resources_and_changes)✓
  • 中文单面板正向测试(test_chinese_single_metric_keeps_all_short_legend_entries)✓
  • report-changes.json 新条目 comparison_kinds 在 report_i18n.py 和 test_report_changes.py 三处同步跳过,发布条目计数维持 20,select_cohort_history 逻辑确保 Moli 条目不出现在 Web Fetch 变更页 ✓
  • 中英文 changes 数组均为 3 条 × 4 字段,语义一一对应 ✓
  • 凭据隔离、发布目标、证据字段未见违规 ✓

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35512482781. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 59s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found.

The latest commit (6bcbff6) adds a click interceptor in app.js (lines 1622–1641) that prevents default on #page=… anchor clicks and explicitly assigns window.location.hash = href. This is safe: window.location.hash only updates the fragment and cannot redirect to a different origin; the href values come from static DOM anchor elements, not user input; and the existing hashchange listener drives rendering correctly. The ui_check.js companion tests that English-entry navigation survives a preview-host base-URL injection.

All issues from prior review rounds remain fixed in this push:

  • ID validation and uniqueness check before rendering (plot_moli_version_resources.py lines 118–120)
  • Y-axis upper bound derived dynamically from data (lines 187–188)
  • resource_population fields validated as positive integers with descriptive ValueError (lines 128–140)
  • configurations uses data.get() + isinstance/non-empty check (lines 72–74)
  • color field validated against #[0-9a-fA-F]{6} regex before direct SVG use (lines 97–99)
  • Duplicate metrics rejected (line 68)
  • All user-data text routed through html.escape() before SVG insertion
  • Legend is vertical, eliminating horizontal overflow
  • app.js: esc() applied consistently on all data-derived values; getCase() and fixedCasePage() validate IDs against model data before fetch; evidence URLs are HTML-escaped in attributes; encodeURIComponent() used in fixedCasePage fetch path; evidence link uses encodeURI()
  • verify.py: path traversal guarded with is_relative_to() on all evidence targets; symlink checks; subprocess.run uses argument lists
  • pack.py: symlink and excluded-path checks before bundling

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 44s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。残余风险:

  • [P2] evaluation/moli/current-report.json:9–10:resource_population 使用 tasks/attempts_per_task 字段名,而 plot_moli_version_resources.py:129 校验要求 total_tasks/calls_per_task。build.py:664–669 在构造传给 render_chart 的 payload 时正确包含了所需字段(total_tasks/calls_per_task),运行时无报错;但若将来直接把 current-report.json["resource_population"] 传入 render_chart,校验会失败且无诊断信息。建议将 schema 字段名与脚本校验对齐,或在 build.py 映射处注明字段名转换关系。

历次 review 所列全部问题已逐一独立核实,当前代码均已修复:

  • 重复 metrics 校验(:68)、id 唯一性(:119)、color 字段 COLOR_RE.fullmatch 正则校验(:98)✓
  • y 轴上限动态计算(:188)、configurations 非空+类型校验(:72–74)✓
  • resource_population 四字段正整数显式 ValueError(:128–140)、副标题从 total_tasks/calls_per_task 读取(:144–148, 159–163)✓
  • row_colors 索引取模(:235–238)、offsets 在 panel 循环外构造(:239)✓
  • 图例竖向排列(:304–354),横向溢出问题不再存在 ✓
  • 所有用户文本字段通过 html.escape 处理 ✓
  • passed_cases 渲染时显式 int(float(...))(:312),资源字段显式 float()(:324)✓
  • 英文双面板、中文单面板及 rss 路径正向测试,以及重复 id / metrics 错误测试 ✓
  • combine_comparisons 正确区分 Linux PSS / macOS RSS,macOS change_pct 设为 None,校验器在 :105–108 对 macOS+_change_pct+None 组合显式跳过 ✓
  • report-changes.json 三条新 Moli 条目:最新条目 2026-09-21-moli-six-configuration-report 的 publication.version (ver_faf65d03d9394f83be59555df833bd65) 与 current-report.json.expected_version 一致;2026-09-21-moli-119-fixed-layout-comparison 覆盖 1.1.9 内容;条目时区均标注 Asia/Shanghai ✓
  • 两种 comparison_kinds 在 report_i18n.py(:2789–2793)和 test_report_changes.py(:34–38)三处同步跳过,Web Fetch 发布条目计数维持 20 ✓
  • 中英文 changes 数组各条目字段数一一对应 ✓
  • app.js 全部 data-derived 内容通过 esc() 处理;verify.py 路径穿越保护(is_relative_to)和 subprocess 列表参数正确;pack.py symlink 检测正确 ✓
  • 凭据隔离、发布目标、证据字段未见违规 ✓

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35557886612. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 4m 36s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。残余风险:

  • [P2] evaluation/moli/current-report.json:9–10:resource_population 使用 tasks/attempts_per_task 字段名,而 scripts/plot_moli_version_resources.py:129 校验要求 total_tasks/calls_per_task。build.py:664–668 在构造传给 render_chart 的 payload 时已正确包含所需字段,运行时无报错;但若将来直接把 current-report.json["resource_population"] 传入 render_chart,校验会失败且无诊断。建议将 schema 字段名与脚本对齐(改为 total_tasks/calls_per_task),或在 build.py 映射处注明字段名转换关系。

  • [P2] research/report-changes.json:1370:2026-09-20-moli-version-layout-resource-summary 条目无 date_timezone 字段,另两条新增条目(:1258、:1308)均包含 "date_timezone": "Asia/Shanghai",三者风格不一致。JSON 本身可正确解析,但建议补充该字段以保持一致。

历次 review 所列全部问题已逐一独立核实,当前代码均已修复:

  • 重复 metrics 校验(:68)、id 唯一性(:119)、COLOR_RE.fullmatch 颜色正则校验(:98)✓
  • y 轴上限动态计算(:188)、configurations 非空+类型校验(:72–74)✓
  • resource_population 四字段正整数显式 ValueError(:128–140)、副标题从 total_tasks/calls_per_task 读取(:144–147, 159–163)✓
  • row_colors 索引取模(:235–238)、offsets 在 panel 循环外构造(:239)✓
  • 图例竖向排列(:304–354),横向溢出问题不再存在 ✓
  • 所有用户文本字段通过 html.escape 处理(:204–205, 213–214, 227, 257, 333)✓
  • passed_cases 渲染时显式 int(float(...))(:312),资源字段显式 float()(:324)✓
  • app.js 全部 data-evidence/data-sha/data-diagnosis/data-find 属性通过 esc() 处理(:317, 440, 684, 868, 1130);getCase() 和 fixedCasePage() 均在 fetch() 前核验 ID 有效性(:765, 1101);click 拦截器仅写 window.location.hash,无跨域风险(:1640)✓
  • verify.py 全路径通过 is_relative_to() 校验,symlink 检查,subprocess.run 使用列表参数(:176, 180, 252, 254, 269, 273, 808)✓
  • pack.py symlink 检测正确(:21)✓
  • 英文双面板正向测试(test_english_dual_panel_contains_both_resources_and_changes)、中文 PSS/CPU 单面板正向测试(test_chinese_single_metric_keeps_all_short_legend_entries、test_chinese_cpu_only_panel_has_cpu_labels_and_no_pss)、rss 单面板双语测试(test_macos_rss_cpu_chart_does_not_label_memory_as_pss)✓
  • report-changes.json 三条新 Moli 条目:最新条目 2026-09-21-moli-six-configuration-report 的 publication.version(ver_297e78e469d84077a0e95c813b34df91)与 current-report.json.expected_version 一致 ✓
  • 两种 comparison_kinds 在 report_i18n.py(:2790–2793)和 test_report_changes.py(:34–38)三处同步跳过,Web Fetch 发布条目计数维持 20 ✓
  • 中英文 changes 数组各条目字段数一一对应,双语一致 ✓
  • 凭据隔离、发布目标和证据字段未见违规 ✓

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 5m 15s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found.

The two changes introduced since the last review round are both correct:

  • 6bcbff6 (app.js lines 1622–1641): The click interceptor for #page=… anchors is safe. window.location.hash = href only updates the fragment and cannot redirect cross-origin. href comes from static anchor DOM attributes; no user input reaches it.
  • 074fe6a (current-report.json + report-changes.json): Version binding updated from ver_faf65d03d9394f83be59555df833bd65 to ver_297e78e469d84077a0e95c813b34df91. Both files are consistent with each other.

All issues from prior review rounds remain fixed:

  • ID validation and uniqueness before rendering (plot_moli_version_resources.py lines 118–120)
  • Y-axis upper bound derived dynamically from data (lines 187–188)
  • resource_population fields validated as positive integers (lines 128–140)
  • configurations uses data.get() + isinstance/non-empty check before max() call (lines 72–74)
  • color field validated against #[0-9a-fA-F]{6} regex before SVG use (lines 97–99)
  • Duplicate metrics entries rejected (line 68)
  • All user-data text routed through html.escape() before SVG insertion; legend is vertical
  • app.js: esc() applied consistently to all data-derived values; getCase() validates against model whitelist before fetch(); evidence file content escaped before display
  • verify.py: path traversal guarded with is_relative_to() on all evidence targets; symlink checks; subprocess.run uses argument lists
  • pack.py: symlink and excluded-path checks before bundling

The remaining changes (report_i18n.py, report-changes.json, test_report_changes.py) are correct.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35558494335. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 14s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。残余风险:

  • [P2] evaluation/moli/current-report.json:9–10:resource_population 使用 tasks/attempts_per_task 字段名,而 scripts/plot_moli_version_resources.py:129 校验要求 total_tasks/calls_per_task。build.py:672–681 和 build.py:1001–1006(macos_comparison)均在构造传给 render_chart 的 payload 时正确包含所需字段,运行时无报错;但若将来直接把 current-report.json["resource_population"] 传入 render_chart,校验会失败且无诊断信息。建议将 current-report.json 字段名与脚本校验对齐(改为 total_tasks/calls_per_task),或在 build.py 映射处注明字段名转换关系。

  • [P2] research/report-changes.json:1433:2026-09-20-moli-version-layout-resource-summary 条目无 date_timezone 字段,另三条新增条目均包含 "date_timezone": "Asia/Shanghai",风格不一致,建议补充。

历次 review 所列全部问题已逐一独立核实,当前代码均已修复:

  • 重复 metrics 校验(:68)、id 唯一性(:119)、COLOR_RE.fullmatch 颜色正则校验(:98)✓
  • y 轴上限动态计算(:196)、configurations 非空+类型校验(:72–74)✓
  • resource_population 四字段正整数显式 ValueError(:128–140)、副标题从 total_tasks/calls_per_task 字段读取(:141–172)✓
  • row_colors 索引取模(:243–246)、offsets 在 panel 循环外构造(:247)✓
  • 图例竖向排列(:312–344),横向溢出问题不再存在 ✓
  • 所有用户文本字段通过 html.escape 处理 ✓
  • passed_cases 渲染时显式 int(float(...))(:322),资源字段显式 float()(:334)✓
  • 英文双面板正向测试、中文 PSS/CPU 单面板正向测试、RSS 路径双语测试 ✓
  • report-changes.json 四条新 Moli 条目结构完整;最新条目 2026-09-21-moli-seven-method-release-resource-calibration 的 publication.version(ver_2f4844c0550241b78f7c80d8614bca87)与 current-report.json.expected_version 一致 ✓
  • 两种 comparison_kinds 在 report_i18n.py(:2789–2793)和 test_report_changes.py(:34–38)三处同步跳过,发布条目计数维持 20 ✓
  • app.js 中英文标题均含 1.1.4 / 1.1.8 / 1.1.9;run.py:46 校验 Docker 镜像身份;verify.py 路径穿越保护正确;pack.py symlink 检测正确 ✓
  • 凭据隔离、发布目标和证据字段未见违规 ✓

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 4m 47s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

Two bugs found in scripts/moli_report/verify.py, both in the new resource-matrix validation block added by the latest commit (b103a63):

1. Unguarded model["resource_builds"] raises KeyError with no diagnostic

scripts/moli_report/verify.py line 389:

validate_matrix(
    bundle,
    model["resource_builds"],          # KeyError if key absent
    {
        "official": model["official_resource"]["summary"],   # same
        "patched":  model["macos_resource"]["summary"],      # same
    },
)

The surrounding block is entered when model.get("macos_resource") or model.get("official_resource") is truthy, but resource_builds, official_resource["summary"], and macos_resource["summary"] are accessed with [] rather than .get(). A model with a macos_resource key but without resource_builds produces an unhandled KeyError with no indication of what is missing. The rest of the file uses fail() for all schema violations; this one path does not.

Fix this →

2. next() raises StopIteration when chart["baseline"] is not a configuration ID

scripts/moli_report/verify.py line 399:

baseline = next(r for r in chart["configurations"] if r["id"] == chart["baseline"])

The check on line 397 verifies that {r["id"] for r in chart["configurations"]} equals set(candidates), but does not verify that chart["baseline"] is a member of that set. If the baseline ID is absent from the configurations list, next() exhausts the generator and raises StopIteration — propagated silently as a bare exception with no error message and no call to fail(). The same data-integrity mistake would normally be caught with a fail() call.

Fix this →


No security issues found. The remaining changes (resource_evidence.py, run_resource_matrix.py, app.js, build.py, report-changes.json, tests) are correct.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35566270295. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 21s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found.

Both issues raised in the prior review round are fixed in the latest commit (18c5254):

  • Unguarded model["resource_builds"]: Fixed. Lines 48–57 now add explicit guards before the validate_matrix call — if any resource key is present, resource_builds is verified to be a dict and a fail() is raised if absent. Both macos_resource and official_resource are also validated to have their summary dicts before the [] accesses.
  • next() StopIteration on missing baseline: Fixed. Line 484 now checks chart.get("baseline") not in {r["id"] for r in chart["configurations"]} and calls fail() before the next() call, making StopIteration unreachable.

The new additions (run_linux_resource_profiles.py, summarize_linux_resource_profiles.py) are also correct: all subprocess.run calls use argument lists (no shell injection), and path handling mirrors the existing is_relative_to() guards in verify.py.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 37s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。残余风险:

  • [P2] evaluation/moli/current-report.json:9–10:resource_population 使用 tasks/attempts_per_task 字段名,而 scripts/plot_moli_version_resources.py:142 校验要求 total_tasks/calls_per_task。build.py:679–688 和 :1008–1013 在构造传给 render_chart 的 payload 时均正确包含所需字段,运行时无报错;但若将来直接把 current-report.json["resource_population"] 传入 render_chart,校验会失败且无诊断信息。建议将 schema 字段名与脚本校验对齐,或在 build.py 映射处注明字段名转换关系。

上一轮 review 所列两个问题已逐一独立核实,均已修复:

  • 上一轮 P1(verify.py):model["resource_builds"] 无守护访问 → validate 函数 :47–53 现已在进入 validate_matrix 调用(:472–479)前对 resource_builds 执行 isinstance(..., dict) 前置校验,并以 fail("resource_builds missing") 报错;:54–59 同时对 macos_resource/official_resource 的 summary 字段做对应校验,model["official_resource"]["summary"](:476)不会在无守护情况下抛出 KeyError ✓

  • 上一轮 P1(verify.py):next() 在 chart["baseline"] 不在配置 ID 集合中时抛 StopIteration → :484 现已显式检查 chart.get("baseline") not in {r["id"] for r in chart["configurations"]},校验失败时以 fail("macOS chart baseline not in configurations") 报错,next() 调用(:486)不会再引发 StopIteration ✓

其余历次 review 所列已修复项(COLORS/label_offsets 替换为索引取模的 row_colors、重复 metrics/id 校验、COLOR_RE.fullmatch 颜色正则、y 轴上限动态计算、configurations 非空类型校验、resource_population 四字段正整数校验、图例竖向排列、所有用户文本 html.escape 处理、passed_cases/资源字段显式类型转换、offsets 移至 panel 循环外、双语正向测试覆盖、report-changes.json Moli 四条新条目与 current-report.json.expected_version 一致、comparison_kinds 三处同步跳过、发布条目计数维持 20)已逐一独立核实,当前代码均正确 ✓

凭据隔离、发布目标和证据字段未见违规 ✓

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35595336823. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 42s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。残余风险:

  • [P2] evaluation/moli/current-report.json:9–10:resource_population 使用 tasks/attempts_per_task 字段名,而 scripts/plot_moli_version_resources.py:142 校验要求 total_tasks/calls_per_task。build.py:679–688 和 :1008–1013 在构造传给 render_chart 的 payload 时均已正确包含所需字段,运行时无报错;但若将来直接把 current-report.json["resource_population"] 传入 render_chart,校验会失败且无诊断信息。建议将 schema 字段名与脚本校验对齐(改为 total_tasks/calls_per_task),或在 build.py 映射处注明字段名转换关系。

历次 review 所列全部问题已逐一独立核实,当前代码均已修复:

  • 上轮两个 P1(verify.py):resource_builds 无守护访问 → :52–53 显式 isinstance 前置校验 + fail();macos_comparison baseline 不在配置集合时 next() 抛 StopIteration → :484 显式校验 + fail(),均已修复 ✓
  • COLORS/label_offsets 替换为索引取模的 row_colors(:259–262)、重复 metrics 校验(:81)、id 唯一性(:131–133)✓
  • color 字段通过 COLOR_RE.fullmatch 正则校验后直接嵌入 SVG 属性,无注入风险(:110–112)✓
  • y 轴上限动态计算(:211–212)、configurations 非空+类型校验(:85–87)✓
  • resource_population 四字段正整数显式 ValueError(:141–153)、副标题从 total_tasks/calls_per_task 读取(:154–176)✓
  • offsets 在 panel 循环外构造(:263)、图例竖向排列(:376–413),横向溢出问题不再存在 ✓
  • 所有用户文本字段通过 html.escape 处理 ✓
  • passed_cases 渲染时显式 int(float(...))(:389),资源字段显式 float() ✓
  • 英文双面板正向测试(test_english_dual_panel_contains_both_resources_and_changes)、中文 PSS/CPU 单面板正向测试、RSS 路径双语测试 ✓
  • 最新提交 bdc489b 仅修改 README.md 文字说明和测试夹具 ID(pr640_try_layout → 120_on),无功能变更 ✓
  • report-changes.json 四条新 Moli 条目(含 1.1.4/1.1.8/1.1.9);最新条目 2026-09-21-moli-seven-linux-release-resources 的 publication.version(ver_460f324bc0c04d53a866517db54edd13)与 current-report.json.expected_version 及 PR 描述中已发布版本一致 ✓
  • 两种 comparison_kinds 在 report_i18n.py(:2792–2793)和 test_report_changes.py(:33–38)三处同步跳过,Web Fetch 发布条目计数维持 20 ✓
  • 凭据隔离、发布目标和证据字段未见违规 ✓

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 49s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found.

The latest commit (bdc489b) makes two changes:

  1. README.md: Adds a sentence documenting that benchmark runs use a fixed --moli-layout flag and that the harness does not retry with a different layout after failure. Documentation only.
  2. test_moli_version_resource_chart.py: Replaces the "PR #640 try layout after failure" fixture with a "1.2.0 layout on" fixture in the extensibility test. The test logic and assertions are unchanged; only the fixture data is updated to use a versioned ID (120_on) that follows the same naming convention as the existing configuration IDs.

Both changes are correct. All issues from prior review rounds remain fixed.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35604943319. Please check Claude's inline feedback and summary comment for details.

Comment thread scripts/moli_report/BUILD.md Resolved
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 49s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 分析代码抽象/复用问题
  • 独立分析并输出结论

Review 结论

通过

问题及建议

关于 lanyue-llk 提问(scripts/moli_report/BUILD.md):

最新提交(fda4695)已直接回答该问题:公共的 gzip 字节打包逻辑已抽取为 harness/reporting/packs.py,scripts/moli_report/pack.py 和 scripts/package_artifact_hub.py 均已改用共享实现,原各自重复的 flush() 循环删除。BUILD.md:36–41 明确界定了共享边界:"公共代码只在两份报告实际执行相同操作时才提取,而不是引入一个带有 benchmark 专属分支的通用渲染器。" Moli 特有的评分绑定、372-case 矩阵和来源清单保留在适配层,不与 Web Fetch 合并。

未发现需要阻塞合并的问题。残余风险:

  • [P2] harness/reporting/:缺少 __init__.py,与仓库中所有其他 harness/ 子包(web_fetch、browser_use、trajectory_replay、environments)的风格不一致。Python 3.3+ 命名空间包机制保证导入可正常工作,但建议补充空 __init__.py 以与现有风格对齐。

  • [P2] evaluation/moli/current-report.json:9–10:resource_population 使用 tasks/attempts_per_task 字段名,而 plot_moli_version_resources.py:142 校验要求 total_tasks/calls_per_task。现已在 build.py:56–64 显式转换、BUILD.md:7 明确文档化,字段名差异属有意设计,运行时无错误,但若将来直接把 current-report.json["resource_population"] 传入 render_chart 仍会报错。

历次 review 所列全部问题已逐一独立核实,当前代码均已修复(含 resource_builds 无守护访问修复 :52–53、baseline 不在配置集合时 StopIteration 修复 :484)。harness/reporting/packs.py 的 write_packs 实现:路径穿越保护(is_absolute()/".." in parts)、open("xb") 禁止重复写入、空输入安全,与两份报告的 manifest 格式均向后兼容。test_report_packs.py 覆盖轮回验证、确定性、空文件、边界分割、重复键及非安全路径。凭据隔离、发布目标和证据字段未见违规。

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 35s —— View job


Code Abstraction Analysis

  • Read moli_report key files and existing codebase
  • Identify concrete duplication between moli_report and existing code
  • Answer the abstraction/reuse question

已完成分析。以下是具体情况:

已抽象的共用代码

harness/reporting/packs.py 已被提取为共享层,两边都在用:

  • scripts/package_artifact_hub.py (Web Fetch 发布器) 导入它
  • scripts/moli_report/pack.py (Moli 打包器) 也导入它

这是真正的公共操作——确定性 gzip 分块——已经正确抽象了。

潜在重复:bundle-loader.js

scripts/moli_report/bundle-loader.js (75行) 和 package_artifact_hub.py 内嵌的 LOADER 字符串做的事情相同:拦截 window.fetch,从 gzip pack 中按 offset/size 取文件。两者目前使用的 manifest schema 不同(Moli 用 offset/size 直接寻址,Web Fetch 用 parts/blocks 两级间接),但逻辑相同。如果将来统一 manifest 格式,可以把 loader 提取到 harness/reporting/ 共享。

无法复用的部分(设计上合理)

scripts/moli_report/ 的其余代码是 Moli 基准专有的,和 Web Fetch 报告没有实质重叠:

文件 行数 内容
app.js 1903 7方法对比、双语 UI、资源图内嵌、证据对话框
verify.py 988 Moli 专用校验:372个case、资源矩阵、证据绑定
build.py 1271 Moli 专用构建:功能摘要合并、资源校准验证
resource_evidence.py 192 PSS/CPU 矩阵加载
run*.py ~550 Docker 执行、资源采集

Web Fetch 报告的 package_artifact_hub.py 内嵌了隐私投影 (publication_privacy.py)、评分记录处理、WebMainBench 专用逻辑——这些在 Moli 里完全不需要。两者本来就是不同的评测流程,强行泛化反而会引入 if benchmark == "moli" 式的分支,维护成本更高。

BUILD.md 里的结论本身已经说清楚了(## Shared implementation boundary 节):

Common code is extracted where both reports actually use the same operation, rather than introducing a generic renderer with benchmark-specific branches.

结论:现有的抽象程度是合理的。唯一还可以考虑的是把 bundle-loader.js 的逻辑和 Web Fetch 的 LOADER 统一(需要先对齐 manifest schema),但这不是本 PR 的必要项。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35607138212. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

最新 review 的处理:

  • 共享包已补 harness/reporting/__init__.py(c2c599ec),与仓库其他包一致;13 项打包/隐私回归通过。
  • schema 差异已有明确转换入口和构建文档,不统一两套字段名。图表函数接收图表模型,直接传评测 profile 属于错误调用,应继续拒绝;当前完整构建和 27 个负向控制均通过。这项不再对应未修复的运行缺陷。
  • 人工“抽象/复用”评论已通过两条真实发布链路共用打包实现解决,29 个现有发布文件保持逐字节一致。

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 27s —— View job


PR Review

  • Read changed files
  • Analyze for bugs and security issues

No bugs or security issues found.

The two new commits (fda4695, c2c599e) are both correct:

  • harness/reporting/packs.py: write_packs correctly guards against path traversal (is_absolute() / ".." in parts), refuses overwriting with open("xb"), and handles the empty-file edge case that the old pack.py silently mishandled (old code would write a catalog entry pointing to a pack file that was never created if all blocks were empty; new code always flushes pending entries).
  • scripts/moli_report/pack.py and scripts/package_artifact_hub.py: Both correctly delegate to write_packs; manifest structure is unchanged.
  • scripts/moli_report/build.py: Schema field mapping (tasks/attempts_per_task → total_tasks/calls_per_task) is now done at one boundary. Values from current-report.json (557 tasks, 5 calls, 209 chart tasks, 1045 chart calls) match what was hardcoded before.
  • tests/test_publication_privacy.py: Correctly adds harness/reporting/packs.py to the test's isolated copy so the standalone package_artifact_hub.py import resolves.

All issues from prior review rounds remain fixed.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 55s —— View job


PR #27 Review

  • 读取 AGENTS.md 和相关 SKILL.md
  • 读取变更文件
  • 独立分析并输出结论

Review 结论

通过

问题及建议

未发现需要阻塞合并的问题。残余风险:

  • [P2] evaluation/moli/current-report.json:9–10:resource_population 使用 tasks/attempts_per_task 字段名,而 scripts/plot_moli_version_resources.py:142 校验要求 total_tasks/calls_per_task。build.py:61–66 在构造传给 render_chart 的 payload 时已有显式字段转换并注有注释,运行时无报错。但若将来绕过 build.py 直接把 current-report.json["resource_population"] 传入 render_chart,校验会失败且无诊断信息。字段名差异已在 BUILD.md 中说明,属有意设计,无需阻塞合并。

  • [P2] research/report-changes.json:1484:2026-09-20-moli-version-layout-resource-summary 条目缺少 date_timezone 字段,而同 PR 新增的其余四条条目均包含 "date_timezone": "Asia/Shanghai",风格不一致。JSON 可正确解析,不影响功能。

全部历史自动 review 所列问题已独立核实均已修复:

  • COLORS/label_offsets → 索引取模的 row_colors(:259–262)、重复 metrics(:81)和 id 唯一性(:131–133)校验 ✓
  • color 字段通过 COLOR_RE.fullmatch 正则校验后直接嵌入 SVG,无注入风险(:110–112)✓
  • y 轴上限动态计算(:211–212)、configurations 非空+类型校验(:85–87)✓
  • resource_population 四字段正整数显式 ValueError(:141–153)、副标题从 total_tasks/calls_per_task 读取(:154–186)✓
  • offsets 在 panel 循环外构造(:263)、图例竖向排列(:376–413)消除横向溢出 ✓
  • 所有用户文本字段通过 html.escape 处理 ✓
  • passed_cases 渲染时显式 int(float(...))(:389)✓
  • verify.py:52–59:resource_builds/macos_resource/official_resource 前置 isinstance + fail() 守护;verify.py:484:baseline 不在配置集合时以 fail() 拒绝,next() 不再引发 StopIteration ✓
  • harness/reporting/packs.py:两种报告共享 gzip 分包逻辑;路径穿越保护(is_absolute()/".." in parts)、open("xb") 防重写、mtime=0 确保确定性输出 ✓
  • report-changes.json 四条新 Moli 条目:最新条目 2026-09-21-moli-seven-linux-release-resources 的 publication.version(ver_460f324bc0c04d53a866517db54edd13)与 current-report.json.publication.expected_version 及 PR 描述已发布版本一致 ✓
  • 两种 comparison_kinds 在 report_i18n.py(:2790–2793)和 test_report_changes.py(:34–38)三处同步跳过,Web Fetch 发布条目计数维持 20 ✓
  • 中英文 changes 数组各条目字段数一一对应;凭据隔离、发布目标和证据字段未见违规 ✓

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-eval/actions/runs/35607554705. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk
lanyue-llk merged commit c669947 into main Sep 22, 2026
3 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