Skip to content

refactor(web-fetch): move WCXB and WebMainBench scripts to subcommands - #145

Merged
lanyue-llk merged 6 commits into
mainfrom
refactor/wcxb-webmainbench-subcommand-cli
Nov 3, 2026
Merged

lanyue-llk merged 6 commits into
mainfrom
refactor/wcxb-webmainbench-subcommand-cli

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

What, why and how of this PR

Issues

Closes #149. Part of #100. Remaining in #100: the Web Fetch, Headless and Trajectory Replay script families, scripts/moli_report/, the scripts with substantial logic, and the console-script decision.

Summary

22 WCXB and WebMainBench wrapper scripts become subcommands of the existing python -m harness.web_fetch entry point, which already owns these modules. build_report and check_report style shared scripts are not touched.

Removed script Command
select_wcxb_sample.py wcxb-select
run_wcxb_paired_latency.py wcxb-latency (also wcxb-latency certify)
score_wcxb_results.py wcxb-score
check_wcxb_visual.py wcxb-visual
publish_wcxb_artifact_site.py wcxb-publish
select_public_benchmark_sample.py webmainbench-select
score_webmainbench_results.py webmainbench-score
review_webmainbench_results.py webmainbench-review
assemble_webmainbench_evidence.py webmainbench-assemble
check_webmainbench_report.py webmainbench-check
audit_webmainbench_suspicions.py webmainbench-audit
apply_webmainbench_case_correction.py webmainbench-case-correction
rescore_webmainbench_case_correction.py webmainbench-case-rescore
correct_webmainbench_scoring.py webmainbench-scoring-correction
correct_webmainbench_teds.py webmainbench-teds-correction
review_webmainbench_teds_correction.py webmainbench-teds-review
apply_webmainbench_latency_correction.py webmainbench-latency-correction
review_webmainbench_content.py webmainbench-content-review
run_certified_webmainbench_full.py webmainbench-full-run
score_certified_webmainbench_full.py webmainbench-full-score
assemble_webmainbench_full.py webmainbench-full-assemble
check_webmainbench_full_report.py webmainbench-full-check

The router follows #139 and #143: a table in web_fetch/cli.py, the owner module resolved only when selected (the router's own top-level imports already load many owner modules, so this does not make a stage's import footprint small), and the owner parses its own arguments and --help. The existing run, report, rescore, validate and accounts commands keep strict parsing. Module entry points beside the router are removed from wcxb_dataset, wcxb_latency, wcxb_publication, webmainbench_assembly, webmainbench_case_correction and webmainbench_certification. The one script with its own parser, select_public_benchmark_sample.py, moved into public_benchmark_sample.main, with --output now required (see below).

Behavior worth reviewing

  • Latency interference guard. competing_benchmark_pids keeps matching scripts/run_webmainbench_benchmark.py. I added -m harness.web_fetch.webmainbench_runner, which is how a certified cohort starts its shards and which the guard already missed. A test covers each form and the excluded shell wrapper.
  • wcxb-publish default authority. The script defaulted --authority-root to the checkout that contained it. The router uses the module's existing default, the working directory. Run away from the checkout without the flag, it fails on the missing authority instead of guessing.
  • webmainbench-select --output is required. The script defaulted to evaluation/public-webmainbench-200.json under the checkout. The subcommand ships in the wheel, where that default would write into site-packages, so it now requires the path, as wcxb-select does. make public-benchmark-sample passes $(WEBMAINBENCH_SAMPLE), so the Make target's result is unchanged.
  • Extras in documented commands. Documented uv run forms now name the extras their stage imports, and a test checks this across the Makefile and guides.
  • Module entry points. python -m harness.web_fetch.wcxb_latency, .wcxb_publication and .webmainbench_certification were documented and no longer work. The guides now show the subcommands.

Golden snapshots changed

Three snapshots changed on purpose, because reports print these commands. Regenerated with UPDATE_GOLDEN=1.

Snapshot Routes Why
wcxb reproduce/index.html, en/reproduce/index.html Reproduction text shows wcxb-score
webmainbench-sample reproduce/index.html, en/reproduce/index.html Reproduction text shows the four new WebMainBench commands; its runner line keeps scripts/run_webmainbench_benchmark.py
web-fetch report-manifest.json The manifest embeds the template registry, whose wcxb_package command changed

Left in place on purpose

  • scripts/run_certified_webmainbench_latency.py stays because the hash-bound data/webmainbench-latency-source.json names it. That registry verifies frozen copies rather than the live file, so an owner could delete the script later; run_certified_benchmark.py webmainbench-latency reaches the same function.
  • scripts/diagnose_webmainbench_moli_tail.py and scripts/run_webmainbench_benchmark.py stay with their original bytes, and neither has a subcommand. Both hash-bound data/latency-certifiers/*.py.txt files launch the first (line 87) and match running processes against the second (line 29), and Replace WCXB and WebMainBench scripts with subcommands #149 leaves any script a bound certifier names in place. The certifier text is verified as data and not executed today, so an owner could narrow that rule later and migrate both. make webmainbench-run, the case-correction rerun, the guard and the reproduction text keep using the script. A test fails if either script disappears or another WCXB or WebMainBench script name appears in the certifiers.
  • python -m harness.web_fetch.webmainbench_runner, .webmainbench_scoring and .webmainbench_latency_diagnostic stay as internal worker entries. The certified cohort and latency correction start them as subprocesses, and webmainbench_runner and webmainbench_latency_diagnostic record their own source hash in evidence, so I did not edit them.
  • The unused root parameter stays on wcxb_scoring.main and webmainbench_diagnostics.sample_review_main, because both modules record their own source hash. It is removed from webmainbench_assembly.sample_main, wcxb_latency.main and wcxb_publication.main.
  • Shared scripts used by these tracks but also by others stay out of scope: build_report.py, check_report.py, check_report_links.py, check_report_revision.py and run_certified_benchmark.py.
  • .github/workflows needed no change; no workflow names a removed script.

Still pending under #93

wcxb-select, webmainbench-check and webmainbench-full-check are named by no guide, Makefile target or template. scripts/README.md keeps them with their purposes under "Pending owner decision (#93)", and a test requires every command to be shown by a guide or listed there.

Needs an owner check

configs/report-templates.json changed (wcxb_package). A private WCXB report-content-binding.json may declare that file's hash under authority, and load_bound_content compares that hash against the file at the authority root. No binding in Git names it, so I could not check a real one. #139 and #143 already changed this file, so any such binding would need updating regardless of this PR.

Published dataset card

src/harness/benchmarks/cards/webmainbench.md now names the subcommands. The copy on Hugging Face updates at the next dataset publication.

Reference search

Searched all tracked files for the 22 removed names: no hits. Searched the JSON, JSONL and text files in the local evidence and review directories outside Git for scripts/<removed name>.py: no hits. An earlier search for the removed harness.web_fetch.<module> entries in Markdown, JSON, YAML and the Makefile also found none. The three retained scripts are named by the hash-bound certifier files or registry, unchanged here.

Test plan

  • Lint gate (ruff with F,TID252, then the default config): passed.
  • tests/test_golden_reports.py and the new tests/test_web_fetch_owner_commands.py: 42 passed after regenerating the three snapshots.
  • Full suite, from a copy outside the nested worktree: 24 failed, 19287 passed, 60 skipped. 15 are on the known local macOS failure list and 9 are not:
    • tests/test_packaging_hygiene.py::test_documented_make_commands_name_the_required_profile, tests/test_report_software_versions.py, tests/trajectory_replay/test_hf_inputs.py and three tests/trajectory_replay/test_run_webarena_catalog.py cases failed only in the copy, which has no .git. They passed when rerun in the worktree.
    • Three tests/test_optional_reports.py cases fail in both places and also fail the same way on an unmodified export of 335217e. The tracebacks come from the shared environment's installed checkout, because the test subprocess does not inherit PYTHONPATH, so they are not regressions.
  • Full suite from the worktree itself: 66 failed. The errors I sampled are Historical benchmark source is not recorded in the dataset lock, because the worktree sits inside an older checkout whose evaluation/lexbench-webfetch.json is found first. That is why I ran the copy.
  • CI on this PR is the full-suite gate. Its result is reported on the checks below.
  • After review round 1: lint gate passed; tests/test_golden_reports.py, tests/test_web_fetch_owner_commands.py and tests/test_packaging_hygiene.py: 86 passed, no snapshot changed. The new extras test fails when the wcxb-visual extra is removed from the guide (negative control run by hand). The earlier full-suite numbers above were not rerun locally; CI is the full-suite gate for the new head.
  • After review round 2: lint gate passed; tests/test_golden_reports.py, tests/test_web_fetch_owner_commands.py, tests/test_packaging_hygiene.py, tests/test_webmainbench_sample_parent.py, tests/test_webmainbench_latency_runtime.py, tests/test_webmainbench_latency_diagnostic.py and tests/test_run_certified_benchmark.py: 149 passed. Only the two webmainbench-sample reproduce routes changed, regenerated with UPDATE_GOLDEN=1. The earlier full-suite numbers were not rerun locally; CI is the full-suite gate for the new head.
  • After review round 3: lint gate passed; tests/test_golden_reports.py, tests/test_web_fetch_owner_commands.py and tests/test_documented_paths.py: 80 passed, no snapshot changed. Removing the wcxb-select row makes the new test fail.
  • Not run: real provider calls, publication, or the --extra visual gate.

@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 · 9b923ff

No findings in this review.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 1

Reviewed head 9b923fff. No correctness defect in the routing or the migration. Three findings: one P2 and two P3, all small.

Findings

P2: new doc commands omit the extra the stage needs

  • docs/benchmarks.md:313 (wcxb-visual) and src/harness/web_fetch/README.md:1039 (webmainbench-review).
  • The old text named only the script. It now gives a full uv run --frozen python -m harness.web_fetch ... command, but these stages need packages outside the base dependencies. check_visual imports playwright (headless-eval). sample_review_main calls normalized_edit, which imports rapidfuzz (webmainbench-eval). The Makefile targets for both pass the extra. With rapidfuzz blocked, normalized_edit raises ModuleNotFoundError, so copying the documented command into an environment without the extras fails partway through.
  • Fix: add --extra headless-eval and --extra webmainbench-eval to these two commands, matching make wcxb-release-check and make webmainbench-review. The WEBMAINBENCH.md commands are not affected, because that section starts by telling the reader to install both extras.

P3: the default output of webmainbench-select can now land in site-packages

  • src/harness/web_fetch/public_benchmark_sample.py:156.
  • The old script existed only in a checkout, so its default always pointed at the checkout's evaluation/. The subcommand also ships in the wheel. There, repository_root() returns the package parent (checked: .../site-packages), so browser-harness-eval webmainbench-select --source X writes a stray site-packages/evaluation/public-webmainbench-200.json that nothing reads. wcxb-select already requires --output.
  • Fix: make --output required, have make public-benchmark-sample pass --output "$(WEBMAINBENCH_SAMPLE)", and update test_sample_selection_forwards_arguments_and_keeps_the_committed_default.

P3: the router comment describes something the module does not do

  • src/harness/web_fetch/cli.py:251: "Import on selection so a stage loads only what it uses."
  • This wording fits #139 and #143, whose routers import nothing up front. Here the top-level cli.py imports (report_build, runner, providers) already load 11 of the 19 owner modules, and sys.modules grows from 81 to 439 before routing. I measured no side effects on the environment, recursion limit, signals, warnings, logging, socket timeout, cwd or sys.path, so this is only an accuracy problem.
  • Fix: reword the comment, for example "Resolve the owner only when selected." The same claim in the PR summary could be softened too.

Verified with no defect found

  • CI: all checks on this head pass, including "Tests and static checks" and "Installation and packaging".
  • Local runs: both lint gates pass. tests/test_golden_reports.py, the new tests/test_web_fetch_owner_commands.py and the migrated WCXB and WebMainBench test files: 182 passed. I did not run the full suite locally.
  • Removed scripts: all 24 are mapped in OWNER_COMMANDS to the function the script called, and each --help comes from its owner. A search of all tracked files finds the removed names only in the hash-bound data/latency-certifiers/*.py.txt, which are verified as data and not executed. No workflow names a removed script.
  • Removed module entries: nothing tracked still starts them with -m. An old python -m harness.web_fetch.wcxb_latency ... now exits 0 without doing anything, rather than failing. That is normal for a module with no entry guard, but external automation would not get an error.
  • root arguments: the old root= value was unused in wcxb_scoring.main, sample_review_main, sample_main and wcxb_latency.main, so dropping it changes nothing. Only wcxb_publication.main used it, and that change is disclosed. Run away from the checkout, it fails on the missing input.
  • Hash bindings: webmainbench_runner, webmainbench_scoring, webmainbench_diagnostics, wcxb_scoring and webmainbench_latency_diagnostic are unchanged. No source list binds any edited module by name. Frozen certifiers are checked against their stored copies, not live files, so the guard edit does not affect them. report.py is hashed only for rescoring audit records and presentation refresh, as any renderer edit would be.
  • Golden snapshots: exactly the five disclosed route hashes changed, and each one is explained in the PR.
  • Latency guard: the new markers match the router, console-script and worker forms, and still exclude shell wrappers. The test fails without them.
  • Case correction: certify_case_correction still has no test, as the PR says. Every flag it passes is accepted by the runner's parser.
  • Scope: "Part of #100" is the right claim, and the remaining-work list is accurate. Keeping run_certified_webmainbench_latency.py matches the hash-bound source list.

Out of scope (not counted as a finding)

The reproduction text in report.py omits --profile for wcxb-score and webmainbench-assemble, although both require it. This predates the PR, which only renamed the commands. Fixing it would change the rendered routes, so it belongs in a separate change.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 1 fixes. All three findings were valid, and none is disputed.

  • P2, missing extras (febd00fc). wcxb-visual now shows --extra headless-eval and webmainbench-review shows --extra webmainbench-eval. The same gap existed in commands the finding did not list, so I fixed those too. webmainbench-scoring-correction, webmainbench-case-rescore and webmainbench-teds-correction load the official scorer, so they now name webmainbench-eval. The webmainbench-full-run, -score and -assemble bullets now name both extras, matching that section's install line and its assembly example. A new parametrized test checks these uv run forms across the Makefile and guides. It fails when the wcxb-visual extra is removed.
  • P3, webmainbench-select output (ae8806c9). --output is required and the repository_root import is gone. make public-benchmark-sample passes --output "$(WEBMAINBENCH_SAMPLE)". The test is now test_sample_selection_forwards_arguments_and_requires_an_output and also covers the missing-flag exit.
  • P3, import comment (7ae3a085). The comment now reads "Resolve the owner only when selected." The PR summary is softened the same way.

Local results: lint gate passed; golden, owner-command and packaging-hygiene tests gave 86 passed with no snapshot changes. CI on the new head is the full-suite gate.

@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.

✅ Re-review complete · 7ae3a08

No findings in this incremental review.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 2

Reviewed head 7ae3a085. CI passed on this head: "Tests and static checks", "Installation and packaging" and "Rendered reference and report checks" all succeeded.

Findings

P2: two removed scripts are named by bound certifiers, which #149 says to leave in place

Where: src/harness/web_fetch/data/latency-certifiers/34bdb7aedb25a9e5a0c64e0c549926ed7e71f747f544ec2035f65952c0177347.py.txt:87 and :29; the same lines in the 95a2f0a7... certifier.

Problem: #149 says: "Before moving a script, check whether a bound certifier or receipt names its command line. Leave any such script in place and say why in the PR." Both frozen certifiers contain the following:

  • Line 87 launches ROOT / 'scripts/diagnose_webmainbench_moli_tail.py', which is a literal command line.
  • Line 29 matches running processes against scripts/run_webmainbench_benchmark.py.

The base scripts/README.md also listed "bound latency certifiers" as a reason to keep diagnose_webmainbench_moli_tail.py.

The PR removes both scripts and still says Closes #149. Its explanation is that the certifier text is verified as data and never executed. That is accurate: verify_certifier_source only compares hashes, so nothing breaks at runtime. The registry also records each certifier's git_commit, so the scripts can still be recovered from history. But the issue makes no exception for bound text that is not executed, and the PR keeps run_certified_webmainbench_latency.py because of the same registry. So this is a decision to narrow the issue's rule, and the PR does not list it under "Needs an owner check".

Suggested fix: choose one.

  1. Restore scripts/diagnose_webmainbench_moli_tail.py, at minimum, and drop its webmainbench-latency-tail subcommand so there is only one entry. Do the same for run_webmainbench_benchmark.py if the owner reads the process marker as naming its command line.
  2. Get the owner's decision to narrow the rule to executed references, record it on #149, and move this item into "Needs an owner check" until then. Do not leave Closes #149 standing on the author's reading alone.

Round 1 fixes

All three are correctly applied:

  • Extras: static tracing of optional imports shows that normalized_edit, the only rapidfuzz importer among these owners, is called only from sample_review_main. The documented extras therefore cover the real need, and the commands left without extras do not need them on that account.
  • webmainbench-select --output: it is now required. make public-benchmark-sample passes evaluation/public-webmainbench-200.json, the same file the script defaulted to.
  • cli.py comment: reworded, and the PR summary is softened to match.

What I verified

  • Lint and tests: the lint gate passed. tests/test_golden_reports.py, test_web_fetch_owner_commands.py, test_webmainbench_report_authority.py, test_wcxb_latency_collection.py, test_packaging_hygiene.py, test_run_certified_benchmark.py and test_webmainbench_latency_runtime.py all passed. I did not run the full suite locally and relied on CI for it.
  • Router semantics: I compared all 24 removed scripts with their table entries, and each one targets the same function.
    • The owners do not record sys.argv, so the rewritten argv[0] does not reach evidence.
    • No removed script used the owner's return value as an exit code.
    • The root= arguments the scripts passed to wcxb_scoring.main and sample_review_main are unused. Only wcxb-publish changes behaviour, as the PR discloses.
  • Base install: all 24 --help commands succeed with optional packages blocked at import.
  • References: there are no hits for the 24 removed names outside data/latency-certifiers/, including .agents and .github. Nothing still launches the removed -m harness.web_fetch.<module> entries. webmainbench_runner and webmainbench_scoring, which are still launched, keep their __main__ guards.
  • Latency guard: the new markers cover the three runner entry points. The diagnostic the guard watches over does not start webmainbench_runner as a subprocess, so the new marker cannot match the guard's own run.
  • Hash bindings: no modified module's own bytes are bound. evaluation/ names none of the modified sources, and the __file__ hashes in wcxb_latency and webmainbench_latency_correction cover unchanged files or are only compared within a single run. The frozen data files are unchanged.
  • Golden snapshots: only the three disclosed snapshots changed, and the changes match the rendered commands.
  • Removed test cases: the two --help cases dropped from the parametrized script tests are covered by the owner command tests.
  • Issue line: the body says Closes #149 and Parent: #100 rather than Part of #100. #149 is the tracked sub-issue for this scope, so I do not count the wording as a defect. The Closes claim itself depends on the finding above.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 2 fix. The finding was valid, and it is not disputed.

  • P2, scripts named by frozen certifiers (76292b29). scripts/diagnose_webmainbench_moli_tail.py and scripts/run_webmainbench_benchmark.py are back with their original bytes, and the webmainbench-latency-tail and webmainbench-run subcommands are gone. I restored both rather than only the first, because the certifiers' process marker is a command-line match and the Replace WCXB and WebMainBench scripts with subcommands #149 rule makes no exception for text that is not executed. No owner decision is needed for this state, so nothing was added under "Needs an owner check".
  • Callers moved back. make webmainbench-run, the case-correction rerun, the reproduction text, docs/architecture.md, scripts/README.md and the dataset card use the scripts again. The interference guard matches scripts/run_webmainbench_benchmark.py and keeps the added -m harness.web_fetch.webmainbench_runner.
  • Tests. A new test fixes the set of WCXB and WebMainBench scripts the certifiers name, and another runs --help on each retained script.
  • Golden snapshots. Only the two webmainbench-sample reproduce routes changed since the last head, because the runner line went back to the script.

Local results: lint gate passed and 149 targeted tests passed. CI on the new head is the full-suite gate.

@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.

✅ Re-review complete · 76292b2

No findings in this incremental review.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 3

Reviewed head 76292b29. CI passed on this head: "Tests and static checks", "Installation and packaging" and "Rendered reference and report checks" all succeeded. The ocr-review entry is still waiting on background dispatch and is not one of those gates.

Findings

P3: scripts/README.md says the guides show commands they do not

Where: scripts/README.md:69

Problem: The new paragraph says the Makefile, guides and configs/report-templates.json show every WCXB and WebMainBench command. Three of the 22 are named in none of them: wcxb-select, webmainbench-check and webmainbench-full-check. Outside the router, only tests/ names them.

The PR also deleted the "Pending owner decision (#93)" rows for the matching scripts. Those rows said what each one was for: regenerating evaluation/public-wcxb-test-qualified.json, and acting as the standalone release gates for the sample and complete reports. So the two WebMainBench release gates and the WCXB sample selector now have no documentation beyond a one-line --help summary, and the #93 question about them has dropped out of the inventory.

Fix: Keep those three purposes under the commands, for example in the "Pending owner decision (#93)" section with the new command names. Then limit the "show the rest" sentence to what the guides actually cover. Naming the two release gates in WEBMAINBENCH.md near "pass its report release gate" would also work.

Verified with no defect

  • Removed scripts: there are 22, and none of the 22 names appears in any tracked file, the pinned lexbench_webfetch package, or the JSON, text and Markdown files under 2 MB in the private evidence and review directories. Larger files were not searched.
  • Retained scripts: scripts/diagnose_webmainbench_moli_tail.py and scripts/run_webmainbench_benchmark.py are byte-identical to base. The round 2 finding is resolved, and the matching webmainbench_correction.py is also back to base.
  • Removed module entries: nothing outside import statements, the router table and test patches names them. The internal workers that webmainbench_certification and the latency correction start (webmainbench_runner, webmainbench_scoring, webmainbench_latency_diagnostic) keep their entries.
  • Router semantics: I compared each old script with its table entry, including the score branch that moved to webmainbench-full-score. Only the --authority-root and webmainbench-select --output defaults changed, and the PR body discloses both. Nothing in web_fetch records sys.argv in evidence, so the rewritten argv[0] cannot reach a receipt.
  • --help: all 22 commands and wcxb-latency certify work from an unrelated directory. All but certify were also run with rapidfuzz, playwright and apted import-blocked, so help does not need those extras.
  • Hash bindings: verify_certifier_source reads only the frozen registry and artifacts, so editing webmainbench_latency_correction.py does not affect it. webmainbench_runner.py, webmainbench_latency_diagnostic.py, webmainbench_scoring.py, wcxb_scoring.py and webmainbench_diagnostics.py are unchanged. The certifier files and registry are also unchanged.
  • Process guards: the WebMainBench guard test needs the new runner marker to reach [101, 102], and it excludes the shell wrapper. The WCXB quiet-host markers never named a removed script.
  • Golden snapshots: only the five disclosed routes in three snapshots changed. The changes match the reproduction text and wcxb_package edits, and the runner line is unchanged from base.
  • Make targets: make -n shows public-benchmark-sample passing the same default path as before, and webmainbench-run using the retained script.
  • Issue claims: Closes #149 holds. The acceptance items are met, and the three retained scripts are explained in the PR body. Part of #100 lists what remains.

Local runs

  • Lint gate: passed.
  • tests/test_golden_reports.py, test_web_fetch_owner_commands.py, test_packaging_hygiene.py, test_documented_paths.py, test_webmainbench_sample_parent.py, test_webmainbench_latency_runtime.py, test_webmainbench_report_authority.py, test_wcxb_scoring.py, test_wcxb_latency_collection.py, test_run_certified_benchmark.py and tests/benchmarks/test_checkout_entrypoint_precedence.py: 278 passed.
  • Not run locally: the full suite, for which I relied on CI, and any real provider calls or publication.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 3.

Fixed in 8157572:

  • scripts/README.md claimed the guides show every WCXB and WebMainBench command, but wcxb-select, webmainbench-check and webmainbench-full-check appear in none of them. All three are now rows under "Pending owner decision (Prune unreferenced and one-off migration scripts #93)" with their purposes, and the sentence excludes them. I did not name the gates in WEBMAINBENCH.md, because that would settle the Prune unreferenced and one-off migration scripts #93 question for the owner.
  • test_every_owner_command_is_shown_by_a_guide_or_listed_as_pending checks the pending list in both directions: a command missing from the guides must be listed there, and one a guide shows must not be.

Nothing disputed. Lint gate passed; tests/test_golden_reports.py, tests/test_web_fetch_owner_commands.py and tests/test_documented_paths.py: 80 passed, no snapshot changed.

@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 skipped · 8157572

No reviewable content was selected for this run.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 4

Head reviewed: 8157572f. No defects found.

What I verified

  • Thin wrappers: I compared all 22 deleted scripts with the router table. Each one maps to the same owner function. None passed arguments other than an unused root=, except publish_wcxb_artifact_site.py, whose root set the --authority-root default. That change and the required webmainbench-select --output are both disclosed in the PR body. The Make target passes the old default path.
  • Removed parameters: no caller still passes root= to wcxb_latency.main, wcxb_publication.main or webmainbench_assembly.sample_main. root was already unused in wcxb_scoring.main and sample_review_main. It stays there because both modules hash their own source.
  • Exit status: old and new entries both discard the owner's return value, so exit behaviour is unchanged. Failures still exit through SystemExit or an exception.
  • Reference search: a git grep of the tree at this head finds none of the 22 script names, including workflows, skills, profiles and src. It also finds no -m reference to the six modules whose __main__ block was removed.
  • Latency guard: no removed script was a guard marker. The new -m harness.web_fetch.webmainbench_runner marker matches only what webmainbench_certification.py:189 starts. The latency correction's own child process is webmainbench_latency_diagnostic, so the guard does not match itself.
  • Hash-bound evidence:
    • webmainbench_latency_correction.py changed, but verify_certifier_source checks frozen copies or the receipt's own bound copy, never the live file.
    • The certifier registry and .py.txt copies are untouched, and nothing changed under evaluation/ or research/.
    • wcxb_scoring.py, webmainbench_diagnostics.py, webmainbench_runner.py and webmainbench_latency_diagnostic.py hash their own source, and none of them changed.
    • renderer_sha256 for report.py only selects a presentation refresh, and no file under evaluation/ binds it.
  • Goldens: only the routes the PR body lists changed. reproduce pages print the commands, and report-manifest.json embeds the template registry through resolve_template.
  • Imports: with the optional-extra packages blocked, cli.py and all 22 owner functions still import, so each extra is needed only when its stage runs.
  • Scope: Closes #149 holds. Each acceptance item is met: no live caller of a removed name, owner --help under the public name for every command, and golden changes explained. The three retained scripts are named by the certifiers or registry, as the issue allows. Part of #100 lists what remains.

Commands run

  • Lint gate (ruff with F,TID252, then the default config): passed.
  • tests/test_web_fetch_owner_commands.py, tests/test_golden_reports.py, tests/test_webmainbench_report_authority.py, tests/test_wcxb_latency_collection.py, tests/test_wcxb_scoring.py, tests/test_webmainbench_latency_runtime.py, tests/test_wcxb_generation_roundtrip.py, tests/test_wcxb_migration_contract.py, tests/test_wcxb_participant_registry.py, tests/test_wcxb_huggingface_inputs.py: 187 passed.
  • tests/test_documented_paths.py, tests/test_packaging_hygiene.py, tests/test_run_certified_benchmark.py, tests/test_webmainbench_sample_parent.py: 92 passed.
  • make -n public-benchmark-sample expands to the expected command.

CI at this head: all checks pass, including "Tests and static checks" and "Installation and packaging".

Not exercised: real provider calls, publication, the visual gate, or a private report-content-binding.json. The PR body already lists that binding under "Needs an owner check".

lanyue-llk added a commit that referenced this pull request Nov 3, 2026
Both hash-bound certifiers launch scripts/diagnose_webmainbench_moli_tail.py
and match running processes against scripts/run_webmainbench_benchmark.py,
and #149 leaves any script a bound certifier names in place. Restore both
with their original bytes, drop the webmainbench-latency-tail and
webmainbench-run subcommands, and move Make, the case-correction rerun, the
interference guard, the reproduction text and the guides back to the scripts.
scripts/README.md said the guides show every WCXB and WebMainBench command, but
wcxb-select, webmainbench-check and webmainbench-full-check appear in none of them.
List the three under the #93 owner decision with their purposes, limit the sentence
to what the guides cover, and test that every command is shown or listed as pending.
@lanyue-llk
lanyue-llk force-pushed the refactor/wcxb-webmainbench-subcommand-cli branch from 8157572 to de91855 Compare November 3, 2026 11:26

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

No findings in this review.

@lanyue-llk
lanyue-llk merged commit d1c2967 into main Nov 3, 2026
7 checks passed
@lanyue-llk
lanyue-llk deleted the refactor/wcxb-webmainbench-subcommand-cli branch November 3, 2026 11:36
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.

Replace WCXB and WebMainBench scripts with subcommands

1 participant