Skip to content

Web Extract: benchmark-declared fields and one renderer #324

Done

Description

@lanyue-llk

Part of the convergence on the repository specification (#313). Rules: 1, 3, 7. Size: L.

Problem

Product-extraction semantics and a default benchmark run through shared Extract code, and the report module carries parallel renderers.

  • PRODUCT_FIELDS = ("price","sku","availability") (web_extract/pipeline.py:39) is used in analysis.py:11, 184-194 and restated in review.py:26; the reviewer prompt hardcodes product semantics (review.py:1417-1430).
  • Default-benchmark branches: pipeline.py:209, 283, dataset.py:108, 114, certification.py:349, analysis.py:71.
  • report.py (6,167 lines) has a product build (:2888-3724) and a record-cohort build_record_cohort (:4840-5711), each with its own checker (:3917, :5711), plus report_suite.py; mode dispatch at :2892-2897, 3921-3926.
  • model_comparison.py (613 lines) is a one-off diagnostic with its own collector.

Direction

Extend the existing BENCHMARKS adapter interface (dataset.py:76) with fields, review prompt and analysis controls. Treat the product task as a record schema with three fields and render both through one renderer with a task-shape hook. Remove default-benchmark branches in favour of adapter capabilities.

Done when

  • One build and one check path in report.py.
  • No product field name or benchmark name outside benchmark adapters.

Paths are relative to src/harness/ unless prefixed; 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 after #348: one build and one check path through REPORT_SHAPES (product, record cohort, suite). Remaining: the product and record renderers are still two bodies (~830 and ~870 lines); report.py and analysis.py still spell out product field names. Converge them on the shared report template (#337, #331).

  3. lanyue-llk commented on Nov 24, 2026

    @lanyue-llk
    ContributorAuthor

    Status update — after #370:

    Remaining: product and record-cohort report bodies are still two data-assembly paths (needs one evidence model); Extract reproduce/changes roles declared absent; authored page bodies share the generated body slot; record cohorts still require --content (it declares participants and prices); analysis.py imports swde.record_value_key (moving it changes hash-bound swde.py); examples/web_extract/README.md still shows --content (optional now).

  4. lanyue-llk commented on Nov 24, 2026

    @lanyue-llk
    ContributorAuthor

    Done in part (#348, #370, #378): one build/check path with variants on the shared template, product fields from the benchmark adapter, data-only default build. The remaining convergence of the product and record-cohort data assembly is blocked by hash-bound swde.py/dataset.py and published manifest shapes; tracked in #379.

  5. lanyue-llk commented on Nov 25, 2026

    @lanyue-llk
    ContributorAuthor

    Reopened: the hash bindings that blocked converging the product and record-cohort report data were removed in #385/#386, so this is now doable and part of the convergence.

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