Skip to content

Define the benchmark adapter interface and the pipeline skeleton each track follows #338

Done

Description

@lanyue-llk

Part of #336, the convergence on the repository specification (#313). Rules: 3, 6, 7. Size: M. Design first: agree the interface in a short note on this issue before code.

Problem

Benchmarks in one track do not share one pipeline, and no interface says which steps a benchmark may supply.

  • Web Fetch: webmainbench_runner.run (web_fetch/webmainbench_runner.py:451) is a second runner for WebMainBench and WCXB. Reading it shows that it differs from the shared runner in four steps only: loading cases (load_source, load_wcxb_source, then case_for already builds the shared EvalCase, :226), preparing the input environment (fixture_server and the loopback sandbox, :239, 395), checking method versions (check_identity, :382) and scoring. The call loop, record writing and certification are reimplemented without need.
  • Web Extract already has the right shape in part: BENCHMARKS (web_extract/dataset.py:76) resolves modules exposing prepare, task_schema, probe_cases and score.
  • Web Search fixes its populations and grader to two datasets in shared code (Web Search: move provider quirks into adapters and dataset rules into declarations #323).
  • Trajectory Replay has four runner loops for three benchmarks (see the replay pipeline task).

Direction

Define the benchmark adapter and the track pipeline skeleton from the specification in a shared module:

  • adapter hooks: cases, inputs (a context manager yielding the input environment: live site, served fixture or deployed environment), score, populations (denominators, metric set, expected matrix) and optional views;
  • one registry of benchmark adapters per track, selected by the profile;
  • the skeleton each track runner follows: load cases, prepare inputs, check method identity, call, write records, score, aggregate, build report.

Port one benchmark per track as the proof: the default Web Fetch suite, and the existing Web Extract BENCHMARKS modules. The remaining benchmarks move in #322, #323, #324 and the replay pipeline task.

Done when

  • The interface and registry exist in a shared module with a contract test that iterates registered adapters.
  • The default Web Fetch suite and the Web Extract benchmarks run through it with unchanged results.
  • The track runners call adapter hooks and contain no benchmark name.

Paths are relative to src/harness/; line numbers are from main at 997a228.

Activity

  1. added
    refactor
    on Nov 24, 2026
  2. lanyue-llk commented on Nov 24, 2026

    @lanyue-llk
    ContributorAuthor

    Status: Web Fetch (web_fetch/benchmarks.py: default, webmainbench, wcxb), Web Search (web_search/benchmarks.py: scenario, factual) and Web Extract (BENCHMARKS) have benchmark registries. Remaining: Extract benchmarks lack cases/inputs/score/populations; harness/benchmarks/publication.py still has an if self.track == "headless-browser" branch; browser tracks follow in #339.

  3. lanyue-llk commented on Nov 24, 2026

    @lanyue-llk
    ContributorAuthor

    Done: benchmark adapters and registries in Web Fetch (#351), Web Search (#346), Web Extract (#348, #378) and the replay ReplayBenchmark (#372); views() is part of the protocol (#366). Remaining: the Extract runner calling its benchmark hooks is blocked by hash-bound pipeline.py, tracked in #379; Browser Use has no benchmark extension point yet (strict xfail in its conformance test).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactor

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions