Skip to content

Conformance examples for every track, versioned native record schemas and Extract benchmark hooks - #378

Merged
lanyue-llk merged 13 commits into
mainfrom
refactor/conformance
Nov 24, 2026
Merged

lanyue-llk merged 13 commits into
mainfrom
refactor/conformance

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

Purpose

Add one conformance example per track (#317). Each example registers a synthetic method and a synthetic benchmark through the public extension points and then drives the track's declared stages through webstone <track> <stage> in-process. The PR also adds versioned record schemas that each track validates when it reads its native call and result files (#327), gives Web Extract benchmarks the BenchmarkAdapter hooks (#338), and removes the shared-code couplings that the examples exposed.

flowchart LR
    T["tests/conformance/test_&lt;track&gt;.py"] -- "registered(registry, name, item)" --> R["Track registries<br/>methods · benchmarks · submissions"]
    T -- "webstone &lt;track&gt; &lt;stage&gt;" --> S["TrackStages<br/>run · score · report · check · package · export"]
    S --> RS["record_schema.RecordSchema<br/>webfetch / websearch / webextract /<br/>lex_browser_use_attempt / trajectoryreplay"]
    RS --> B["Report builders and exporters<br/>read through the schema"]
    S -. "a coupling that still needs shared code" .-> X["strict xfail that names it"]
Loading

What changed

  • Conformance examples live in tests/conformance/ (helpers.py plus one test per track). Registry.unregister lets a test remove its temporary registrations. Every example asserts that the stages it drives equal STAGES.supported() minus publish, so a stage added to a track without coverage fails the example.
    • Web Fetch: adds a new provider type (PROVIDERS now accepts a dotted module outside the package) and a LiveSuite benchmark, then drives run, score, report, package (which refuses diagnostic evidence by contract) and export. check is a strict xfail; see below.
    • Web Search: adds a new adapter and a third SearchBenchmark, then drives run, report, check and export with --benchmark.
    • Web Extract: adds a new method that owns its transport and a new record benchmark. It drives prepare, preflight, plan, certified run, score, report, check, package (the release gate refuses the synthetic local-example profile) and export.
    • Browser Use: adds a new browser, then drives review, report, check, package and export.
    • Trajectory Replay: adds a new browser and a new BENCHMARK_RUNS entry, then drives run, report, check, package and export.
  • Couplings removed:
    • Search cases may name their registered benchmark, and SearchBenchmark.includes replaces the overlapping member partition in benchmark_of, cases and export.
    • Search export reads each benchmark's declared submission instead of the SUBMISSIONS dataset table.
    • Extract submissions are a Registry. The exporter's name != "zyte" check is replaced by "has a task adapter".
    • The replay renderer emitted data-metric-direction="higher", which the shared presentation gate rejects, so the replay package stage failed for every report. It now emits max.
  • Versioned schemas for the artifacts stages exchange #327 schemas:
    • record_schema.py can bind a role to None when a record kind does not carry it. The evidence role also accepts a binding object, and the case role accepts integer task IDs.
    • New schemas: websearch.call_record/1 (read in report.load_run), webextract.call_record/1 (in the new web_extract/call_records.py, used by report, export and certification), lex_browser_use_attempt/1 (publication.read_attempts, used by report, export and review) and trajectoryreplay.attempt/1 (report_inputs.validated_results).
    • Files without a schema field read as version 1. Each track has a test that rejects a malformed row.
  • Define the benchmark adapter interface and the pipeline skeleton each track follows #338: web_extract/benchmark_adapter.py adds ExtractBenchmarkAdapter, which provides cases, inputs, score, populations and views over a prepared home and delegates to the existing owners. dataset.py and pipeline.py are unchanged because their bytes are bound into cohort plans and run contracts (dataset_registry_sha256, pipeline_sha256). A contract test iterates the registered benchmarks.
  • docs/spec.md "Enforcement" names the examples.

Couplings still open (strict xfails or notes)

  • Web Fetch check: report_check.check_revision and report_methods recognize a synthetic report only by provider_type == 'fixture' (strict xfail). These files belong to the Web Fetch report lane.
  • Browser Use has no benchmark extension point. Selection, report and export assume WebArena-Verified (strict xfail).
  • Exporters: the replay and Web Fetch exporters always submit under webarena-verified and lexbench-webfetch.
  • Web Extract: score_run and repair.py read call rows without schema validation, because pipeline.py and repair.py are hash-bound.

#324

#324 is not done here. These items block unifying the product and record-cohort data assembly:

  • _build_product reads historical-reproduction.json, historical_f1 and an optional cohort_plan, and validates the dataset against the single-schema profile.
  • build_record_cohort reads segments, review and adjudication authorities, and live-reference policy through record_cohort_inputs.
  • The two builders write differently shaped manifests (files, preview_snapshot, public_evidence_views). _check_product and _check_record_cohort verify those manifests, and published reports carry them.
  • A shared evidence model would have to version the manifest and migrate both checkers together.
  • analysis.py still imports swde.record_value_key, and swde.py is hash-bound as adapter_sha256.

Allowlists

Instance-literal: 1 → 1. Layering: 0 → 0.

Baselines

The trajectory-replay, trajectory-replay-pass and trajectory-replay-step-durations route digests change only on pages with the core-pass table (higher becomes max). All other baselines are unchanged. The scoring-source hash is unchanged (0fe89317…).

Breaking changes

  • harness.web_search.export.SUBMISSIONS and BENCHMARK_IDS are removed. Each SearchBenchmark now declares its own submission.
  • harness.web_extract.export.SUBMISSIONS is now a Registry: use .get(name) instead of indexing.

Verification

  • uv run --frozen --all-extras python -m pytest tests -n 8 --dist worksteal: 21186 passed. One failure, test_model_comparison::test_unreachable_connection…, passes when run alone and is timing-sensitive. One more failure, the encoding check, was fixed.
  • After rebasing on Web Fetch report model, variant registry and track template #375: tests/conformance, tests/baselines, the architecture tests, record schema, tests/results and tests/web_search give 932 passed and 2 xfailed.
  • make lint-check passed.
  • uv run --frozen lexbench-webfetch version gives scoring hash 0fe8931734e1…, unchanged.

Closes #317
Part of #338 (the Extract runner still calls pipeline directly; routing it through the hooks changes the hash-bound pipeline.py)
Part of #327
Part of #324

… validated on read

record_schema roles may be unbound when a record kind does not carry them; the case role accepts numbered tasks and the evidence role accepts binding objects.
…ection

The replay renderer and its check emitted data-metric-direction="higher", which
the shared presentation check rejects, so every replay report failed the package
release gate. Baselines change only in the route digests of the pages carrying
the core-pass table.
…rt, check and export

A case may name its registered benchmark; Search export reads each benchmark's
declared submission instead of a dataset table.
…y stage

Provider registrations may name a module outside the providers package.
…ery stage

Extract result submissions register per benchmark, and the exporter tells record
benchmarks from the fixed-field one by their task adapter, not by name.

@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 · 87c0a5d

No findings in this review.

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.

Run a synthetic method and benchmark through every stage of each track

1 participant