Skip to content

feat(webfetch): score main and full content independently - #276

Merged
lanyue-llk merged 32 commits into
mainfrom
codex/webfetch-scope-dataset
Nov 12, 2026
Merged

lanyue-llk merged 32 commits into
mainfrom
codex/webfetch-scope-dataset

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

Summary

Add independently annotated main-content and full-content acceptance scopes to Web Fetch. One saved response can be scored for either scope or both. Acquisition and retry decisions stay immutable; scoring another contract adds no provider calls.

The evaluation skill asks users to choose Full content (default) or Main content before new collection and passes the choice explicitly for annotated inputs. Each report shows one scope. New reports default to full content; rebuilds preserve an existing explicit selection. Every page names its scoring scope and discloses different acquisition retry requirements. Remove the combined report and its controls. Percentages are primary; counts remain visible.

flowchart LR
  A["Choose Full content — default<br/>or Main content"] --> B["Acquire once<br/>Freeze calls and retry policy"]
  B --> C["Saved response bytes"]
  C --> S["Select scoring mode<br/>full, main, or explicitly both"]
  S -->|full or both| D["Independent full-content scorer"]
  S -->|main or both| E["Independent main-content scorer"]
  D --> F["One selected report<br/>scope and retry policy visible"]
  E --> F
  F --> G["Rebuild keeps its selection<br/>no extra provider calls"]
Loading

Version impact

This PR preserves the current released dataset selection and original 550-task definitions. Dataset v3.0.0 selection, its 530-task annotation export and registry assertion are split into draft #278: the upstream content is merged, but its required release tag is not yet published. The draft retains immutable commit, archive and file hashes and does not create the tag.

No Webstone/scorer release, version bump or tag is created. Existing task contracts and saved scores stay unchanged. The main-content diagnostic report retains its explicit scope, 1,060 saved outputs, case-level analysis, illustrations and issue links.

Publication updates preserve the existing work's private access and do not create independent share links. These shared publisher fixes are retained because private report delivery depends on them; their cross-track behavior is covered by the existing publication tests.

Validation

  • Scope selection, rebuild persistence and retry-provenance checks in Chinese and English, including negative controls.
  • 221 focused tests and 138 subtests passed, including the benchmark registry, packaging and explicit UTF-8 checks.
  • Repository lint passed.
  • Desktop and mobile verification of the main-content report: scope, rates, issue links and unfolded diagrams.
  • No live provider reruns.

@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 · 3246369

No findings in this review.

@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 skipped · fd1cd5e

No reviewable content was selected for this run.

@lanyue-llk lanyue-llk changed the title fix(datasets): synchronize Web Fetch suite selections feat(webfetch): switch main and full scores from one acquisition Nov 12, 2026
@lanyue-llk
lanyue-llk marked this pull request as ready for review November 12, 2026 07:11

@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 · 5da50ce

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

Comment thread src/harness/web_fetch/report_build.py Resolved
Comment thread src/harness/web_fetch/report_build.py Resolved
Comment thread src/harness/web_fetch/report_check.py Resolved
Comment thread src/lexbench_webfetch/content_scopes.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 · 2a92cee

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

Comment thread src/harness/web_fetch/report_build.py Resolved
Comment thread src/harness/web_fetch/report_build.py Resolved
Comment thread src/harness/web_fetch/report_check.py Resolved
Comment thread src/harness/web_fetch/report_check.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 · 875dbf5

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

Comment thread src/harness/web_fetch/report_check.py Resolved
Comment thread src/harness/web_fetch/report_check.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 · e58c0b8

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

Comment thread src/harness/web_fetch/report_check.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 · 9b088dc

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

Comment thread src/harness/web_fetch/report_check.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 · 411cae3

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

Comment thread src/harness/web_fetch/report_check.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 · c65445c

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

Comment thread src/harness/web_fetch/report_build.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 · b5a94b7

No findings in this incremental review.

@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 · ce61e6e

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

Comment thread src/harness/web_fetch/report_build.py Resolved
Comment thread src/harness/web_fetch/runner.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 · 16514d4

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

@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 · 4a03015

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

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review of head 4a03015c (whole net diff from 1287fdf8, current main): fail. Two P1s and six P2s, all blocking.

What holds up:

  • Existing scores: scores on the existing 550 tasks don't change. The primary verdict is computed as before, and content_scope_metrics is only added next to it.
  • Version: the scorer reports 0.6.0+unreleased and doesn't claim a released version.
  • Tests: the PR's tests run in the default collection, and 271 focused tests pass.

P1:

  1. The second view's verdicts depend on the first view's retry decisions, and the report doesn't say so.
    • Where: src/harness/web_fetch/runner.py:877-888. The retry decision reads only the primary scope's metrics, and the default is 1 retry.
    • Main as primary: a task that passes main but fails full is never retried, so the full view loses a retry a normal full run would get.
    • Full as primary: a full failure triggers a retry, and the final response replaces one that had passed main, so the main view can lose a pass. Retry latency also counts in both views.
    • The report presents the two views as equals ("Same saved calls; switch scoring requirements"). Reproduced with the fixture provider and default retries: 1 physical call with main as primary, 2 with full as primary.
    • Who it hurts: anyone ranking providers on the alternate view, or comparing it with a single-scope run.
    • Smallest fix: record which scope decided retries in manifest.json and content-scope-views.json, and label the alternate view with it. Alternatives: reject both when retries are above 0, or retry when any view fails, which costs extra calls.
  2. rescore --score-scope main|full overwrites the scope the run was acquired under, then refuses to restore it.
    • Where: cli.py:196-197 passes content_scope=None, runner.py:1153-1162 skips the saved-scope check, and runner.py:1236 rewrites run_dir/dataset.json.
    • Reproduced:
      1. A full-primary run saves content_scope=full.
      2. rescore --score-scope main rewrites it to main at both the dataset and task levels, and nothing else records the original scope.
      3. A later rescore --content-scope full then fails with "Rescore cannot change the saved content scope".
    • This reverses feat(webfetch): add content scopes and diagnostic report guides #268's rule that rescoring keeps the saved scope, and permanently loses how the run was acquired.
    • Fix: keep content_scope as the immutable acquisition scope, and put the score selection only in scoring_scope. P1-1 has the same root cause: the acquisition scope is never recorded as a fact of its own.

P2 (blocking):

  1. The PR doesn't state its version impact, and it pins an untagged dataset commit.

    • Where: src/harness/benchmarks/data-lock.json:6-7 and evaluation/lexbench-webfetch.json:5,77-97.
    • The pin a71b0b0f is HF main with no tag, and its manifest still says edition v2.2.0 with 550 tasks. The dataset's VERSIONING says a change to output scope is a major dataset change.
    • Recommended: split. Keep the dual-scoring and report mechanism here, since its tests use synthetic cases and don't need the pin. Move the data-lock and binding change, the content-scopes-530 registry entry, the README "Select content-scopes-530" section and the 530 assertion into the dataset v3.0.0 pin PR, after the v3.0.0 tag exists (the 530-task edition, HF #9).
    • If you keep it together instead: hold the PR until the tag exists, and state the minor bump and the break in the body.
  2. The bundle check for diagnostic scope views still has gaps. The child view is only partly validated against its parent. These are four OCR threads still valid at this head:

    • report_diagnostic.py:564: scope_views isn't required when scope_bundle is present, so removing it still passes, and readers get no switch.
    • report_diagnostic.py:548: the cross-view comparison leaves out provider_identity, request, process and call_error.
    • report_build.py:203: the child view is built without profile, so the profile checks never run on it.
    • report_diagnostic.py:894: everything under content-scopes/** is skipped, so an extra page with a broken link passes.

    Fix: require scope_views with a bundle, compare the fields the adapter emits, pass profile, skip only the declared alternate subtree, and add one negative control each.

  3. Single-scope rescore rejects annotation corrections that both accepts.

    • Where: runner.py:1155-1161 still compares content_scopes.
    • Reproduced: after adding one alternative to content_scopes.main.required_facts, --score-scope main fails with "Scoring selection cannot change the saved retrieval task", but --score-scope both succeeds.
    • Fix: exclude content_scopes from the identity comparison and add a regression test.
  4. The alternate view copies all call evidence (report_build.py:466-474).

    • In a one-task fixture report of 9.2 MB, content-scopes/ took 4.6 MB of byte-identical copies. At 530 tasks across several providers, that doubles the package against Artifact Site's publish limits.
    • Fix: link to the root evidence instead of copying it.
  5. lexbench-webfetch list double-counts tasks. It now prints six suites totaling 1,080 entries with no kind, although content-scopes-530 only re-annotates 530 existing tasks (src/lexbench_webfetch/cli.py:110). Show kind and source_population. This moves with the pin if you split.

  6. The PR body has no picture of its main content.

OCR threads:

  • 4547469832, 4547495010, 4547469838 and 4547495020 are fixed in code and can be resolved.
  • The threads under P2-4 and P2-5 above are still valid.

Not verified: the real 530-task approved inputs, the browser interaction tests (they skip without Chromium) and live provider runs.

@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 · 27080d7

No findings in this incremental review.

@lanyue-llk lanyue-llk changed the title feat(webfetch): switch main and full scores from one acquisition feat(webfetch): score main and full content independently Nov 12, 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 · e46a7b6

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

Comment thread src/harness/web_fetch/report_build.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 · c79a703

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

Comment thread src/harness/web_fetch/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 · 053d233

No findings in this incremental review.

@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 · f0b9bbf

No findings in this review.

@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 · d6803e6

No findings in this incremental review.

@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 skipped · 9cb46b6

No reviewable content was selected for this run.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review of head 9cb46b61 (whole net diff from 1287fdf8, judged by current main incl. #277): fail. One P1 and three blocking P2s.

Fixed since 4a03015c:

  • Previous P1-2: rescore --score-scope no longer overwrites how the run was acquired. manifest.json keeps acquisition (scope, per-task scopes, retry limit), and switching back to the original scope works.
  • Previous P2-4 and P2-6: the second page tree and scope bundle are gone, so their gaps and the duplicated evidence are gone too.
  • Previous P2-5: annotation corrections are accepted by single-scope rescoring.
  • Previous P2-7: lexbench-webfetch list shows kind: annotation_cohort and source_population for content-scopes-530.
  • Scores on existing tasks are unchanged. CI passes, and 12,077 focused tests pass locally.

P1

  1. The report never says whether it ranks main content or full content, and a plain rebuild switches between them.
    • Where: src/harness/web_fetch/report_build.py:451. The report scope defaults to full, and command_report (cli.py:182-185) never reads manifest.json → acquisition.content_scope.
    • Reproduced with the fixture provider and one paired task:
      1. webstone run --content-scope main builds a main-content report.
      2. webstone report <run>, run for example only to change the language, rebuilds it as a full-content report. results.jsonl in the report changes from main to full verdicts.
      3. Neither report states its scope. No page in either language says "main content" or "full content" next to the results.
    • Also: after rescore --score-scope main on a full-acquired run with the default 1 retry (2 physical calls), the main report doesn't show that retries followed the full verdict. The manifest records it; readers can't see it.
    • Who it hurts: anyone reading or sharing the report. The same calls give two different rankings, and the page doesn't say which one it shows.
    • Smallest fix:
      • Default the report scope to acquisition.content_scope, falling back to full for older runs.
      • Name the scope in the home-page summary.
      • When the report scope differs from the acquisition scope, add one line: "Retries followed the verdict."
      • Add a negative control for each.

P2 (blocking)

  1. Version impact is still unstated, and the dataset pin is still untagged.
    • Where: src/harness/benchmarks/data-lock.json:6 and evaluation/lexbench-webfetch.json:5 pin a71b0b0f.
    • HF main has since gained def0249d "Release v3.0.0: 530-task edition without duplicated examples (#9)". The pin is the commit before it, and no v3.0.0 tag exists yet (refs).
    • Recommended default, unchanged from the last round: split. Keep the scoring and report mechanism here, since its tests use synthetic cases. Move the pin, the content-scopes-530 entry and the README export section to a PR that pins the v3.0.0 tag once it exists. Either way, state the version impact under docs/releases.md in the body.
    • Merge order: HF Upgrade and root-audit the 10-method Web Fetch report #9 is merged → tag v3.0.0 → pin PR → this PR (or this PR first if split).
  2. The new skill rule contradicts the new design.
    • Where: .agents/skills/benchmark-report/references/presentation-quality.md:83-91. It requires scope controls, a switch and counterpart links on every page, and release checks for them.
    • The README now says "Reports contain no scope switch or second set of pages." An agent following the skill would rebuild the removed switch.
    • Fix: replace the section with "One report presents one acceptance scope. Name it on every report page; say which scope decided retries when it differs."
  3. The PR body still has no picture of its main content. (Owner rule: one picture per PR.)

Split suggestion (not blocking)

  • src/harness/reporting/publish.py:350-383 changes the shared publisher for every report track, not only Web Fetch.
  • A default publish no longer creates a public share link. It returns /s/<slug> with whatever visibility the site already has, which is private for a new site, so other readers can't open the returned link.
  • This may be intended (the body mentions it), but it's unrelated to content scopes and changes Browser Use, Trajectory Replay and WCXB publishing. A separate PR would make it easier to review and revert.

Not verified: real 530-task approved inputs, live provider runs, and browser interaction tests (skipped without Chromium).

@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 · f80cebb

No findings in this incremental review.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Addressed in f80cebb:

  • Rebuilds retain the saved report scope. Fresh reports still default to full content, as the owner requested; acquisition scope is preserved separately and is not used to silently change the report selection.
  • Every scoped report page names main/full content. A different acquisition retry policy is visible next to that label. Chinese/English negative controls reject missing or wrong labels and retry notes; saved calls remain unchanged.
  • The skill now explicitly asks users to choose Full content (default) or Main content before new collection. Removed the obsolete switch/counterpart-link requirements.
  • Removed the dataset pin and 530-task registration from this PR. Prepared them in draft build(webfetch): prepare the v3 dataset pin #278, which waits for the upstream v3.0.0 tag. This PR retains the released v2.2.0 selection.
  • Added a Mermaid diagram to the PR description and documented version impact.

Validation: 221 focused tests, 138 subtests, lint, and four desktop/mobile browser checks passed. The existing main-content report is restored with its original 1,060 outputs, 428/530 and 153/530 main-content results, case diagnoses, illustrations and issue links. No provider calls were rerun.

The shared publisher fixes remain because preserving this private report's access is part of delivery; their existing cross-track tests remain in place.

@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 skipped · 0703698

No reviewable content was selected for this run.

@lanyue-llk
lanyue-llk merged commit ac6b3da into main Nov 12, 2026
8 checks passed
@lanyue-llk
lanyue-llk deleted the codex/webfetch-scope-dataset branch November 12, 2026 13:22
lanyue-llk added a commit that referenced this pull request Nov 12, 2026
* docs(datasets): describe the LexBench-Web-Fetch v3.0.0 edition in its card

The Web Fetch card producer still described the 550-task v2.x catalog and
published a dynamic-examples viewer group, so republishing from Webstone
would revert the Hugging Face v3.0.0 card and viewer.

- Card text follows the v3.0.0 README: 530 counted tasks, the separate
  challenge set, the 530-task revision and content-scopes-530.
- Exclude the mixed-suite dynamic examples and the content-scopes-530
  annotation suite from the viewer; the challenge set stays separate.
- Content-scope text matches #276: runs score main and full by default.

* docs(web-fetch): run the content-scope export through uv

* test(benchmarks): cover the annotation cohort viewer exclusion

Add a content-scopes-530 suite to the fetch fixture and assert it stays
bound but never becomes a viewer group; run the card's helper through uv.

* docs(benchmarks): keep Web Fetch v3 on the dataset's own rebuild tool
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