Skip to content

feat(web-extract): support source-qualified URL benchmarks and independent reports - #260

Merged
lanyue-llk merged 46 commits into
mainfrom
codex/web-extract-public-benchmarks
Nov 10, 2026
Merged

lanyue-llk merged 46 commits into
mainfrom
codex/web-extract-public-benchmarks

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Web Extract now supports source-qualified URL tasks with custom fields and list queries. Live tasks use the original website; archived tasks use a version-bound public HTML service. Providers receive field requirements, never reference answers.

Expanded SWDE (210 tasks), NewsXLM (189) and LiveWeb-IE (200) are public, independently pinned Hugging Face sources. Their cards retain official attribution and license terms and link to Browser Eval. The shared dataset registry, verified cache and records adapter support additional datasets, revisions, task counts and compatible APIs without new runners. Prepared profiles retain the HF commit and input hashes.

The existing pipeline handles source qualification, resumable collection, certified disjoint scopes, snapshot verification and independent benchmark reports. Reports preserve each benchmark's population, quality metrics, latency and normalized prices. Release checks validate each suite child's original evidence and freeze private content and snapshot receipts before hosted verification. Source data, measured responses and generated report assets stay outside Git; the large lock addition is the shared path/hash inventory, including NewsXLM's 13,884 files.

Validation:

  • Prepared all three actual HF editions through the supported entry and verified offline reuse; checked anonymous access, source/license citations and Browser Eval links.
  • Scenario tests cover additional datasets and participant counts, source decoding and access failures, URL/text scoring, certified assembly, snapshot integrity, report navigation, pricing and publication authority.
  • CI passed on the final rebased commit, including both test shards, report checks and installation/packaging. Focused checks passed 108 publication tests, 242 snapshot/suite tests and 270 report/repair regressions, plus Ruff and whitespace checks.
  • Linux container tests passed all five process-admission scenarios. The previously intermittent parent-death scenario also passed five consecutive runs after its observation was moved inside the acquired slot; the cleanup requirement remains unchanged.
  • Existing report validation exercised 232 desktop/narrow and light/dark page states, hosted success/error details and keyboard navigation. No provider calls were repeated for dataset registration or rebase.

Report and ImageGen evaluation-flow diagram (organization access). The report contains 1,797 logical results across three providers and 599 tasks. LiveWeb-IE's original and supplementary tasks retain separate cohorts because their pipeline revisions differ. Earlier physical attempts remain available for retry accounting.

@lexmount-ocr lexmount-ocr 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.

⚠️ Review complete · cd58a77

This review found 9 issue(s), including 9 blocking issue(s).

Comment thread src/harness/web_extract/analysis.py Resolved
Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved
Comment thread src/harness/web_extract/swde.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · d5c502b

This review found 9 issue(s), including 9 blocking issue(s).

Comment thread src/harness/web_extract/analysis.py Resolved
Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved
Comment thread src/harness/web_extract/swde.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · bfa8668

This review found 9 issue(s), including 9 blocking issue(s).

Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved
Comment thread src/harness/web_extract/swde.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · f8e483b

This review found 5 issue(s), including 5 blocking issue(s).

Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved
Comment thread src/harness/web_extract/swde.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 45bd414

This review found 6 issue(s), including 6 blocking issue(s).

Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved
Comment thread src/harness/web_extract/swde.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Review complete · 37f6482

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/web_extract/example.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report_suite.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · a7ea87d

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report_suite.py Resolved
@lanyue-llk lanyue-llk changed the title feat(web-extract): support source-qualified URL cohorts feat(web-extract): support source-qualified URL benchmarks and independent reports Nov 6, 2026

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 7c81b06

This review found 3 issue(s), including 3 blocking issue(s).

⚠️ 1 warning(s) occurred during review.


⚠️ Warnings:

  • src/harness/web_extract/report_suite.py (token_budget_reached): stopped group "src/harness/web_extract/report_suite.py" mid-review: used 511079 tokens exceeds budget 500000

Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report_suite.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 86ea6b8

This review found 2 issue(s), including 2 blocking issue(s).

⚠️ 1 warning(s) occurred during review.


⚠️ Warnings:

  • src/harness/web_extract/report_suite.py (token_budget_reached): stopped group "src/harness/web_extract/report_suite.py" mid-review: used 558951 tokens exceeds budget 500000

Comment thread src/harness/web_extract/report_suite.py Resolved
Comment thread src/harness/web_extract/report_suite.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Review complete · 8b61a64

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 7e81669

This review found 6 issue(s), including 6 blocking issue(s).

Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/repair.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · d9279c8

This review found 4 issue(s), including 4 blocking issue(s).

Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/repair.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · e37eb2a

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/repair.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 3ebaf2f

This review found 5 issue(s), including 5 blocking issue(s).

Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/repair.py Resolved
Comment thread src/harness/web_extract/repair.py Resolved
Comment thread src/harness/web_extract/repair.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 3bee61d

This review found 1 issue(s), including 1 blocking issue(s).

⚠️ 1 warning(s) occurred during review.


⚠️ Warnings:

  • src/harness/web_extract/snapshots.py (token_budget_reached): stopped group "src/harness/web_extract/snapshots.py" mid-review: used 572409 tokens exceeds budget 500000

Comment thread src/harness/web_extract/snapshots.py Resolved

@lexmount-ocr lexmount-ocr 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.

✅ Re-review complete · eed0365

No findings in this incremental review.

@lanyue-llk lanyue-llk left a comment

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.

Review of head eed03658 against main (d4fb973d). tests/web_extract: 979 passed. test_report_ui.mjs passes.

The core contract is sound. Providers receive the schema, instructions and query only, never references. Live and archived inputs are separated at plan, run, probe, collection and preview. Missing reference coverage stays unavailable. Text and URL matching uses the same record_value_key in scoring, details and qualification. The Cloudflare deployment proof is keyed by immutable deployment ID plus inventory version, and I found no stale-proof or cache-poisoning path.

Should fix

  1. Medium: segments can mix execution configurations within one method (inline, report.py:3032). Assembling a method from disjoint segments checks dataset, task, schema, HTML, resources, input mode, instructions and live-policy age. Across segments it compares only the method name. It never compares native_options / input route, the plan's participant entry, pipeline_sha256 or the scorer bindings. For example, Oxylabs segment A could run with URL input on pipeline X and segment B with HTML upload on pipeline Y. The report would show one "Oxylabs" result with one denominator, which is not a single declared treatment. Require these to be equal across segments, add a negative test, and disclose any difference that is allowed.
  2. Medium: existing SWDE plans no longer run or resume (inline, certification.py:179). The new plan.get("extraction_instructions") != record_instructions(home) check applies to every adapter benchmark, but plans created by main's create_plan never stored extraction_instructions. Any in-flight or resumed SWDE cohort now fails with "Frozen extraction instructions differ". Treat an absent field as the historical default instruction for plans that predate it.
  3. Medium: report builds now depend on live hosting (inline, report.py:3340). record_preview calls verify_bound_manifest, which now makes a Cloudflare API call and, without a cached proof or CLOUDFLARE_* credentials, fetches every page and resource. Previously it fetched only snapshots.json. Rebuilding a report from frozen evidence becomes slow, network-bound and nondeterministic: it fails offline or after transient 5xx errors. Give the build an offline check (the hash-bound fixture receipts plus the manifest) and keep live byte audits in collection and publication.
  4. Low-medium: URL answers with surrounding whitespace are scored as wrong (inline, swde.py:240-246). value.replace(" ", "%20") runs before stripping. Reproduced: record_value_key({'url':'https://a.com/p/q','value_kinds':{'f':'url'}}, 'f', ' https://a.com/x.jpg', 'whitespace') returns 'https://a.com/p/%20https:/a.com/x.jpg'. Without the space it returns 'https://a.com/x.jpg'. Strip before encoding, and add a paired control to evaluation/scoring-regressions.json, since both error directions are plausible.
  5. Low: the portable evaluator can drift from the scorer actually used (inline, records.py:141). dataset/evaluate.py is a copy of swde.py made at prepare time, but runtime scoring uses the live swde.py. Nothing checks that evaluate.py == exported_evaluator(), and review receipts record scorer_sha256 from evaluate.py. Fixing #4 would make them diverge silently. Require the bytes to match in validate_dataset, or score through the frozen file.
  6. Low: the suite page bypasses the owner's layout and localization (inline, report_suite.py:45). Composition goes through report.build/check, which is good. But the suite home, nav and table labels ("方法", "查看结果", "耗时与价格"…) are inline Chinese strings, outside messages.json and page(). Non-zh languages are rejected, and child reports are forced to zh even though the owner supports English. AGENTS.md asks report CLIs to default to English where the renderer supports it. Use page() and message keys, and pass the language through.

Design (simplicity)

  • The Cloudflare reuse path adds a lot of machinery for a speed-up: an API identity check, a per-deployment proof cache, flock, a fallback to direct checks, an offline receipt validator and a legacy-manifest branch. publication_metadata (snapshots.py:373-392) also runs two near-duplicate checks that every matching page was verified. Consider whether the direct byte check plus a cached receipt would be enough.
  • captured_html switches existing Zyte/SWDE HTML upload from strict UTF-8 decoding to errors="replace", so non-UTF-8 pages are now altered silently instead of rejected.

Merge coordination: merge-tree shows 10 conflicting files with #258 (certification.py, pipeline.py, repair.py, report.py, configs/report-templates.json, the example README and four test files) and 2 with #259 (report.py, test_report_ui.mjs). The three open Web Extract PRs need an agreed order. #259 is the smallest; merging it first and then rebasing the others keeps conflict resolution in one place at a time.

Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/swde.py Resolved
Comment thread src/harness/web_extract/records.py Resolved
Comment thread src/harness/web_extract/report_suite.py Resolved

Copy link
Copy Markdown
Contributor Author

The six inline findings are addressed in 56a3ba7, with per-thread explanations and regression coverage. Two points from the overall review also received follow-up in 6463b56:

  • Legacy Zyte/SWDE HTML uploads again use strict UTF-8 decoding. Invalid bytes fail before a provider request or inflight marker; source-qualified captures retain their declared charset handling. The new valid/invalid input controls reproduce the regression and verify the fix.
  • The duplicate full-page coverage check in snapshot publication is consolidated. Immutable deployment identity, the whole-inventory byte proof, shared proof locking and direct-byte fallback are retained: a cached receipt for a mutable URL alone cannot establish that its content is still the verified version.

The field-extraction cohort renderer itself currently supports Chinese authored content only. The suite now shares page layout/localization and passes its selected language through, while preserving an explicit rejection of unsupported English builds and the not-generated notice.

Validation: 993 Web Extract scenarios passed for the first commit; follow-up checks passed 371 input/runtime scenarios and 191 snapshot/repair scenarios, plus the JavaScript interaction suite, UTF-8/source-language/document checks, and desktop/narrow, light/dark suite navigation. Recomputing the existing 1,797 result scores with the URL-whitespace fix produced no changes. No provider calls or historical evidence were rewritten.

#260 is currently mergeable. #258 and #259 remain open; no merges or cross-PR branch rewrites were performed.

@lanyue-llk lanyue-llk left a comment

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.

Re-review at 6463b560, P0/P1 only.

Fixed since eed03658, verified in code:

  • Old SWDE plans without extraction_instructions fall back to the frozen default, but only for an unchanged SWDE dataset.
  • Report builds no longer need live hosting. record_preview checks the retained manifest offline, and the hosted-bytes audit runs only at publication (audit_previews).
  • URL values are stripped before encoding, with paired controls (boundary whitespace matches; an inner space still separates paths).
  • validate_dataset rejects a records dataset whose pinned evaluate.py differs from the runtime scorer.
  • The suite page now goes through owner.page and the message catalog instead of hard-coded Chinese.

No P0 found. One P1 remains:

  1. Segments run under different configurations are still pooled under one method label. They are now disclosed, but not rejected. See the inline comment.

Textual conflicts with #258 (13 files) and #259 (7 files) remain. Suggested merge order: #259, then #258, then this PR.

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 6463b56

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report_suite.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 70645fa

This review found 1 issue(s), including 1 blocking issue(s).

⚠️ 1 warning(s) occurred during review.


⚠️ Warnings:

  • src/harness/web_extract/report_suite.py (token_budget_reached): stopped group "src/harness/web_extract/report_suite.py" mid-review: used 525320 tokens exceeds budget 500000

Comment thread src/harness/web_extract/report_suite.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · d95c68b

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report_suite.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Re-review complete · 1f6d87a

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/example.py Resolved

@lexmount-ocr lexmount-ocr 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.

⚠️ Review complete · feeb829

This review found 2 issue(s), including 2 blocking issue(s).

Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/records.py Resolved

@lexmount-ocr lexmount-ocr 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.

✅ Review complete · fda409a

No findings in this review.

@lanyue-llk lanyue-llk left a comment

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.

Re-review at fda409a2, P0/P1 only.

Fixed since 6463b560: segments whose native options, participant settings, pipeline or scorer differ are now rejected ("register them as separate participants"). Each certified segment is also checked against its own certificate. That closes the remaining P1 on this PR alone. The suite registry is now bound to the profile through child content and profile hashes.

No P0 found. One P1 appears only when this PR merges after #258 and #259. Git will not flag it, and each branch's CI passes alone. Details are in the inline comment.

Not blocking: captured_html now trusts docinfo.encoding for every qualified page. For a page with no HTTP or meta charset, lxml reports ISO-8859-1, so undeclared UTF-8 becomes mojibake. Verified locally: '价格 ¥24'.encode() decodes to ä»·æ\xa0¼ Â¥24. This now matches reference_support, so qualification and input agree. Pages with non-ASCII reference values will simply fail qualification, but ASCII-only cases can pass while engines receive garbled text. Consider recording the effective encoding at qualification time instead of relying on libxml2's default.

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr 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.

✅ Re-review complete · d4dd66a

No findings in this incremental review.

@lanyue-llk
lanyue-llk force-pushed the codex/web-extract-public-benchmarks branch from 89c8981 to 9434920 Compare November 10, 2026 08:57

@lexmount-ocr lexmount-ocr 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.

⚠️ Review complete · c845e1f

This review found 2 issue(s), including 2 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/snapshots.py Resolved

@lexmount-ocr lexmount-ocr 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.

✅ Re-review complete · 634b251

No findings in this incremental review.

@lanyue-llk
lanyue-llk merged commit 5d3d67b into main Nov 10, 2026
8 checks passed
@lanyue-llk
lanyue-llk deleted the codex/web-extract-public-benchmarks branch November 10, 2026 12:40
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