Skip to content

build(packaging): bundle package data and move package gate to Python - #135

Merged
lanyue-llk merged 9 commits into
mainfrom
refactor/packaging-makefile-hygiene
Nov 3, 2026
Merged

lanyue-llk merged 9 commits into
mainfrom
refactor/packaging-makefile-hygiene

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

What, why and how of this PR

Issues

Closes #106. Remaining:

  • Renaming the distribution and the harness import package, and aligning package.json: owner decision pending in Refactor roadmap: open-source code quality and English-first source #87.
  • Replacing the inline commands in .github/workflows/ci.yml with make package-check/make browser-check only, and updating .github/workflows/README.md: the token has no workflow scope. make ci-tests picks up ShellCheck without a workflow edit.
  • Shrinking the 5.9 MB of methodology PNGs in the wheel: the renderer still reads them as package data.

Summary

Package data. [tool.setuptools.data-files] is gone. The seven root-level files now install under harness/distribution_data/ and are read through importlib.resources by one helper, bundled_data_path. No repository path moves, so no hash-bound or profile-named path changes. pyproject.toml and uv.lock cannot live inside a package, so a small setup.py build_py step copies the list declared in tool.browser-eval.bundled-data, and MANIFEST.in keeps those files in the sdist. verify_package_tree now treats them as part of the exact package inventory.

Python policy. requires-python stays >=3.11, with no upper limit. 3.11 is the real minimum, checked on Python 3.10.22: the locked dependencies do not resolve (webarena-verified, numpy, scipy, networkx, Pint, Markdown and rpds-py require 3.11), and the code uses tomllib, datetime.UTC and hashlib.file_digest, none of which exist in 3.10. All 473 source files parse as 3.10 syntax, so the failure is in the standard library and dependencies, not the syntax. This PR removes the untested "3.11–3.14" README claim: the READMEs now say 3.11 or newer is required and that CI tests 3.11. Versions above 3.11 are allowed but not tested here. The lowest 3.11 patch release was not tested; CI uses the latest 3.11.

uv.lock is unchanged from main.

Package gate. The inline shell moved to harness/package_gate.py behind scripts/check_package.py, with the version read from .python-version. It also runs the base CLI and report-language check that CI otherwise only has inline. It strips VIRTUAL_ENV, PYTHONHOME and PYTHONPATH, since it now runs under uv run.

Makefile.

  • One .PHONY block.
  • help (now the default goal; plain make used to run setup), clean and format.
  • Required profiles fail with one clear message instead of passing --profile "". No default is possible: report instance profiles live outside Git and evaluation/current-report.json no longer exists.
  • make ci now runs ci-tests, package-check and the new browser-check, matching the CI jobs.
  • make format needs explicit FILES: 147 files are not Ruff-formatted, and scorer modules must keep their published source hashes.

Platform capabilities. harness/platform_capabilities.py owns sandbox-exec, top -l, memory_pressure and the native DNS bridge, and raises MacOSRequiredError naming the feature. It subclasses ValueError, so existing handlers keep working.

The issue overstated two items. ps -axo and fcntl work on Linux and already run there in CI, so they stay as they are.

ShellCheck. make shell-check covers deploy/**/*.sh and is part of ci-tests, so it runs on the CI runner's ShellCheck.

The issue's review_guidelines.py claim is out of date: neither CI nor the repository references that script now.

Test plan

Local, initial implementation (macOS, shared locked environment; later rounds are listed below):

  • Lint gate: passed.
  • tests/test_packaging_hygiene.py (new, with negative controls): 34 passed at this point; 35 on the final head.
  • tests/test_golden_reports.py, plus package contents, runtime entry points, report language, release metadata, CI gate, README navigation and source language tests: 201 passed, 1 skipped, 4 failed. The 4 are the tests/test_ci_gate.py failures already listed as known on this host. Golden route hashes were unchanged at this point; see the review round below for the three routes that have since changed.
  • Full suite with -n 2: stopped at its failure limit, with 65 failed and 16008 passed, so it is not a complete local result. I re-ran the nine failing files: the failures trace to Historical benchmark source is not recorded in the dataset lock, the nested-worktree lookup described below. CI below is the full-suite result.
  • uv build produced a wheel and sdist. Unpacking the wheel outside the checkout, verify_package_tree, verify_bundled_data and each migrated reader (provider registry, regression registry, public WebArena inputs, source_path("uv.lock")) all resolved to the packaged copies. The wheel has no .data/ entries and declared the earlier upper limit at that commit; the limit has since been removed.

Not verified locally:

  • Full make package-check: pip installs were out of bounds in this environment, so only the gate's command sequence is covered, with a fake runner. CI "Installation and packaging" is the real check.
  • Base CLI check: it fails from this nested worktree because the reference-input lookup walks up into the parent checkout's older evaluation/lexbench-webfetch.json. That is unrelated to this change; CI runs it from a normal checkout.
  • ShellCheck: it did not run on this machine. A downloaded binary was blocked by the local permission policy and removed unused. CI ran make shell-check on the runner's ShellCheck and reported no findings, so deploy/ needed no edits.
  • make browser-check: the target itself has not been run. CI's browser job still uses its inline commands, and a test keeps the target's pytest file list equal to that job's.
  • macOS capability errors on another host: covered by synthetic tests with the platform patched.

CI on the final head, 7fead61: all jobs passed.

  • Tests and static checks: 18829 passed, 157 skipped.
  • Installation and packaging: passed, including the real sdist, wheel and optional-profile installs.
  • Rendered reference and report checks: passed.

Local runs by review round (macOS, focused targets; the full suite is left to CI):

  • Round 1, head 01c6205: lint gate passed; tests/test_packaging_hygiene.py, tests/test_golden_reports.py and tests/test_webmainbench_latency_diagnostic.py: 52 passed.
  • Round 2, head 440e610: lint gate passed; tests/test_packaging_hygiene.py, tests/trajectory_replay and tests/test_golden_reports.py: 2094 passed, 5 skipped.
  • Round 3, head 7fead61: lint gate passed.
    • tests/test_packaging_hygiene.py: 35 passed.
    • tests/test_packaging_hygiene.py, tests/trajectory_replay and tests/test_golden_reports.py: 2094 passed, 5 skipped. Golden route hashes did not change in rounds 2 or 3.
    • Package contents, runtime entry points, public report language, release metadata, CI gate, README navigation, source language and latency diagnostic tests: 167 passed, 1 skipped, 4 failed. The 4 are the same known tests/test_ci_gate.py failures on this host; they pass on CI.

Golden route changes

Regenerated with UPDATE_GOLDEN=1 in d9d40f5. Each change only adds the profile that the Make target requires; no measured value changes.

  • webmainbench-sample: reproduce/index.html and en/reproduce/index.html now show make public-benchmark-report PROFILE=<profile> EVIDENCE=<corrected-evidence>.
  • web-fetch: report-manifest.json embeds the report template registry, whose check command is now make report-check PROFILE=/absolute/instance-profile.json.

The same correction to the two reproduction strings at src/harness/web_fetch/report.py:2944 and :2946 changes no golden route, because no snapshot fixture renders them. They take effect at the next rebuild of a report that uses those branches.

Replace deprecated setuptools data-files with harness package data read through
importlib.resources; repository paths named by bindings do not move. Pin Python
to the 3.11 that the lock and CI test, tidy the Makefile, add one macOS capability
module and run ShellCheck on deploy scripts.

@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 · 96e0575

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 96e05753. I found no correctness bugs. There are two documentation defects and one nit.

Findings

P2: src/harness/web_fetch/HEADLESS.md:351-352, src/harness/web_fetch/README.md:456: documented commands are now rejected

  • Problem: both guides still say make report EVIDENCE=/absolute/path/to/evidence, and HEADLESS.md also says make report-check. Neither passes PROFILE, so both now stop with PROFILE=/absolute/path/to/profile.json is required. On main they did not work either: --profile "" became Path("."), which build_report.py then tried to read as a file (from reading the code, not run). This PR makes PROFILE an explicit contract, so these guides should follow it.
  • Fix: add PROFILE=/absolute/path/to/profile.json to these commands. src/harness/web_fetch/report.py:2944 and :2946 render the same commands into the reproduction section. Fix those too and explain any golden route change, or list them under "Remaining" in the PR body.

P2: examples/trajectory_replay/README.md:16: stale Python claim

  • Problem: it still says "Python 3.11+", while requires-python is now >=3.11,<3.12. The PR body says the untested wider claim was removed. test_python_policy_agrees_across_project_lock_and_ci checks only the root README and docs/README.zh-CN.md, so it misses this file.
  • Fix: change the text to "Python 3.11", and consider adding this README to the test's list.

P3: src/harness/web_fetch/webmainbench_latency_diagnostic.py:506: sandbox command assembled by hand

  • Problem: this is the only caller that imports the raw SANDBOX_EXEC constant and builds [path, "-p", profile, ...] itself. There is no functional bug, because verify_loopback_sandbox at line 492 goes through sandbox_exec_command first and stops an unsupported host. It does leave a second copy of the command shape that platform_capabilities is meant to own.
  • Fix: use [*sandbox_exec_command(LOOPBACK_SANDBOX_PROFILE), str(binaries[version]), ...]. The argv stays the same.

What I verified

CI on 96e05753: all jobs passed. The log shows make ci-tests running find deploy -name '*.sh' -exec shellcheck {} +, which covers two scripts, and 18828 passed, 157 skipped. "Installation and packaging" ran scripts/check_package.py under uv 0.7.8.

Local runs (macOS):

  • The lint gate passed.
  • tests/test_packaging_hygiene.py, golden, runtime entry point, network DNS, native DNS, portable CLI, method registry, latency runtime and headless tests gave 219 passed and 1 failed. The failure, test_converter_shared_and_nonzero_not_converted, is on the known local failure list.
  • tests/test_golden_reports.py gave 10 passed, and tests/golden/ is not in the diff.

Package data:

  • uv build produced a wheel with no .data directory, the seven files under harness/distribution_data/, and Requires-Python: <3.12,>=3.11.
  • The sdist contains setup.py, MANIFEST.in and the bundled inputs.
  • With the wheel unpacked outside the checkout, source_path("uv.lock"), regression_registry_path(), _report_input() and the provider registry all resolved to the packaged copies.
  • The four copies I compared byte for byte match the repository: uv.lock, pyproject.toml, configs/providers.headless.json and scoring-regressions.json.

uv.lock, compared package by package against base:

  • Only numpy 2.5.3, scipy 1.18.1 and httpx2-jsfetch 1.0 were removed, and nothing was added.
  • Retained wheels keep their hashes. The removed wheels are all for Python 3.12 or later, including GraalPy 3.12 builds.
  • uv lock --check passes under uv 0.13.0. I did not run it under CI's uv 0.7.8. CI only shows that version reading the lock with --frozen.

Hash bindings:

  • No file under evaluation/ or configs/ binds uv.lock, pyproject.toml or the changed modules by hash.
  • capture_source_identity and the frozen_source checks detect drift within a single run. verify_certifier_source checks a frozen artifact, not the live module.
  • collection_implementation in web_search/runner.py hashes uv.lock, pyproject.toml and harness/distribution.py, so a Web Search cohort interrupted before this PR must start again rather than resume. That is the check's intended behaviour for any change to those files.

Semantics of swapped helpers:

  • The sandbox argv is unchanged on macOS, and sandbox_exec_available matches the old check.
  • MacOSRequiredError is a ValueError, so existing handlers still catch it. _execution_browser_method_registry still returns {} when the data is absent.
  • Workers that import network_dns run with the harness root on the path, so the new harness.platform_capabilities import resolves. test_cowagent_isolation is on the known local failure list, so CI is the evidence for that case.

Makefile (GNU Make 3.81):

  • make format without FILES exits 2, and make report without PROFILE exits 2.
  • make -n clean touches only build outputs and caches.
  • BSD find returns non-zero when a -exec ... + command fails, so shell-check would fail correctly on macOS too. ShellCheck is not installed here, so CI is the only evidence of a clean run.

Scope: "Part of #106" is accurate. The rename, the workflow edits and the methodology PNGs are listed as remaining, and review_guidelines.py no longer appears in the repository.

Not verified by me:

  • make browser-check was not executed, by me or by CI. I only read its recipe, and tests/test_packaging_hygiene.py compares its test paths with the CI job.
  • make package-check was not run locally. The CI job is the evidence for it.

Pre-existing, not caused by this PR: examples/web_fetch/docker/resource.Dockerfile copies harness, but the repository has no root harness/ directory, so that image cannot build on main either.

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

No findings in this incremental review.

@lanyue-llk
lanyue-llk force-pushed the refactor/packaging-makefile-hygiene branch from d3ec9fb to 01c6205 Compare November 2, 2026 05: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 · 01c6205

No findings in this review.

lanyue-llk added a commit that referenced this pull request Nov 2, 2026
@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 1 fixes, on head 01c6205. No finding is disputed.

Fixed

  • P2, report commands without PROFILE (d9d40f5): added PROFILE= to HEADLESS.md, src/harness/web_fetch/README.md and report.py:2944 and :2946. The same stale form also appeared in two places the finding did not list, so those are fixed too: make public-benchmark-report at report.py:3766 and the check command in configs/report-templates.json. A new test derives the targets that require a profile from the Makefile and checks every tracked Markdown file, config and harness module, with negative controls.
  • P2, Python 3.11+ in the replay guide (0febd3f): now Python 3.11. The policy test now scans all tracked Markdown for that claim instead of a list of READMEs.
  • P3, hand-built sandbox command (01c6205): webmainbench_latency_diagnostic.py now uses sandbox_exec_command, and no caller outside platform_capabilities imports SANDBOX_EXEC.

Worth checking in the P3 fix. The finding described this as argv-only, but it does change one test-visible behavior: sandbox_exec_command raises on a non-macOS host, and two paired-call tests had been running on Linux with a mocked subprocess. They failed on CI on d3ec9fb. The product code is unchanged by that failure. The tests now set up a synthetic macOS host and sandbox binary at the capability boundary, and they assert the sandbox prefix on every call.

Golden routes changed

  • webmainbench-sample: reproduce/index.html and en/reproduce/index.html, for the public-benchmark-report command.
  • web-fetch: report-manifest.json, which embeds the template registry.

Each change only adds the required profile; no measured value changes. The report.py:2944 and :2946 strings change no golden route because no snapshot fixture renders them, so that output has not been checked in a rendered page.

CI on 01c6205: all jobs passed. Tests and static checks: 18829 passed, 157 skipped. Installation and packaging: passed.

@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 01c6205c. All three round 1 findings are fixed. I found no correctness bugs. Two leftovers remain from the same classes as round 1: one P2 and one P3.

Findings

P2: src/harness/trajectory_replay/report.py:1226: a rendered report still claims "Python 3.11+"

  • Problem: _appendix_page, reached through write_latest_report from trajectory_replay/runner.py, tells readers to prepare Python 3.11+. I called it and confirmed that the output contains the string. This is the claim the PR body says it removed, and examples/trajectory_replay/README.md, the guide for the same run.sh, now says "Python 3.11". test_python_policy_agrees_across_project_lock_and_ci scans only tracked *.md, so it misses renderers.
  • Fix: change the text to Python 3.11 and extend the policy scan to src/harness/**/*.py. Do not scan frozen data: evaluation/webfetch-seven-family-430/case-corrections.json contains the same string as a quotation from a source page and must stay. If a golden route changes, explain it in the PR body.

P3: src/harness/trajectory_replay/public_webarena/release.py:91,96: printed commands omit the required profile

  • Problem: the script tells the operator to run make public-webarena-report-audit and make public-webarena-report-release. Both targets now stop with PROFILE=... is required. test_documented_make_commands_name_the_required_profile misses these because it only checks segments that start with make , and these commands sit inside a sentence.
  • Fix: print the commands with PROFILE=<the --profile value>. The script already holds that value in CURRENT.

What I verified

  • CI on 01c6205c: every job passed. Tests and static checks: 18829 passed, 157 skipped. The log shows find deploy -name '*.sh' -exec shellcheck {} + running inside make ci-tests, and the job passed. The package job's make package-check step ran through to the installed-wheel smoke result.
  • Local (macOS, shared locked environment): lint gate passed. tests/test_packaging_hygiene.py, tests/test_golden_reports.py, tests/test_webmainbench_latency_diagnostic.py, tests/test_webmainbench_latency_runtime.py, tests/test_network_dns.py and tests/test_runtime_entrypoints.py: 109 passed.
  • Lock: a package-by-package comparison with main shows only numpy 2.5.3, scipy 1.18.1 and httpx2-jsfetch 1.0 removed and nothing added. Sources, sdists and retained wheels are unchanged, and no cp311, abi3 or pure-Python wheel was dropped. uv lock --check --offline (uv 0.13.0) resolved 178 packages and left the tree clean.
  • Package data: no installed_data_path or share/browser-harness-eval reference remains. I compared the reader swaps in distribution.py, methods.py, webmainbench_correction.py and public_webarena/report.py with the old code. ROOT and repository_root() resolve the same way. The one difference is in methods.py: a missing file in an installed package now returns {} rather than raising, and the exact-inventory check in verify_package_tree covers that case.
  • Hash bindings: the base-commit SHA-256 of each changed source file I checked, plus pyproject.toml, uv.lock and Makefile, appears nowhere in tracked files, so no committed binding names those bytes. Evidence outside Git was not available to check. The hashes recorded by webmainbench_runner, the latency diagnostic, the latency correction, rescoring and review_execution are run-time records; I read their comparisons in the first three and found they are within a run or against the frozen certifier registry. One intended effect: web_search.runner.collection_implementation includes uv.lock, pyproject.toml and harness/distribution.py, so an interrupted Web Search cohort cannot resume across this PR and must start again.
  • Package gate: the command sequence matches the removed shell. PATH still contains the checkout's .venv/bin under uv run. I found no smoke or harness lookup that resolves a project Python through it, so this is not a finding.
  • Makefile: one .PHONY block, make prints help, a missing profile stops with the clear message, and make -n ci lists the same checks as the CI jobs.
  • macOS capabilities: sandbox_exec_command produces the same argv as the old literal, and no raw sandbox-exec, top -l or memory_pressure call remains outside the capability checks, apart from the frozen certifier copies under data/latency-certifiers/.
  • Scope: "Part of #106" is accurate, and its Remaining list covers what is left. review_guidelines has no references in the repository, as the PR says.

Not run: make browser-check and a full local make package-check. The PR body already discloses both.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Round 2 findings, fixed on the new head.

  • P2, stale Python 3.11+ in the replay appendix (15116199): harness.trajectory_replay.report._appendix_page now says Python 3.11, which I confirmed by calling it. test_python_policy_agrees_across_project_lock_and_ci now also scans src/harness/**/*.py. It still skips evaluation/, so the source-page quotation in case-corrections.json stays as it is. Restoring the old string makes the test fail. No golden route changed, because this renderer has no snapshot in tests/test_golden_reports.py.
  • P3, release hints without a profile (440e6105): public_webarena/release.py now prints make public-webarena-report-audit PROFILE=<--profile value> and the matching -release command, shell-quoted. test_stage_builds_report_without_mutating_source_evidence checks the printed output. A new scan, profileless_make_commands_in_code, covers src/harness/**/*.py and scripts/*.py, so a command in the middle of a message is caught as well. Removing the profile from the messages makes both tests fail.

Nothing disputed.

Run locally: ruff gate passes; tests/test_packaging_hygiene.py, tests/trajectory_replay and tests/test_golden_reports.py give 2094 passed, 5 skipped. The full suite is left to CI.

@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 · 440e610

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 440e6105. Both round 2 findings are fixed. I found no correctness bugs. Two P3 items remain: leftover code in one module and a stale test plan in the PR body.

Findings

P3: src/harness/trajectory_replay/public_webarena/report.py:15,19: superseded code left behind

  • Problem: ROOT = repository_root() (line 19) was used only by the old _report_input. After the move to bundled_data_path, nothing in the module reads ROOT, so the variable and the repository_root import exist only for each other. I found no other module or test that reads report.ROOT. Ruff does not flag an unused module variable. AGENTS.md asks for superseded code to go in the same change.
  • Fix: delete line 19 and drop repository_root from the import on line 15.

P3: PR body, "Test plan": results stop before the current head

  • Problem: the CI line names 01c6205c, the local section covers only review round 1, and it still says tests/test_packaging_hygiene.py has 34 tests (it has 35 now). Nothing there is false, but the body does not report what was run on the commits from round 2 onward.
  • Fix: update the CI line and the counts to the final head, and add the round 2 and later local runs.

What I verified

  • CI on 440e6105: all checks pass. Tests and static checks: 18829 passed, 157 skipped. Installation and packaging passed. The log shows find deploy -name '*.sh' -exec shellcheck {} + running on the runner with no findings.
  • Local on 440e6105 (macOS): lint gate passed. test_packaging_hygiene, test_golden_reports, test_webmainbench_latency_diagnostic, test_trajectory_release and test_runtime_entrypoints: 80 passed.
  • Round 2 fixes: the appendix text is corrected, and the policy scan covers src/harness/**/*.py. release.py prints quoted PROFILE= commands, and the test checks the printed output. I did not repeat the negative controls.
  • Packaging:
    • uv build produced a sdist and a wheel. The sdist contains setup.py, MANIFEST.in and the six bundled inputs (setuptools adds pyproject.toml).
    • The wheel has all seven files under harness/distribution_data/, no .data/ entries, and Requires-Python: <3.12,>=3.11.
    • From the unpacked wheel, outside the checkout, bundled_data_path and source_path("uv.lock") resolve to the packaged copies, and a missing name raises FileNotFoundError.
    • No installed_data_path or share/browser-harness-eval references remain.
  • Lock: the package-by-package comparison confirms the PR body. Only numpy 2.5.3, scipy 1.18.1 and httpx2-jsfetch 1.0 were removed, nothing was added, and retained sdist hashes are unchanged. Each retained package's wheel entries are a subset of the old ones.
  • Hash bindings: I searched evaluation/, configs/, research/, tests/ and src/ on main for the SHA-256 of every file this PR changes and found no matches. capture_source_identity and the Web Search collection_implementation hash network_dns.py, distribution.py, uv.lock and pyproject.toml. Their comparisons are within a run or against a resumed cohort's own contract, so an interrupted Web Search cohort cannot resume across this change and must start again. Evidence stored outside Git was not checked. The historical latency certifier snapshots are unchanged.
  • Golden changes: only the three routes explained in the PR body changed.
  • Makefile: make prints help. make report-check without a profile stops with exit 2 and the stated message. Optional-profile targets are unchanged. No remaining command in tracked files omits a required profile, apart from prose mentions in scripts/README.md and .agents/skills/benchmark-report/references/evaluation-design.md.
  • Python policy: no 3.11+, 3.12 or 3.14 support claim remains. scripts/bootstrap_oss_baselines.sh (3.11.12) and the Docker base image (python:3.11) satisfy the new range.
  • Issue scope: "Part of #106" is correct, and the Remaining list matches what is left. review_guidelines.py is no longer referenced in the repository.

Not verified

  • I did not run the real make package-check or make browser-check, because uv run and pip installs are out of bounds here. CI covers the package gate. make browser-check itself remains unrun, as the PR body says.
  • ShellCheck did not run locally; only the CI run above covers it.

Existing issues outside this PR

These are on main too, so I am not raising them as findings:

  • src/harness/web_fetch/report.py:1254 renders make public-benchmark-research, and the Makefile has no such target.
  • examples/web_fetch/docker/resource.Dockerfile:123 copies harness, but the package now lives under src/.

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

No findings in this incremental review.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 3 fixes, on head 7fead61. Nothing disputed.

  • P3, unused ROOT (7fead61): removed ROOT = repository_root() and the repository_root import from public_webarena/report.py. No test added, since this removes dead code and changes no behavior. A search of src, tests and scripts found no reader of report.ROOT, and the existing report tests still pass.
  • P3, stale test plan in the PR body: the CI line now names 7fead61, the hygiene test count is 35, and the local runs for rounds 1 to 3 are listed separately. This is a PR body edit, so it has no commit.

Local: the lint gate passes. tests/test_packaging_hygiene.py, tests/trajectory_replay and tests/test_golden_reports.py give 2094 passed, 5 skipped, with no golden route changes. The wider focused set gives 167 passed, 1 skipped and 4 failed; the 4 are the known tests/test_ci_gate.py failures on this host.

CI on 7fead61: all jobs passed. Tests and static checks: 18829 passed, 157 skipped. Installation and packaging and the rendered report checks also passed.

@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: 7fead61. No defects found. The round 1 to 3 fixes are in place, and I found nothing new.

CI on this head

All jobs passed in run 41397652191, and I read the log.

  • Tests and static checks: make ci-tests, 18829 passed, 157 skipped. The log shows find deploy -name '*.sh' -exec shellcheck {} + running, and it reported no findings.
  • Installation and packaging: make package-check ran through scripts/check_package.py, covering the sdist, wheel and all three optional-profile smoke runs.
  • Rendered reference and report checks: 81 passed, 1 skipped.

Local runs (macOS, shared locked environment)

  • Lint gate: passed.
  • tests/test_packaging_hygiene.py, test_golden_reports.py, test_runtime_entrypoints.py, test_webmainbench_latency_diagnostic.py and tests/trajectory_replay/public_webarena: 744 passed, 3 skipped.
  • test_package_contents.py, runtime entry points, report language, release metadata, README navigation, source language, latency runtime and golden tests: 156 passed, 1 skipped.
  • uv build: the wheel has no .data/ entries and holds the seven files under harness/distribution_data/. The sdist contains setup.py, MANIFEST.in and uv.lock.
  • Wheel unpacked outside the checkout: bundled_data_path resolved all seven files to the packaged copies, including through the namespace package's multi-path traversable. The same held for source_path("uv.lock"), source_path("pyproject.toml"), the provider registry, the regression registry and the public WebArena inputs. A missing file raises FileNotFoundError; absolute, .. and empty paths raise ValueError.

Checks by area

  • Package gate. The Python gate matches the old inline shell step for step: same build, same install order, same profiles. The Python version now comes from .python-version. The parent uv run variables are stripped.
  • Readers. _execution_browser_method_registry still returns {} when the file is absent, and a symlink still raises. No references to installed_data_path or share/browser-harness-eval remain. ROOT in webmainbench_correction.py is still used.
  • Lock. I compared uv.lock package by package.
    • Only numpy 2.5.3, scipy 1.18.1 and httpx2-jsfetch 1.0 are removed, and nothing is added.
    • No retained sdist hash changes.
    • None of the 2085 dropped wheels of retained packages can install on CPython 3.11 (no cp311, py* or abi3 tags).
  • Hash bindings. No file under evaluation/, research/ or src/harness/web_fetch/data/ changes. The main-branch SHA-256 of each changed non-test file appears nowhere in the tree. The hash matches for new files are the empty-file hash, which is not a binding. Runtime hashes such as runner_sha256 and runtime_source_sha256 are recorded per run, so this PR only changes them for new runs.
  • Goldens. There are no golden changes after d9d40f5. The three earlier route changes are explained in the PR body and only add the profile argument.
  • Makefile.
    • .PHONY equals the target list, and make help lists every target.
    • Required-profile, DIAGNOSTIC_PROFILE, WEBMAINBENCH_PROFILE and FILES errors fire before any tool runs.
    • The only remaining profile-less mentions outside the frozen paths are scripts/README.md index rows naming targets, which are not commands to run.
  • macOS capabilities. Callers now go through platform_capabilities. The remaining sys.platform branches in safety.py are optional path and copy behaviour, not requirements. In the paired diagnostic, the sandbox command is built before the timer starts.
  • Python policy. pyproject.toml, the lock, .python-version, CI, the Dockerfile's Python 3.11 base image and the docs agree. examples/*/run.sh go through uv run --frozen.
  • Scope. "Part of #106" is accurate, and the remaining work is listed. review_guidelines.py no longer appears anywhere in the repository, as the PR says. .github/workflows/ is untouched.

Not exercised

  • make browser-check: the target itself was not run, only compared with the CI job's file list. The PR body says the same.
  • ShellCheck locally: it is not installed on this machine, so CI is the only ShellCheck result.

lanyue-llk added a commit that referenced this pull request Nov 2, 2026
Python 3.10 cannot run this project: webarena-verified, numpy, scipy and
others require 3.11, and the code uses tomllib, datetime.UTC and
hashlib.file_digest. Nothing requires an upper limit, so restore the
lock file from main and state the floor in both READMEs.

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

No findings in this incremental review.

lanyue-llk added a commit that referenced this pull request Nov 3, 2026

@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 · 03d2881

No findings in this review.

@lanyue-llk
lanyue-llk merged commit a26f6ed into main Nov 3, 2026
7 checks passed
@lanyue-llk
lanyue-llk deleted the refactor/packaging-makefile-hygiene branch November 3, 2026 05:11
@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Why tests/golden/web-fetch.json moved when main was brought in (head 03d2881).

Only one route changed: report-manifest.json, now 963a7b07.... That route embeds configs/report-templates.json, and both sides edited the registry: #134 renamed the Artifact Site scripts and this PR added PROFILE= to the check command. Each side had regenerated the hash from its own registry, so the two hashes conflicted and neither was right for the merged file.

I checked this with an independent rebase. Regenerating on the merged registry changed that one route. In the normalized manifest, reverting only the string make report-check PROFILE=/absolute/instance-profile.json gave 93950caa..., which is exactly main's hash. So no measured value or other rendered content moved.

The rebase produced tree 4bb580d1, the same tree as 03d2881. Its focused tests and golden checks passed: 81 passed. That rebase was not pushed, because 03d2881 reached the branch first.

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.

Packaging, Makefile and CI hygiene

1 participant