Skip to content

refactor: one track registry, generic stage make targets, instance hooks and Yours docs - #368

Merged
lanyue-llk merged 6 commits into
mainfrom
refactor/cleanup
Nov 24, 2026
Merged

lanyue-llk merged 6 commits into
mainfrom
refactor/cleanup

Conversation

@lanyue-llk

Copy link
Copy Markdown
Contributor

Purpose

Finish the cleanup leftovers of the refactor toward docs/spec.md: one track registry, generic Make stage targets, instance names out of shared Web Fetch / dataset-publication / Web Extract code, and documentation for the current command surface and moved owners. The hosting service is called Yours in reader-facing text.

flowchart LR
    subgraph Root["harness/cli.py"]
        T["TRACKS registry<br/>command, name, guide, extra, status"]
    end
    T --> D["webstone &lt;track&gt; &lt;stage&gt;"]
    T --> W["webstone tracks (agent_workflows)"]
    M["make &lt;stage&gt; TRACK=..."] --> D
    subgraph Adapters["Declared by adapters / data"]
        P["Web Fetch provider capability flags<br/>local_network, fixed_native_build_comparison,<br/>http_402_is_account_capacity, ignores_minimum_text_fragments"]
        H["Provider hooks<br/>normalize_native_http_body, launches_local_browser"]
        R["providers/native_task_routes.py<br/>engine route contracts"]
        C["Card metadata upstream_source<br/>benchmarks/headless_source.py"]
        E["ExtractMethod.projection_controls"]
    end
    S["Shared modules<br/>network_preflight, assembly, refresh_assembly,<br/>comparison_audit, native_routes, task_outputs,<br/>benchmarks/publication, web_extract scoring"] -- read flags and hooks --> Adapters
Loading

What moved or was removed

  • Give every track the same stage verbs and a fixed stage registry #316: harness/agent_workflows.py no longer keeps its own TRACKS; webstone tracks reads harness.cli.TRACKS (which gained name, guide, extra, experimental). New generic make run|score|check|package|publish|export TRACK=<track> ARGS="..."; the wrappers that only called one stage verb are removed and the release-check targets call the stages directly.
  • Web Fetch: move per-provider projection and routing into adapters #319 (Web Fetch shared modules):
    • task_outputs.require_native_task_routes (per-engine route/extractor contracts) moved to the adapter package as providers/native_task_routes.py; task_outputs keeps only the shared projections.
    • network_preflight / local_execution_contract: the guarded type set becomes the local_network capability (Moli, CowAgent), Provider.launches_local_browser(config) (headless engines that are not hosted) and RETIRED_LOCAL_NETWORK_TYPES in the provider registry for historical evidence.
    • comparison_audit: fixed_native_build_comparison flag instead of moli_webfetch.
    • assembly / refresh_assembly: ignores_minimum_text_fragments and http_402_is_account_capacity flags read from the record's provider_type instead of matching the configured name firecrawl.
    • native_routes.normalized_http_parameters(provider, case, arguments): vendor request shapes (Claude messages, Lexmount extract, Browser Use session token) are normalize_native_http_body overrides on their adapters.
    • failure_diagnosis.py is left as is: its vendor strings classify observed error text for any method, and the file is part of the offline-rescore source hash.
  • Define the benchmark adapter interface and the pipeline skeleton each track follows #338: benchmarks/publication.py has no headless-browser branch. Card metadata declares "upstream_source": "harness.benchmarks.headless_source:definitions", the same pattern as definitions_check; the loader moved to benchmarks/headless_source.py. The card header keys are unchanged.
  • Define one method adapter protocol and a self-registering registry #318: web_extract/pipeline.py projection controls are declared per method (ExtractMethod.projection_controls, kinds product/record) and check_projection_controls(kind) runs them; check_record_projection_controls is removed.
  • harness.reporting.visual -> chromium stays: reporting/visual.py is hashed into checker_sources, and visual receipts are verified against the current source, so editing it would invalidate existing receipts. The literal is a binary name for shutil.which, not an engine lookup.
  • Docs: root README and docs/README.zh-CN.md gain a short Commands section (webstone <track> <stage>, score replacing rescore, webstone webfetch compose, make <stage> TRACK=) and link docs/spec.md; rescore references in docs become score; docs/architecture.md and scripts/README.md owner tables list the moved modules; docs/provider-contract.md lists the new hooks. "Artifact Site" becomes "Yours" in docs, READMEs, skills, CLI help, .env.example and the Browser Use accounts page. Identifiers, env vars, config paths, URLs, research/report-changes.json history and the WCXB dataset card body are unchanged.

Breaking changes

  • webstone tracks: the Web Fetch entry's id is now webfetch (was web-fetch), matching webstone webfetch and --track webfetch.
  • Make targets removed: trajectory-replay-report-check, trajectory-replay-visual-check, trajectory-replay-package, trajectory-replay-publish, browser-use-visual-check. Use the new make run|score|check|package|publish|export TRACK=<track> ARGS="..." (one target per verb), or the unchanged *-release-check targets.
  • Python API: normalized_http_parameters takes the provider first; require_native_task_routes is imported from harness.web_fetch.providers.native_task_routes; check_record_projection_controls() is replaced by check_projection_controls("record").

Allowlists

  • Instance literals: 1 → 1 (harness.reporting.visual -> chromium, hash-bound, see above). Layering: unchanged (empty).
  • Scan scope not extended to Web Fetch shared modules: they would add 37 entries across about 20 modules after this PR (52 before), mostly report/WebMainBench modules owned by other lanes.

Baselines

  • tests/baselines/browser-use*.json: only the accounts page changes ("Artifact Site" → "Yours").
  • tests/fixtures/native-route-baseline.json: only the answer-selection policy digests change, because the policy source includes the edited adapter modules (same as Move Web Fetch provider projection and routing into registered adapters #349). With the policy digest masked, every route cell and normalized request parameter is identical before and after.
  • lexbench-webfetch version scoring-source hash unchanged (0fe89317…); no file under src/lexbench_webfetch/ changed.

Verification

  • uv run --frozen --all-extras python -m pytest tests -q -n 8 --dist worksteal: 22044 passed, 78 skipped, 0 failed (after rebasing on Report template contract with Web Search as the first track template #366).
  • make lint-check: passed. make docs-check: passed.
  • uv run --frozen python tests/architecture/scan.py: no allowlist growth; tests/test_architecture_*: passed.
  • tests/baselines: passed after the refresh described above.
  • uv run --frozen lexbench-webfetch version: scoring-source hash 0fe8931734e1ba7282e1e9c8303eea958d20fdcee83d84e87cdc7e08cd08169e, the same as before.
  • make -n publish TRACK=trajectory-replay ARGS="--profile p" → python -m harness.cli "trajectory-replay" publish --profile p.

Closes #316
Part of #319
Part of #338
Part of #318

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

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.

Give every track the same stage verbs and a fixed stage registry

1 participant