Skip to content

Harden Web Fetch report rebuild and review - #7

Merged
lanyue-llk merged 13 commits into
mainfrom
codex/harden-webfetch-report
Sep 10, 2026
Merged

lanyue-llk merged 13 commits into
mainfrom
codex/harden-webfetch-report

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

结果

  • 固化当前 150 题 × 7 方法 × 1 次的精确报告配置,默认重建不得退回旧证据或错误站点。
  • 修正 Moli 直接文档/媒体路线:使用自动产物,不再错误追加 --dump html;同步三个已测版本与方法说明。
  • 将核验页收敛为五轮记录:范围、发现、纠正、未完成;保留总体覆盖、分歧、裁定和未决数,不提供多余下载。
  • 加强独立核验、评分修订链和组装证据绑定;组装采用事务式目录替换,失败不污染当前证据。
  • 新增通用 benchmark-report skill,覆盖评测设计、公平接口、证据链、独立核验、选择性重跑、正式报告与发布门禁;根 AGENTS.md 已接入。
  • 迁移到新的 Sites 服务并绑定独立站点 UUAhhQMnrGwm;发布脚本不再加载仓库评测 .env,并对大文件分段上传增加幂等重试。旧站点 bWkRP157EtF6 和原报告 UeZE1vfcEOrM 均未覆盖。

验证

  • Python:586 passed,38 skipped
  • browser_use:66 passed,2 skipped
  • JavaScript 报告 UI/loader:通过
  • 报告:150 tasks / 1050 records / 7 providers,1218 HTML pages,0 broken links
  • 独立核验:主结果 1050/1050,同窗测速 140/140,未决 0
  • 发布包:84 个文件、77,094,933 bytes;远端导出与本地归档逐字节一致
  • 匿名分享和浏览器视觉检查:通过

报告:https://artifact-hub.app.lexmount.com/v/m2r8O7gU7AD3mgdQ-d2zpndVGmbJB8q0

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review PR diff for bugs and security issues
  • Post findings

No critical bugs or security issues found.

A few observations worth noting:

scripts/publish_artifact_hub.py line 35 — dead branch

After the new guard on lines 30–31 (if not receipt.exists(): raise ValueError(...)), receipt.exists() is guaranteed True for the rest of the script. The condition on line 35:

if not receipt.exists() or updating:

reduces to if updating:. The first branch is permanently unreachable. This doesn't change observable behavior for any live code path (the "create new site" path was intentionally removed), but a future maintainer restoring that path would need to update line 35 as well — it won't self-activate just by removing the guard above.

scripts/assemble_headless.py — bind_assembled_scoring_revision unused variable

original=path.read_bytes();history=json.loads(original)

original is read but never used again. Looks like a leftover from a rollback design that was superseded by the outer staging-dir + atomic rename pattern in assemble().

scored_at timezone inconsistency

bind_assembled_scoring_revision uses datetime.now().astimezone().isoformat() (local tz), while rebind_revision_receipts in rebind_result_review_metadata.py uses datetime.now(timezone.utc).isoformat() (always UTC). Both end up in scoring-revisions.json rows that are included in scoring_revision_history_sha256. Since each run produces a single deterministic hash, this won't cause verification failures in practice — but it does mean timestamps in the chain will carry different UTC offsets depending on which script wrote them and what machine it ran on.

None of these are blocking. The core logic — atomic staging, chain hashing of scoring revision history, evidence-to-profile binding validation, and publication site enforcement — is correctly implemented.

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

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review PR diff for bugs and security issues
  • Post findings

The three issues flagged in the earlier pass are all resolved in commit 03c247e:

Issue Status
publish_artifact_hub.py dead branch (if not receipt.exists() or updating) Fixed — reduced to if updating:
original unused variable in bind_assembled_scoring_revision Fixed — removed
scored_at local-tz vs UTC inconsistency Fixed — both scripts now use datetime.now(timezone.utc)

One new observation on the final state:

bind_assembled_scoring_revision — require_result_review return value is silently discarded

require_result_review(output, dataset, records)   # return value unused
if valid_scoring_revision(output): return False

require_result_review raises on any validation failure, so the raise path is correct. But the function also calls valid_scoring_revision(output) immediately after, which internally calls require_result_review again, re-parsing and re-validating result-review.json a second time for the same files. This isn't a bug — the second call happens inside valid_scoring_revision on a fresh read path — but the first call's result is entirely discarded, making it redundant. Not blocking.

No other bugs or security issues found. The core logic is sound: the atomic staging-dir + replace() ensures failed assemblies don't pollute existing evidence; the chain hash (scoring_revision_history_sha256(history) evaluated before append()) correctly excludes the row being constructed; and require_publication_site correctly enforces the hardcoded bWkRP157EtF6 site binding.

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

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

关于第二轮提到的 require_result_review:这里的第一次调用不是冗余。它是 fail-closed 门禁,核验记录无效时必须直接抛错并停止;紧接着的 valid_scoring_revision() 会捕获同类核验错误并返回 False,只用于判断“是否已经存在有效评分修订”。若删除第一次调用,无效核验可能被当成“尚无有效修订”而继续追加新凭据。因此保留当前两步语义。

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review PR diff for bugs and security issues
  • Post findings

No critical bugs or security issues found in the latest commit (67c8411).

publication.py — except URLError will catch HTTPError

The new network-timeout clause:

except (TimeoutError, socket.timeout, URLError):

HTTPError is a subclass of URLError. Python evaluates except clauses in order, so except HTTPError (the clause above) catches HTTPError first and this clause only fires for non-HTTP URLErrors (connection refused, DNS failure, etc.). The ordering is correct.

socket.timeout is also redundant since Python 3.3 (socket.timeout is an alias of TimeoutError), but it's harmless.

publication_target.py — import-time failure on missing profile

_BASE, _SLUG = current_publication_target()

This runs when the module is imported. If evaluation/current-report.json is absent or malformed, the entire harness.web_fetch.publication_target module fails to import, cascading to any importer. The file is committed and tests pass, so this is an intentional design choice, not a regression — worth noting for future refactors that split the module.

5xx retry in put_file — single retry only

if error.code >= 500:
    if attempt > 0:
        raise
    delay = 1.0

Only one retry on server error, then raises. This is intentional to avoid masking persistent server failures. Correct.


All three issues from prior passes remain resolved. Core logic is sound: atomic staging-dir + replace(), chain hash (scoring_revision_history_sha256(rows[:index])), evidence-to-profile binding in require_current_report_profile, and require_publication_site site enforcement are all correctly implemented.

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

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No critical bugs or security issues found in commit 55b2a16.

fill in package_artifact_hub.py — duplicate listeners on re-entry

When large && !force, deferFill(pre) is called and fill returns before setting pre.dataset.loaded. If fill is ever called a second time on the same element while still in deferred state (e.g., a second page render pass before user interaction), deferFill runs again and doubles up the click/keydown listeners. The first activation removes only its own closure, leaving the second closure permanently attached; a second click after the textarea is already rendered would call fill(pre, true) on the now-replaced node. In practice the current render loop doesn't re-invoke fill on already-visited elements, so this is latent rather than triggered. A guard if(pre.classList.contains('deferred-evidence'))return at the top of deferFill would close it.

comparison_rows in report.py — unchecked bycase key

attempts={r['provider']:r for r in bycase[case_id]}

Direct dict lookup over cases.items() — if a case has no records, bycase[case_id] raises KeyError. The current data guarantees every case has at least one record, so it's latent. bycase.get(case_id,[]) would make the invariant explicit.

Neither is blocking. The comparison logic (pairwise and multi-method set operations), the deferred-load state machine, and the exact_pass semantics (pass.size === selected.length correctly excludes unselected passing methods) are all 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/34321026625. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No bugs or security issues found in commit cda3d08.

Both issues flagged in the previous pass are resolved:

Issue Status
fill in package_artifact_hub.py — duplicate listeners on re-entry Fixed — pre.dataset.deferred guard in deferFill blocks re-registration; cleared in activate and error path so retry works correctly
comparison_rows in report.py — unchecked bycase key Fixed — bycase.get(case_id, [])

The error-path sequencing in fill is correct: dataset.deferred is cleared before calling deferFill again, so the fresh retry listener registers cleanly without accumulating.

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

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No bugs or security issues found in commit 093ec1d.

compareMethods — if(!a)return guards only the baseline select

function compareMethods(){
  let a=…,relation=…,track=…,count=…;
  if(!a)return;

relation, track, and count are not null-guarded. If any of those DOM elements is absent at call time, relation.value, track.value, or count.textContent throws. In the current page this can't happen since all four controls render together, so it's latent — and the same pattern existed in the prior comparePair/compareGroup functions, so it's not a regression.

method_links lambda and TRACKS lookup are correct

The state argument is always a hardcoded literal ('pass'/'fail'), so class="outcome-pill {state}" carries no injection risk. attempt_id is routed through safe_href then esc(). TRACKS[c.get('track','web')] is the same lookup that existed before — unknown track would KeyError, but that's pre-existing, not introduced here.

Logic is sound

The unified compareMethods correctly:

  • Disables the method-A value in the checkbox set before collecting others
  • Builds selected=[a.value,...others] for symmetric relations (all_pass, all_fail, mixed) while using a.value/others separately for asymmetric ones
  • exact_pass (pass.size===selected.length) correctly excludes unselected passing methods

Nothing blocking.

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

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No bugs or security issues found in commit 202bb74.

The failure retry implementation is correct:

  • max_failure_retries validated to {0, 1} before any loop runs — no unbounded retries possible.
  • Break condition physical_attempt > max_failure_retries correctly terminates after at most 2 physical calls.
  • Retry is skipped when stopped_provider is True (live timeout thread), which is the right gate — no second network call into a provider that's already wedged.
  • previous_request_completed is updated inside the inner loop, so both the retry throttle and the next-case inter-call throttle pace from the actual last network completion.
  • artifact and measured both refer to the final physical attempt at the integrity check on line 279 — the hash guard is correct.
  • Artifact paths use a distinct -physical-NNN suffix only when max_failure_retries > 0, so zero-retry runs produce unchanged artifact filenames.

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

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No bugs or security issues found in commit ba58bcf.

The updated_receipt function is correct: validates versionId format before accepting it, uses immutable spread ({**receipt, ...}) so the original receipt is never mutated in-place, and the ValueError path fires before any write. The asymmetry between the creating path (no versionId validation) and the updating path (validated via updated_receipt) is intentional — on creation, the response is the full API payload and a missing slug is already guarded.

All issues from prior passes remain resolved.

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No bugs or security issues found in commits ba58bcf / b0483e0.

The two commits extract updated_receipt into publication.py and add a versionId prefix guard. Logic is correct:

  • {**receipt, 'versionId': version, 'last_update': response} cleanly replaces the old in-place mutation without changing observable behavior.
  • The startswith('ver_') guard raises before the receipt is rewritten, so a malformed server response can't silently corrupt the stored version baseline.
  • The receipt is still written with chmod 0o600 immediately after, same as before.

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

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No critical bugs or security issues found in commit 1ca1724.

latency_correction_original_elapsed — silent {} fallback on validation failure

If latency-corrections.json is present but fails any validation check (malformed, wrong hash, mismatched fields), the function silently returns {}. The caller require_verified_reference_checks then falls back to record["elapsed_ms"] for certificate time-bound checks — but at that point results.jsonl already contains corrected elapsed values, while the certificates were signed against the original (pre-correction) timings. For the 12 affected entries this produces a mismatched elapsed in the time-bounds calculation. In practice the delta is small and unlikely to flip a pass/fail, but a corrupted receipt causes the verifier to silently use the wrong timing instead of raising. A raise on invalid-but-present receipt would be more defensible than return {}.

package_artifact_hub.py — published_sha256 in privacy receipt is unverified in bundle check

package_artifact_hub.py now sets redaction['published_sha256'] after the add() call (lines 197–200). check_publication_bundle.py verifies that files[name]['sha256'] matches the archive content (the top-level loop), and verifies original_sha256 against the local source (for row in privacy['files']), but does not cross-check published_sha256 against files[name]['sha256']. The audit chain skips one link: a replay that patches the privacy receipt's published_sha256 without changing the manifest would pass all checks. Not exploitable in the current single-pipeline build, but the check is incomplete for an external auditor validating a published bundle.

apply_latency_correction.py line 187 — only the selected round is validated for ok

if not keys<=by_key.keys() or any(not row['ok'] for row in selected):raise SystemExit(...)

selected is filtered to selected_round (the last round). Earlier diagnostic rounds are not checked for failures. The script takes their timing as raw data without asserting they succeeded. Given the three-round rotation is only used for timing (not content decisions), and the receipt captures physical_calls=len(diagnostic) which spans all rounds, this is probably intentional — but it means a diagnostic run where earlier rounds partially failed would still produce a valid receipt using the last round's times.

None of these are blocking. The core latency correction flow — copytree then in-place mutation, result-review rebind, scoring-revisions.json chain append (hash evaluated before the new row), latency-corrections.json receipt with per-record embedded metadata — is correctly implemented. The new AUTH_VALUE / LOCAL_USER_PATH privacy scanning and the scored-output redaction disclosure mechanism are also 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/34342289196. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No bugs or security issues found in commit cd7785b.

The change adds an index_header parameter to table() so English-edition pages render No. instead of 序号. The new parameter is correctly passed through esc() before being inserted into the HTML. The check_report.py guard now branches on p.relative_to(root).parts[0]=='en' to pick the expected header string, and all(...) on an empty parser.headers safely returns True, so pages with no tables are not rejected.

All issues from prior passes remain 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/34344052577. Please check Claude's inline feedback and summary comment for details.

Comment thread AGENTS.md Outdated
- Evaluation credentials default only to this repository's `.env`, never a user's home directory. Artifact Hub publishing is the user-requested exception: reuse `~/.config/artifact-hub/token`, with explicit environment/repository overrides. Keep `.env.example` current; do not commit secrets.
- Persist provider-call outputs outside the repository under `~/.browser-eval/` (or `BROWSER_EVAL_DATA_HOME`). Do not commit `results.jsonl`, execution manifests, run-selection receipts, provider artifacts, raw rerun directories or internal work logs. Keep compact benchmark definitions, annotations, independent source evidence and public report release metadata in Git when they are required to reproduce or explain scoring.
- Before publication, run unit tests, JavaScript UI tests, report integrity and link checks. Retain each report's own Artifact Hub share link. The five-browser report uses its separately authorized site bWkRP157EtF6; never overwrite the original report UeZE1vfcEOrM with it.
- Before publication, run unit tests, JavaScript UI tests, report integrity and link checks. Retain each report's own Artifact Hub share link. The current five-browser report uses Sites at `https://artifact-hub.app.lexmount.com`, site `UUAhhQMnrGwm`; never overwrite the legacy sites `bWkRP157EtF6` or `UeZE1vfcEOrM`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

bWkRP157EtF6 or `UeZE1vfcEOrM 这些是什么,为什么要暴露在 agents.md 里

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已处理。AGENTS.md 不再写入任何历史或当前站点 ID;当前发布目标只从 evaluation/current-report.json 的机器可读配置解析,发布器还会校验收据站点与目标一致,避免误覆盖旧报告。

Comment thread AGENTS.md Outdated
- Before publication, run unit tests, JavaScript UI tests, report integrity and link checks. Retain each report's own Artifact Hub share link. The five-browser report uses its separately authorized site bWkRP157EtF6; never overwrite the original report UeZE1vfcEOrM with it.
- Before publication, run unit tests, JavaScript UI tests, report integrity and link checks. Retain each report's own Artifact Hub share link. The current five-browser report uses Sites at `https://artifact-hub.app.lexmount.com`, site `UUAhhQMnrGwm`; never overwrite the legacy sites `bWkRP157EtF6` or `UeZE1vfcEOrM`.
- Maintain `research/report-changes.json` for every substantive report release and render it through the current report builder. Explain what changed, why it matters, score/denominator effects, evidence and remaining measurement limits; keep details collapsed and summaries visible. These are public release notes, not assistant work logs. Do not invent explanations for earlier undocumented versions.
- Maintain public provider prices in `research/provider-pricing.json` and render with `report_pricing.py`. Recheck official sources and record the verification date; separate actual annual commitments from rounded monthly labels, fully utilized plan prices from marginal overages, and billable browser time from client latency. Keep undocumented prices unknown, preserve billing exceptions, and never turn public quotes into historical benchmark invoices.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agents.md 的内容和 benchmark-report 等 skill 的内容,有没有重复的,去掉,然后梳理下内容应该放在哪边合适

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已处理。通用的评测设计、核验、报告与发布规则统一放在 repo-local benchmark-report skill;AGENTS.md 已收敛为仓库专属入口、运行时、证据存储、当前发布目标、Web Fetch 评分边界与数据维护规则,删除重复内容。

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No bugs or security issues found in commit 0542620.

check_report.py — canonical_link raises on paths traversing above root

target=(page.parent/parsed.path).resolve().relative_to(root)

If any generated link somehow resolved above root (e.g., a ../../.. traversal), .relative_to(root) raises ValueError instead of a clean assertion failure. All report generation produces internal relative links so this path is unreachable in practice, but a malformed input would produce a confusing traceback rather than a legible assert.

validated_final_round — all diagnostic rounds now checked for ok

if any(not row['ok'] for row in diagnostic):
    raise SystemExit('diagnostic correction scope contains a failed call')

The prior pass flagged that only the selected (final) round was checked. The new code checks the entire diagnostic dataset. This is stricter — a partial failure in an earlier round now aborts — and is intentional.

report_i18n.py _rewrite_links — \b word boundary matches data-href

pattern = re.compile(r'(?P<prefix>\b(?:href|src)=)...')

\b before href also fires after - (non-word char), so data-href="..." attributes would be processed as navigation links. No data-href attributes exist in the current templates so this is latent, not triggered.

All issues from prior passes remain resolved. The latency_correction_original_elapsed silent-fallback, validated_final_round scope guard, and bilingual parity checks (zh_pages == en_pages, per-page tag/id/data/number/link symmetry) are correctly implemented.

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

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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


PR Review: Harden Web Fetch report rebuild and review

  • Gather context
  • Review latest commit diff for bugs and security issues
  • Post findings

No bugs or security issues found in commit f8ad206.

download_export — extracted retry logic is correct

The new function correctly handles cleanup in its finally block: path is assigned only after the version check passes and the NamedTemporaryFile is opened, so a ValueError from a missing ver_ header leaves path=None and skips cleanup. An IncompleteRead during body streaming fires with path already set and complete=False, so the partial file is removed. Both cases are handled correctly.

IncompleteRead is not a subclass of URLError

http.client.IncompleteRead derives from http.client.HTTPException, not OSError/URLError, so it cannot be caught by the existing URLError clause and must be listed separately — which it now is in both verify_public_files and download_export. Correct.

All issues from prior passes remain 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/34369399881. Please check Claude's inline feedback and summary comment for details.

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