Repository navigation
Done
Labels
refactorCodebase quality roadmap
Milestone
Description
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, thencase_foralready builds the sharedEvalCase,:226), preparing the input environment (fixture_serverand 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 exposingprepare,task_schema,probe_casesandscore. - 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 optionalviews; - 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.
Metadata
Metadata
Assignees
Labels
refactorCodebase quality roadmap
Activity
lanyue-llk commentedon Nov 24, 2026
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 lackcases/inputs/score/populations;harness/benchmarks/publication.pystill has anif self.track == "headless-browser"branch; browser tracks follow in #339.lanyue-llk commentedon Nov 24, 2026
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-boundpipeline.py, tracked in #379; Browser Use has no benchmark extension point yet (strict xfail in its conformance test).