Repository navigation
refactor(scripts): prune duplicate entry points and add an inventory - #129
Conversation
Remove command scripts that a supported entry point already covers: - run_risk_control_moli.py and certify_webmainbench_case_correction.py duplicate run_certified_benchmark.py risk-control and webmainbench-correction. - freeze_headless_references.py, postcheck_headless.py and finalize_benchmark_run.py duplicate stages run_certified_benchmark.py runs itself. - prepare_reference_promotion.py and promote_reference_candidate.py duplicate the documented python -m harness.web_fetch.reference_freeze subcommands. - check_wcxb_report.py duplicates check_report.py, which make wcxb-release-check already uses. - check_webarena_trajectory_report.py and package_webarena_trajectory_report.py duplicate release_webarena_trajectory_report.py; remove the check_main and package_main functions they exclusively wrapped. - run_webfetch_eval.sh and plot_moli_version_resources.py wrap module entry points that run directly. Add scripts/README.md, which lists every remaining entry point and the Makefile target, guide, profile or receipt that keeps it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
lanyue-llk
left a comment
There was a problem hiding this comment.
Independent review, round 1
Reviewed head ba63219c against main 8b8aa30f.
What I verified
git grepfor every removed basename, pluscheck_main,package_mainandwcxb_report_check.main, across the whole tree (Makefile, CI, docs,.agents/,configs/,evaluation/, tests). Nothing outsidescripts/README.mdstill refers to a removed script. The only hits are module aliases intests/test_run_certified_benchmark.pyand thetests/test_finalize_benchmark_run.pyfixture path, and both are fine.- The harness functions behind the removed wrappers are still reached through supported entry points.
risk_control.main,certify_case_correction,reference_freeze.main/postcheck_mainandevidence.finalize_mainare called fromcertification.py.prepare_promotion_main/promote_mainare dispatched byreference_freeze.__main__.check_report.pysends WCXB trees towcxb_report_check.checkwhen it findswcxb-score-summary.json, which is why the newpackage_smokefixture line is needed. The removedcheck_main/package_main/mainfunctions had no other callers. - Every
.py/.shfile left inscripts/appears inscripts/README.md, and everymake <target>the inventory names exists. - Locally, ruff (both gates) passes.
pyteston golden reports, run_certified_benchmark, risk_control_optional_report, wcxb_report_check, moli chart, reference_monitoring, finalize_benchmark_run, public_webarena, cli_scope and wcxb_generation_roundtrip gives 821 passed, 3 skipped. Golden route hashes are unchanged. - CI on the head: Tests and static checks, Installation and packaging, and Rendered reference and report checks all pass.
- The issue section says "Part of #93" and lists what remains, which is accurate.
Findings
P2: scripts/README.md names authorities that do not mention the script. The README says a script stays only when the Makefile, CI, a guide, the report-template config, or a profile, certificate or receipt reaches it. It then lists that authority in the "Reached from" column. For these rows, the named file never mentions the script by basename or module path:
scripts/README.md:40: neithercertify_headless_cases.pynorproject_headless_provider.pyappears inHEADLESS.md.scripts/README.md:43:evaluation/webfetch-seven-family-430/dataset-assembly.jsondoes not nameassemble_webfetch_dataset.py.scripts/README.md:45:probe_cowagent_text.pyis backed byguide/cowagent-text-probe.json. That is an output file, not an authority, and nothing names the script. The PR body does not list this one as remaining.scripts/README.md:65:AGENTS.mddoes not nameauthorize_artifact_hub.py.scripts/README.md:73:evaluation/public-wcxb-test-qualified.jsondoes not nameselect_wcxb_sample.py. Only tests do.scripts/README.md:110:evaluation/trajectory-replay/webarena-verified/README.mddoes not namebuild_browser_use_replay_seeds.py,build_webarena_expert_seeds.py,run_webarena_trajectory_replay.pyorpromote_webarena_trajectories.py.scripts/README.md:114: the sixbuild_webarena_*_suite/_subset/finalize_webarena_adjudication.pyscripts are attributed to "Qualification decisions and immutable outputs" indocs/trajectory-replay-protocol.md. That section describes the commands only generically and never names the scripts. The PR body does not list these as remaining.build_webarena_trace_catalog.py(line 116) has no authority at all. The PR body does acknowledge it.
The PR body lists most of these as still open, but the inventory presents them as kept by an authority. A future pruning pass would read that as a reason to keep them. Fix: move every script that is not actually named into a separate section, such as "Pending owner decision (#93)", that says why it survived. Alternatively, add the script name to the owning guide in this PR. Also add rows 45 and 114 to the "remaining" list in the PR body.
P3: root keyword on the promotion entry points is now dead. src/harness/web_fetch/reference_freeze.py:529 and :670: only the deleted scripts passed root=, so the parameter is now unused and the defaults always resolve from Path.cwd(). Fix: drop the parameter, or default it to the module's ROOT (repository_root()) so that --dataset/--canonical resolve the same way the removed scripts did, wherever the command runs from.
No P0/P1 defects found.
Keep only scripts whose listed authority names them by basename or module path in the inventory tables. Move the scripts that no Makefile target, guide, template registry, profile, certificate or receipt names into a "Pending owner decision (#93)" section that records why each one survived the pruning. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y root The root keyword on prepare_promotion_main and promote_main lost its last callers with the removed wrapper scripts, so the --dataset, --canonical and --research-root defaults resolved from the current working directory. Drop the keyword and default to the module ROOT. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Review round 1 fixes:
Nothing disputed. |
There was a problem hiding this comment.
✅ Re-review complete · f52535d
No findings in this incremental review.
lanyue-llk
left a comment
There was a problem hiding this comment.
Independent review, round 2
Head reviewed: f52535db. I found no defects at P0–P3.
Round 1 follow-up
- P2 (inventory authorities): fixed. I checked every row of the main tables in
scripts/README.mdagainst the authority it names. Each script appears in that authority by basename, module path, Makefile target or (for the catalog andpropose_webarena_*rows) the pinned set incheck_track_naming.pyor the documentedscripts/propose_webarena_*.pyglob. No authority names any script in the "Pending owner decision (#93)" section, apart from tests. The PR body's remaining-work list matches that section, and the PR correctly says "Part of #93", not "Closes". - P3 (
root=keyword): fixed.prepare_promotion_mainandpromote_mainnow default toROOT = repository_root(). The new testtest_promotion_commands_default_to_repository_paths_from_any_directoryruns both commands afterchdirinto a temporary directory, so it would fail on the oldPath.cwd()defaults.
What I verified
- Inventory search: none of the 12 removed basenames appears anywhere in the repository. The only matches are local import aliases of
reference_freezeintests/test_run_certified_benchmark.pyandtests/test_finalize_benchmark_run.py, which is a different file from the removedfinalize_benchmark_run.py. Every remainingscripts/*.py|*.shfile is listed inscripts/README.md. - No scripts were renamed, and no hash-bound evidence or golden snapshots changed.
- Both ruff gates pass.
pytest tests/test_golden_reports.py tests/test_reference_promotion_outputs.py tests/test_run_certified_benchmark.py tests/test_risk_control_optional_report.py tests/test_finalize_benchmark_run.py -n 2: 61 passed, and the golden route hashes are unchanged.scripts/check_track_naming.pypasses. - CI on
f52535db: Tests and static checks, Installation and packaging, Rendered reference and report checks, Python 3.11 and OCR all pass.
Issues
Closes #93. Still open after this PR:
scripts/README.mdlists, under "Pending owner decision (Prune unreferenced and one-off migration scripts #93)", every kept script that no Makefile target, CI job, guide,configs/report-templates.jsonentry or checked-in profile, certificate or receipt names by basename or module path. Each is the sole entry to a stage a current harness module still implements. An owner still has to either name it in the owning guide or delete the stage:add_provider_results,certify_headless_cases,project_headless_provider,build_postcheck_observations,check_resource_links,select_headless_speed_cases/package_headless_speed,assemble_webfetch_dataset/_refresh,audit_fixed_native_comparison,probe_cowagent_text, the three result-review shard tools,select_wcxb_sample,run_wcxb_paired_latency,check_webmainbench_report/_full_report,authorize_/rename_/publish_browser_use_artifact_hub,use_prepared_webarena_cohort_reset, the four replay seed/replay/promotion stages,merge_webarena_replay_results, the sixbuild_webarena_*_suite/_subsetandfinalize_webarena_adjudicationqualification commands,build_webarena_trace_catalogandrun_real_smoke.sh.docs/trajectory-replay-protocol.md,WEBMAINBENCH.md,src/harness/web_fetch/README.mdor the Makefile, so none of them is removed here.Summary
I checked every script in
scripts/against the Makefile, CI, the guides,configs/report-templates.jsonand the files underevaluation/by searching for its basename and module path. Removed: entry points whose behavior a supported command already provides.run_risk_control_moli.pyrun_certified_benchmark.py risk-control(omit--executefor call-free validation)certify_webmainbench_case_correction.pyrun_certified_benchmark.py webmainbench-correctionfreeze_headless_references.py,postcheck_headless.py,finalize_benchmark_run.pyrun_certified_benchmark.pyruns these stages throughreference_freeze/evidenceprepare_reference_promotion.py,promote_reference_candidate.pypython -m harness.web_fetch.reference_freeze prepare-promotion/promote(already the documented form)check_wcxb_report.py(+wcxb_report_check.main)check_report.py --profile, used bymake wcxb-release-checkcheck_webarena_trajectory_report.py,package_webarena_trajectory_report.py(+publication.check_main/package_main)release_webarena_trajectory_report.py(make public-webarena-report), which checks and packages the bundle itselfrun_webfetch_eval.shuv run --frozen python -m harness.web_fetch runplot_moli_version_resources.pyuv run --frozen python -m harness.lexbench.chartsThe harness functions behind the first five rows are still in use, because
certification.pycalls them. Only the wrappers were exclusive, so only the wrappers are removed.Other changes:
scripts/README.md. It lists every remaining entry point next to the authority that names it, keeps unnamed entry points in a separate pending section with the reason each survived, and states the rule for adding and removing entry points.reference_freeze.prepare_promotion_main/promote_mainlose theroot=keyword that only the removed wrappers passed; their path defaults now resolve from the repository root instead of the current directory.package_smokeruns the WCXB release rejection throughcheck_report.py. The risk-control call-free CLI test usesrun_certified_benchmark.py risk-control. The certification--helpparametrization drops the two removed duplicates.src/harness/web_fetch/README.md(reference promotion) andscripts/moli_report/BUILD.md(charts).Repository inventory: a search for each removed basename, module path,
check_mainandpackage_mainfound no remaining references. The only matches are local import aliases intests/test_run_certified_benchmark.pythat bind thereference_freezemodule. Every file left inscripts/appears in the inventory.Test plan
ruff check --config 'include=["*.py"]' --select F,TID252 .andruff check: pass.pytest tests/test_golden_reports.py tests/test_run_certified_benchmark.py tests/test_risk_control_optional_report.py tests/test_risk_control_dataset.py tests/benchmarks/test_checkout_entrypoint_precedence.py tests/test_runtime_entrypoints.py tests/test_remaining_public_boundaries.py tests/test_wcxb_report_check.py tests/test_wcxb_publication.py tests/test_moli_version_resource_chart.py tests/test_reference_monitoring.py tests/test_finalize_benchmark_run.py tests/test_webmainbench_report_authority.py tests/trajectory_replay/public_webarena tests/test_cli_scope.py: 934 passed, 4 failed. Golden route hashes are unchanged.test_risk_control_dataset.py. They happen only because this worktree is nested inside another checkout:reference_inputswalks parent directories and finds the outer checkout'sevaluation/lexbench-webfetch.json. The same tests pass on an unnested export of main.package_smoke.verify_release_check_helpersandverify_public_trajectory_publicationdirectly against the source tree: pass.pytest tests -n 2) on macOS: 18729 passed, 67 failed. I can't separate these from the local setup here. The failures include the 14 known failures on unmodified main and the nested-worktree reference-input failures above. Most of the rest are in subprocess-based runner, call-log and markdown-converter tests that load the shared venv's installedharnessrather than this checkout. None of the failing tests touches a removed script or function.pytest tests/test_reference_promotion_outputs.py tests/test_golden_reports.py tests/test_reference_lifecycle.py tests/test_freeze_headless_references.py tests/test_run_certified_benchmark.py -n 2: 141 passed. The newtest_promotion_commands_default_to_repository_paths_from_any_directoryruns both commands from a temporary directory and checks the defaults.Tests and static checks,Installation and packaging(runspackage_smoke) andRendered reference and report checks: all pass.🤖 Generated with Claude Code