Skip to content

修复 Web Fetch 评测公平性、标注范围与报告结论 - #4

Merged
lanyue-llk merged 9 commits into
mainfrom
codex/fix-webfetch-evaluation-fairness
Sep 4, 2026
Merged

lanyue-llk merged 9 commits into
mainfrom
codex/fix-webfetch-evaluation-fairness

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

修复范围

统一评测、参考、成绩和报告口径,并完成十二种方法的真实文件补测。

  • 端到端计时涵盖下载、服务端处理、本地解析、文件读取和统一输入转换;超时交付不通过,不能取消的调用隔离。
  • 实时评测、离线重评和报告共用评分入口;取消提供商专属评分/状态改写,保留原始输出。
  • 修正 CSS/Django 参考正文边界、110 项正文覆盖契约、React 分期/配送字段验收;任务通过和全文 F1 独立。
  • 文件任务使用原生输出:Moli 用 --dump html 原样返回字节;Crawl4AI 在调用前选择库自带的 AsyncHTTPCrawlerStrategy,把 downloaded_files 传入统一验收。文件路径不启动无用浏览器,也不先试浏览器再兜底;正文仍用原浏览器路径。
  • 托管接口的文件调用保留完整 JSON 响应;JSONL 转义 Unicode 分行字符,避免损坏下游读取。
  • 报告覆盖列改为“已判分/已调用”“已执行/总案例”;新增折叠式变更记录。首次纠正统计按输入哈希绑定,不因后续修订改变统计对象。

本次文件补测结果

  • 2026-09-04 首轮 36 次、适配修正后 6 次、Crawl4AI 原生 HTTP 文件路径验证 3 次、去除该路径无用浏览器启动后重测 3 次,共 48 次真实调用。
  • 当前视图按最终配置选取 36 次,不按最好分数或最快耗时挑选:Moli 与 Crawl4AI 各三次通过,合计 6 通过、30 未通过、文件缺测为 0。此前的 3/33 结论遗漏了 Crawl4AI 原生 HTTP 文件路径,已在报告版本记录中明确纠正。
  • 失败包含类型拒绝、仅交付文本/地址、抓取错误与 45 秒超时;无认证失败。结论仅针对本轮接口、配置、样本和预算,不扩大为产品全能力判断。
  • 图片、视频组都为 10/10 可判分;Moli、Crawl4AI 通过数各分别增加 1、2,其他方法通过数不增,但分母补齐。
  • 独立 HTTP 三项对照仍单独保留,不进入提供商排名。

数据与可追溯性

  • 仍保留 150 个任务;当前视图 1,800 条调用,其中 36 条文件调用来自新补测。其余 1,764 条记录完全不变。
  • 历史 36 条文件记录及原始输出保存在 evaluation/history/file-baseline/;新旧运行 ID、哈希和选取规则在 evaluation/file-rerun-selection.json。
  • 48 次补测的原始记录、清单和输出在 research/file-provider-rerun*/;6 项成功调用保存实际文件字节并匹配独立目标 SHA-256。
  • 首次离线修订的 92 条判定变化、历史缺测纠正和前后分数仍由 evaluation/scoring-revisions.json 留痕,不改写历史耗时。
  • 文件补测与旧网页调用并非同时进行;新增正文契约是公开的协议修订,不冒充采集前预注册。

验证

  • Python:471 项,460 通过、11 跳过;文件 worker 3 项复验通过。成功、失败、未测、超时的文件说明分别验证。
  • JavaScript UI、加载器测试通过。
  • 150 任务 / 1,800 选定调用 / 12 方法 / 1,973 HTML 页面完整性通过;0 断链。
  • 新旧调用、输出哈希和六项文件哈希校验通过;新证据未包含配置中的凭据值。
  • 发布包:4,468 个原始文件、61 个物理文件;下载字节一致、虚拟链接有效。变更明细折叠及桌面排版已检查。

报告

更新原站点,不另建分享地址:报告 · 变更记录。

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

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


PR Review

  • Read PR diff for bugs and security issues
  • Analyze key changed files
  • Post findings

Bug 1 — answer_input() return value discarded (no-op call)

call_boundary.py:13:

answer_input(result.content.encode('utf-8', errors='replace'), result.metadata,
             ok=result.ok, status_code=result.status_code)

answer_input does not mutate its arguments — it returns (text, links, ok, basis). The return value is discarded, so this call does nothing. The comment claims this puts the conversion "inside the measured call," but no conversion is actually recorded. The real normalization happens in score_attempt → scoring.py, which calls answer_input a second time with the persisted artifact bytes. The call in prepare_answer is dead code and should either be removed or its return value stored and forwarded via ProviderResult.

Fix this →


Bug 2 — Moli _active_process TOCTOU: cancel can miss a newly launched process

moli.py:

process = subprocess.Popen(...)          # process is running
self._active_process = process           # assigned ~1µs later

cancel() reads getattr(self, '_active_process', None) without a lock. If cancel() is called in the window between Popen() and the attribute assignment, it retrieves the previous value (None on the first call, or a prior finished process), and the new subprocess escapes cancellation and continues consuming resources.

The window is tiny (sub-millisecond) and cancel() is only called after a multi-second timeout, so this is low-probability in practice. The fix is to set self._active_process = None before calling Popen and assign the live process only after the attribute is initialized, or protect the assignment and read with a lock.

Fix this →


No other bugs or security issues found. The safe_named_links URL filtering, the task_measured exclusion from the pass-rate denominator, the binary-hash TOCTOU in Moli validate/fetch (audit trail, not enforcement), and the rescore_evaluation deadline preservation all look correct for their stated purposes.

@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/33766670110. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

已逐条复核本次 review,两个问题均已修复,并纠正其中不准确的解释/建议:

  1. 丢弃 answer_input() 返回值:调用确实发生、转换成本已在计时内,因此不是“完全没有做转换”;但丢弃结果后又转换一次是不必要的。现在 ProviderResult.prepared_answer 保存计时内的统一输入,runner 直接交给 score_attempt;离线重评仍用同一个转换函数。回归测试验证 live 路径只转换一次,且与 offline 结果一致。
  2. Moli 启动/取消竞态:风险成立,但在 Popen 前赋值 None 不会消除窗口。现在用锁保护取消标记和句柄登记,取消请求会被记住;即使 Popen 此时尚未返回,启动线程登记句柄后也立即终止子进程。锁不包住 Popen,避免进程启动拖住截止线程。测试在真实子进程启动后、句柄登记前确定性调用 cancel,确认子进程终止。

此外,真实文件验证发现并修复了相对输出目录导致二进制证据路径计算失败的问题。已完成 3 次独立 HTTP 文件下载(PNG/WebM/MP4),均匹配原有独立目标哈希,证据与配置单独保存在 research/file-delivery-check/。

范围说明:这 3 次对照不是十二种方法的 36 次补测。现有参评适配器尚未提供文件字节输出,当前环境也缺少托管服务凭据或本地运行配置;36 条历史记录仍为未测,不能记成已补齐。evaluation/ 本轮没有变化,历史输出、耗时和排名保留。

报告新增“变更记录”页,将“验收覆盖/案例覆盖”改为“已判分/已调用”和“已执行/总案例”,在榜单旁解释缺测,并用折叠明细记录前次及本次变更、成绩影响与补测边界。后续实质修订需维护变更记录的要求已写入 AGENTS.md。

验证:完整回归 461 项(450 通过、11 跳过);JS 交互/加载器测试通过;报告 1,973 HTML 页面完整性、表格及链接检查通过(0 断链),桌面及 390px 窄屏预览已检查。

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

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


PR Review

  • Read PR diff for bugs and security issues
  • Analyze key changed files
  • Post findings

Both prior bugs are fixed in this revision.

Bug 1 (answer_input return discarded): prepare_answer now stores the result in result.prepared_answer (models.py:53), and runner.py:181 forwards it to score_attempt via prepared_answer=result.prepared_answer. Fixed.

Bug 2 (Moli _active_process TOCTOU): moli.py now guards both the assignment and the cancel() read under self._process_lock (moli.py:120–123, moli.py:206–208). The begin_call() initializer (moli.py:28–31) clears state before each call under the same lock. Fixed.


New Bug — report_changes.py:23 reads the first revision, not the latest

for row in json.loads(revision.read_text())[0]['records']:

revise_fairness.py appends new revisions to the end of the array (history.append(receipt), line 55). After the first run, [0] is correct because there is only one entry. But on any subsequent run with a different baseline, a second entry is appended and [0] permanently shows the oldest revision's per-provider deltas, silently ignoring the current one. The correct index is [-1].

Fix this →


No other bugs or security issues found. The safe_named_links URL filtering, file MIME/hash checks in call_boundary.py, the task_measured exclusion from the pass-rate denominator, and the claimed_shipping set preventing cross-product field borrowing all 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/33837557296. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

文件补测已完成,代码与证据见 e1648ac。

此前仅完成 HTTP 对照,确实不足以关闭 36 项缺测。现已通过十二种实际接口执行首轮 36 次;发现并修复 Moli 固定 Markdown 模式、Crawl4AI 下载未开启及文件未传回后,再测 6 次。当前按适配修正后的配置选入 36 次:Moli 三项文件字节与独立 SHA-256 一致,其余 33 项本轮未通过,0 缺测。没有把额外 HTTP 下载算给任一方法,也没有把历史未测直接补零。

原 36 条调用单独保留;其他 1,764 条记录逐字段不变。新增完整 API 响应、真实二进制输出、清单、时间及新旧运行 ID 对应。修复运行与报告 JSONL 的 Unicode 分行字符转义,解码后的测量值不变。

最新 review 关于 report_changes.py[0] 的意见已独立复核:指出位置索引缺少版本绑定是合理的,但改成 [-1] 会让“首次纠正”表显示后续修订,改变语义。现在按首次修订输入 SHA-256 精确匹配;追加、重排和找不到修订均有测试。

验证:465 项 Python 测试(454 通过、11 跳过);JS UI/加载器通过;1,973 页完整性、布局与链接检查通过(0 断链);原始证据哈希、旧记录保留和新证据凭据扫描通过。

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

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


PR Review

  • Read PR diff for bugs and security issues
  • Analyze key changed files
  • Post findings

All three prior bugs are fixed in this revision.

Bug 3 (report_changes.py [0]): Rather than changing to [-1], the fix replaces positional indexing entirely with first_correction(), which looks up the specific revision by its SHA-256 input digest (research/report-changes.json → scoring_revision_input_sha256). This is more robust than [-1] because it remains correct regardless of append order. Fixed.


No new bugs or security issues found.

Specific areas checked:

  • call_boundary.py: prepare_answer correctly stores answer_input() result in result.prepared_answer; runner.py:181 forwards it to score_attempt. File MIME/hash validation logic is sound.
  • moli.py: Cancel race is properly handled — _process_lock guards both _cancel_requested and _active_process. The kill-on-registration path (lines 121–124) correctly handles the window between Popen and lock acquisition.
  • report_changes.py:first_correction(): Digest binding is validated; ValueError is raised if the count ≠ 1. Only StopIteration is unguarded if the hardcoded release ID is missing from the JSON, but that ID is present in the committed data file.
  • subprocess_jsonl.py: New base64 file decode block uses validate=True; size-limit check is present. Errors propagate correctly through the exception chain.
  • body_coverage.py: Region tokens are constructed from pre-tokenized words joined with spaces, so region['text'].split() recovers the same tokens — no CJK tokenization inconsistency.
  • scoring.py / metrics.py / runner.py: task_measured correctly excludes unmeasured file tasks from the denominator; score_attempt falls back to answer_input for offline/exception callers when prepared_answer is None.

@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/33841288010. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

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


PR Review

  • Read PR diff for bugs and security issues
  • Analyze key changed files
  • Post findings

All three prior bugs are fixed in this revision.

Bug 1 (answer_input return discarded): Fixed — prepare_answer stores the result in result.prepared_answer and runner.py forwards it to score_attempt via prepared_answer=result.prepared_answer.

Bug 2 (Moli _active_process TOCTOU): Fixed — _process_lock guards _cancel_requested and _active_process; begin_call() resets state before each call.

Bug 3 (report_changes.py [0]): Fixed — replaced positional indexing with first_correction(), which binds by input_results_sha256 from research/report-changes.json.


No new bugs or security issues found.

Specific areas checked in this revision:

  • call_boundary.py: fetch_with_deadline timeout logic is correct — the double-check (completed - begin > timeout) catches late arrivals that squeezed through queue.get. prepare_answer correctly populates result.metadata['file_evaluation'] and result.prepared_answer in the same pass. MIME detection (PNG/WebM/MP4 magic bytes) is correct.
  • subprocess_jsonl.py: New cancel() reads self._process without a lock, but the subprocess is long-lived and created long before any timeout could fire — the TOCTOU window is negligible in practice. base64.b64decode(validate=True) and size-limit check look correct.
  • runner.py: output_dir.resolve() at entry ensures binary.relative_to(output_dir) never raises. The index correspondence between result.files and result.metadata['file_evaluation']['files'] is guaranteed because both are produced by prepare_answer from the same source list. The quarantine return exits work_for_provider for that provider only, leaving other workers unaffected.
  • stable_tasks.py / field_minimum_records: Validation rejects keys outside _LABELS, non-integer or non-positive values. The claimed_shipping set correctly prevents cross-product field borrowing and i > 0 guards lines[i-1].
  • body_coverage.py: region['text'].split() correctly recovers the same tokens as tokens(reference) since regions are built with ' '.join(words[...]). Empty-region guard is present.
  • apply_request_status: Idempotent via setdefault — safe to call from both live and offline paths.
  • response_input.py / safe_named_links: URL scheme and credential checks look correct. answer_input envelope detection is field-based, not provider-name-based.
  • revise_fairness.py: zip(..., strict=True) correctly asserts before/after have the same length.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

补充纠正前一条回复中的文件结论,见 d996ebf:最终为 6 通过、30 未通过、0 缺测,而非 3/33。

继续核查发现 Crawl4AI 不只有浏览器路径,还提供原生 AsyncHTTPCrawlerStrategy 文件下载接口。浏览器下载配置仍失败不能代表整个库;我此前遗漏了这条路径。

现在文件任务在调用前选择原生 HTTP 策略,读取它返回的 downloaded_files;没有外加 requests 下载,也不是浏览器失败后的隐藏兜底。去除了文件路径无用的 Chrome 启动并重新测量,三个文件均匹配原有独立目标哈希。正文任务仍保留原浏览器路径及历史结果。

累计执行 48 次,按最终配置选入 36 次;Moli 与 Crawl4AI 各三次通过。全部中间调用保留,最新运行 ID 与选择依据明确登记,不取最快耗时或历史最高分。报告新增本次版本纠正记录,旧 3/33 发布结论也保留为历史说明。

验证:468 项 Python 测试(457 通过、11 跳过),原生文件 worker 3 项复验通过;JS UI/加载器通过;1,973 页完整性及链接检查通过(0 断链);其他 1,764 条记录完全不变,原 36 条记录及证据完整归档。前次自动 review 已确认此前三个问题修复且未发现新问题。

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

PR Review

  • Read latest commit diff
  • Analyze changed files for bugs and security issues
  • Post findings

No new bugs or security issues found in this revision (c2a4243).

The commit makes four small changes:

  • report.py:448 — Adds a file byte evidence table to attempt pages when provider_metadata.file_evaluation.files is present. The link() call routes through safe_href() + esc() (correct HTML escaping). f['artifact_path'], f['bytes'], and f['sha256'] use direct dict access while f.get('mime') and f.get('pass') use .get(). This inconsistency would raise KeyError on a malformed files entry, but check_report.py validates these fields are present in the committed data, so no practical risk.
  • report_capabilities.py — String-only updates to capability descriptions; no functional change.
  • research/report-changes.json — Adds a changelog entry; no functional code.
  • scripts/check_report.py:67 — New assertion that artifact path and SHA-256 appear in the rendered HTML; uses the same direct dict access pattern, consistent with the generator.

All three previously identified bugs remain fixed. No regressions observed.

View job run

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 6m 0s —— View job


PR Review

  • Read PR diff for bugs and security issues
  • Analyze key changed files
  • Post findings

All three prior bugs are fixed in this revision.

Bug 1 (answer_input return discarded): Fixed — prepare_answer stores result in result.prepared_answer; runner.py forwards it to score_attempt.

Bug 2 (Moli _active_process TOCTOU): Fixed — _process_lock guards _cancel_requested and _active_process; begin_call() resets state before each call.

Bug 3 (report_changes.py [0]): Fixed — replaced positional indexing with first_correction(), which binds by input_results_sha256 digest.


No new bugs or security issues found.

Specific areas checked in this revision:

  • report.py ranking changes: measured() filtering is correctly applied before computing n (denominator) and passed. rate(0, 0) safely returns '—'. rows[6] and rows[7] index assignments are valid — the list is initialized with 8 elements. The new matched_latency() uses set.intersection(*scopes) correctly (non-empty guard present).
  • crawl4ai_worker.py: encode_downloads path-traversal check resolves symlinks before is_relative_to, correctly blocking escape paths. TOCTOU between stat and read is negligible (temp dir, and subprocess_jsonl.py re-checks size on receipt). ensure_ascii=False in the existing stdout path is fine — Python's line iteration does not split on U+2028/U+2029, so IPC is unaffected; the ensure_ascii=True fix in runner.py targets on-disk JSONL only.
  • call_boundary.py: output.get(timeout=max(0, ...)) edge case (timeout already elapsed) correctly falls into queue.Empty, triggers cancel, and avoids quarantine since pending.is_alive() is False for a finished worker.
  • runner.py: attempt_id is defined at line 149 before the quarantine return at line 238. Binary artifact path stays within output_dir because artifact.with_name(...) preserves the parent directory already validated by contained_path.
  • revise_fairness.py: splitlines() (not split('\n')) correctly skips trailing newlines. Nested values() function correctly applies task_passed (new logic including deadline_overrun) for the "after" records.
  • body_coverage.py: Empty-region guard raises ValueError. tokens() re-tokenization matches region['text'].split() because regions are built with ' '.join(words[...]).

@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/33842545971. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

最终报告已更新原站点并完成线上校验:版本 ver_73fe7c8ad762476e81920a42cc099a17,对应最新提交 c610389。

  • 当前文件结果:36 项均已判分,6 通过、30 未通过、0 缺测;累计 48 次调用及全部中间证据保留。
  • 60 个非入口物理文件与发布包逐字节一致;数据集、结果、解读文章一致,六份成功交付文件的 SHA-256 均已在线核对。
  • 成功调用页提供原文件下载入口,修正了成功文件仍显示“没有返回文件”的旧说明;文本输出与文件字节分开展示。
  • 最终回归 471 项(460 通过、11 跳过),JS 测试及 1,973 页完整性/链接检查通过,0 断链。

报告及变更记录

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

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


PR Review

  • Read PR diff for bugs and security issues
  • Analyze key changed files
  • Post findings

All three prior bugs remain fixed in this revision.

Bug 1 (answer_input return discarded): Fixed.
Bug 2 (Moli _active_process TOCTOU): Fixed.
Bug 3 (report_changes.py [0]): Fixed.


No new bugs or security issues found.

Specific areas checked in this revision (c8cce27):

  • reliability.py: assess_reliability builds extra/duplicates from Counter keys that use .get() and could theoretically contain None if records are malformed. sorted() on tuples mixing None and str raises TypeError in Python 3. In practice, records from the published JSONL always carry both provider and case_id, so this path can't be triggered with current data. No action needed for this codebase, but worth noting if the function is reused.
  • runner.py:276: manifest["unexecuted"] truthiness check is correct — the list is initialized as [] and appended to only when a quarantined provider can't be cancelled. IncompleteEvaluationError is raised after summary.json is written, so evidence is retained at output_dir as the message states. The concurrency test correctly verifies this via assertRaisesRegex.
  • report.py:136: _RELIABILITY_BANNER is a module-level global set in generate() and read in write(). Single-threaded report generation calls generate() before any write(), so there's no stale-state risk in the production path. The write() unit tests that call it independently use '' which is the module-level default.
  • report_changes.py:73: first_correction() is called with its return value discarded — intentional validation call. If the revision can't be found, it raises ValueError with a clear message; the table that previously consumed the return value was removed, so there's nothing to forward. Not a bug.
  • report_changes.py:11: next(...) without a default still raises StopIteration if the hardcoded release ID 2026-09-03-fairness-correction is absent from the JSON. The committed data file contains that ID, so no practical risk.
  • package_artifact_hub.py: Guard at top of build() reads reliability.json and asserts complete is True before packaging. Correctly gates publication. check_report.py independently calls require_reliable() and verifies the saved reliability.json matches the live computation.
  • report_build.py: assess_reliability is called once to write reliability.json, and again inside generate() (via report.py). Two calls with the same data — minor redundancy, not a bug.

Comment thread evaluation/scoring-revisions.json Resolved

@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/33846817677. Please check Claude's inline feedback and summary comment for details.

Comment thread research/report-changes.json Resolved
@lanyue-llk

Copy link
Copy Markdown
Contributor Author

已完成本轮报告结构、耗时口径和完整性门槛修订,提交 c8cce27,并更新原 Artifact Hub 站点。

  • 首页将六类任务概览前置,明确列出每类最高任务通过率及全部并列最高分方法。
  • 删除“已执行/总案例”,将另一列改为“判分完整性 = 已明确判定数 / 计划调用数”,避免缺调用时出现误导性的 8/8。
  • 新增完整性状态:每个计划 provider × case 必须恰有一个当前结果且可判定;缺失、重复或未判分会全局高亮“报告不可靠”。运行器对半途隔离以错误退出,报告校验与 Artifact Hub 打包均拒绝不完整数据。当前为 1,800/1,800。
  • 评测方法页明确耗时边界:计入 SDK/CLI/HTTP、远端处理、下载、浏览器渲染、正文提取、本地解析、统一输入转换以及文件读取/格式识别/SHA-256;不计数据集与参考加载、配置校验、限速等待、答案形成后的落盘、评分与报告生成。排名使用客户端端到端耗时,不使用供应商自报服务端耗时。
  • 版本页合并同日微小修订,改成当前版本、结果影响、折叠证据和折叠历史;删除面向执行者的过程性说明。

PR 评论复核:此前三个有效问题(答案转换结果丢弃、Moli 取消竞态、修订记录按位置绑定)均已修复;把首次修订直接改成 [-1] 的具体建议不正确,现有按输入 SHA-256 绑定更符合语义。最新自动审查确认无新 bug 或安全问题;其中关于畸形记录可能含 None、固定 release ID 缺失时抛异常的两点不适用于已通过 schema/ID 校验的正式路径,不需要增加重复容错。

验证:473 项 Python 测试通过(11 跳过);JS UI/loader 通过;1,973 页完整性和链接检查通过,0 断链;两组 CI 与自动 review 全部通过。线上版本 ver_69bede8bffdd47ba88f6b1b95c6fa00b,60 个非入口物理文件与发布包一致,数据集、结果、解读文章及 6 份成功文件字节均通过线上校验。

报告 · 版本说明

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

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


PR Review

  • Read PR diff for bugs and security issues
  • Analyze latest commit changes
  • Post findings

All three prior bugs remain fixed in this revision.

Bug 1 (answer_input return discarded): Fixed.
Bug 2 (Moli _active_process TOCTOU): Fixed.
Bug 3 (report_changes.py [0]): Fixed.


New Bug — report_build.py:130 unguarded copytree of history/file-baseline

if (source/'file-rerun-selection.json').is_file():
    shutil.copy2(source/'file-rerun-selection.json', staging/'file-rerun-selection.json')
    shutil.copytree(source/'history/file-baseline', staging/'history/file-baseline')  # line 130

The guard on line 128 checks only for file-rerun-selection.json. The subsequent shutil.copytree on line 130 is called unconditionally whenever that file exists. If history/file-baseline is absent from the evidence directory (e.g., when running against a restored evidence bundle that includes the selection JSON but not the historical baseline), this raises FileNotFoundError instead of building the report without that optional historical data. The fix is to add an existence check: if (source/'history/file-baseline').is_dir(): shutil.copytree(...).

Fix this →


No other bugs or security issues found in this revision.

Specific areas checked in e44d023:

  • storage.py: Path helpers read from env vars only — no injection risk. require_canonical_inputs handles missing/file/dir correctly: rglob("*") on a non-existent path yields nothing, so expected_files={} matches actual_files={} only if both are absent. If expected is absent but actual exists, mismatch is detected correctly.
  • report_changes.py:47: shutil.copytree(evidence_root/name, out/name) uses names from a hardcoded list — no path injection. The four-directory loop is inside if selection.exists() (line 39), which checks for the already-copied selection JSON in out/; if any of the four source directories are missing at evidence_root, this fails loudly, which is correct behavior (evidence must be present).
  • cowagent.py: data_home()/"runs/cowagent-workspace" — the Path division operator never issues shell calls; no injection risk.
  • runner.py:237–242: Quarantine path writes to manifest['unexecuted'] under result_lock — thread-safe. The return exits run_provider only for the quarantined provider, leaving other workers unaffected. expected_attempts check at line 275 correctly catches the shortfall.
  • build_report.py: require_evidence validates the four required entries before build_report proceeds, so the execution.json read at line 64 is safe.

@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/33848943880. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

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


PR Review

  • Read PR diff for bugs and security issues
  • Analyze key changed files
  • Post findings

Prior Bug 4 (report_build.py:130 unguarded copytree) is fixed in this revision (6f3229c).

Rather than adding a silent is_dir() guard at the call site, the fix adds require_selection_history() in storage.py, which validates that all three required baseline files (results.jsonl, execution.json, artifacts) exist whenever file-rerun-selection.json is present. This validation is called from both require_evidence() and build_report() (line 39) — well before the copytree at line 132. If the baseline is incomplete, a ValueError with a clear message is raised early. Fixed.


No new bugs or security issues found.

Areas checked in 6f3229c:

  • storage.py:require_selection_history: Early-return when selection JSON is absent is correct. path.exists() correctly handles artifacts being a directory. relative_to(evidence) in the missing-list message is safe — all three required paths are constructed as baseline / ... where baseline is evidence / "history/file-baseline", so they are always under evidence.
  • report_build.py:39: require_selection_history(source) is called after source = source.resolve() and before the staging temp dir is created — correct ordering.
  • tests/test_storage.py: Covers missing baseline (raises ValueError) and complete baseline (passes). The no-selection-file path is implicitly covered by the early return and not tested, but the logic is trivially correct.
  • Double-call: require_selection_history is called by both require_evidence() and build_report(). It is a pure validation with no side effects, so calling it twice is harmless.

@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/33849513982. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk
lanyue-llk merged commit 4d59751 into main Sep 4, 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