Repository navigation
fix(packaging): ship the Lexbench template and stop public packaging without site logins - #227
Conversation
lanyue-llk
left a comment
There was a problem hiding this comment.
Independent review, round 1
Reviewed head 96f3b02c. One finding, P2.
P2: src/harness/trajectory_replay/public_webarena/publication.py:50, the public export route still runs without site logins
Problem. export_public_report_bundle (entry point examples/trajectory_replay/public_webarena/export_public_report_bundle.py, "bundle for site assembly") writes a public bundle, but only build() got the new stop. With the logins unset, the export succeeds. public_projection skips the unset password, and the report pages are copied without a password scan. So the #160 limit, "a host without the values", remains on this route. The new text in docs/trajectory-replay-protocol.md and examples/trajectory_replay/public_webarena/README.md, "every public package is checked", therefore overstates what Closes #160 delivers.
Reproduced. I used the report fixture, with an absent credentials file and a password string added to the staged page and to artifact_provenance in the manifest:
build()raisesValueErrornamingWEBARENA_..., as intended.export_public_report_bundle()on the same input succeeds, and the string appears in bothreports/webarena-trajectory-replay-latest.htmlandrun/manifest.jsonof the output.
Suggested fix. Treat the export as packaging. Call known_site_secrets() first in export_public_report_bundle, and apply _contains_site_password to the copied pages. Add a test that the export stops with logins unset and writes nothing. If the owner prefers to leave the export alone, the docs and the PR body must name it as a third limit, not say that every public output is checked. Removing the route is also an option, since only the example and tests call it.
Verified without findings
template/*is declared as package data. An sdist built from a copy of this head lists all five template files, soMANIFEST.inneeds no change.verify_package_treederives its expected inventory frompackage-data, andverify_lexbench_packagenow readsTEMPLATE_DIRECTORYfrom the installed package.- The source-install sentence is gone from the Lexbench README, and no other text in
src/harness/lexbenchsays the template is missing from an install.
#160, packaging and publishing
known_site_secrets()returns the same values asconfigured_site_secrets()when all logins are set, so the scan does not change for a complete.env. It stops on unset or whitespace-only values.build()resolves the logins before it writes anything.publish_currentreachesbuild()throughpackage_checkbefore any request, on the new-submission, saved-submission and journal paths.release.pyskips localbuild()for a pending publish, but the publish subprocess still stops, and its error text is passed on.- The new tests would fail with
configured_site_secrets()inbuild(): packaging would succeed, and the publish tests would not raise. public_projection,stage_reportandrebuild_report.pyremain tolerant of unset logins.- The other two #160 limits are recorded in the protocol doc.
Rules
git diffshows no change to evidence, profiles, receipts, workflows or golden snapshots, and no compatibility alias or parallel implementation.uv.lockdoes not change.
Local runs
- The lint gate passed.
tests/test_golden_reports.py,tests/trajectory_replay/public_webarena,tests/browser_use/test_publication.py,tests/test_lexbench_report_runtime.py,tests/test_lexbench_cli.py,tests/test_package_contents.py,tests/test_packaging_hygiene.py,tests/environments/test_webarena_topology.py,tests/test_reporting_publish_client.pyandtests/test_local_path_privacy.py: 1037 passed, 3 skipped.- I did not run the full suite or
tests/package_smoke.pylocally. CI covers them.
CI at this head
- Tests and static checks, Installation and packaging, and Rendered reference and report checks all pass.
|
Review round 1: Fixed (P2, export route without the password stop), commit 5b0cf30. Nothing disputed. |
There was a problem hiding this comment.
✅ Re-review complete · 5b0cf30
No findings in this incremental review.
lanyue-llk
left a comment
There was a problem hiding this comment.
Independent review, round 2
Head reviewed: 5b0cf306. No defects were found.
Round 1 finding. Fixed. export_public_report_bundle now resolves the logins first and scans the copied pages before it creates any output. With a login unset, the export stops and writes nothing. The run/manifest.json and run/summary.json it writes still go through public_projection, which has every password once the logins resolve.
What I verified
- #188, package data: I built a wheel and an sdist from a clean copy of the head. Both list the five template files, and
MANIFEST.inneeds no change.verify_package_treeexpands the newtemplate/*entry, so the installed files are compared byte for byte.verify_lexbench_packagereads the template from the installed package. The source-install sentence is gone from the README, and no other text still says it. - #160, stopping:
build()and the export both useknown_site_secrets(). It returns the same passwords asconfigured_site_secrets(), but stops when a login is unset. An exported variable cannot stand in for a login. Publishing stops before any request, also when resuming a saved submission, becausepackage_checkcallsbuild().release.pyskipsbuild()for a pending submission, but the publisher subprocess still runs that check. - #160, rendering:
public_projection,stage_reportandrebuild_report.pystill work without logins;rebuild_report.pydoes not import the publication module. - #160, scope: The other two limits are unchanged and recorded in
docs/trajectory-replay-protocol.md. The PR body discloses two side effects: an unset username also stops packaging, andmake public-webarena-reportnow needs the logins. - Tests fail without the fix: I reverted each source change in turn.
build()back toconfigured_site_secrets(): 4 tests fail.- Export back to
configured_site_secrets(): 1 test fails. - Export scan disabled: 2 tests fail.
- Package smoke: The login list matches the four sites in
topology.json. Resetting_repository_credentials_filetoNonerestores its default. - Rules: Hash-bound evidence, profiles and receipts are untouched,
uv.lockdoes not change, and no workflow file changes. There are no aliases or parallel implementations.
Results
- Lint gate: passed.
- Local tests, 1025 passed, 3 skipped:
tests/test_golden_reports.py(snapshots unchanged),tests/trajectory_replay/public_webarena,tests/test_lexbench_report_runtime.py,tests/test_package_contents.py,tests/test_packaging_hygiene.py,tests/test_reporting_publish_client.py,tests/test_local_path_privacy.py,tests/browser_use/test_publication.pyandtests/environments/test_webarena_topology.py. - CI on this head: all checks pass. That includes "Tests and static checks", "Rendered reference and report checks" and "Installation and packaging". The last one runs
make package-check, whose log shows the installed-wheel checks passing.
My own attempt to run the smoke functions from an unpacked wheel failed in my harness script before reaching them, so that coverage comes from the CI package check.
…without site logins
…gins The export route writes a public bundle but had no password check: it skipped an unset password and copied report pages unscanned. It now resolves every registered login first and scans the pages before writing anything, as packaging does.
5b0cf30 to
46a134f
Compare
Issues
Closes #188
Closes #160
Summary
Two small release-safety fixes.
Lexbench template (#188).
template/*is now package data ofharness.lexbench, sopython -m harness.lexbench reportfinds its template in a wheel or sdist install.MANIFEST.inneeds no change: a built sdist already lists all five template files from the package-data entry.tests/package_smoke.pyreads the template from the installed package, and the existing inventory check now requires those files byte for byte. The source-install sentence is gone from the Lexbench README, and the missing-template error no longer limits the default template to a checkout.uv.lockdoes not change. No Web Search collection is in flight on this host, so changing thepyproject.tomlhash stops no resume.Public WebArena password check (#160). This applies the issue's default.
build()inpublic_webarena/publication.pynow resolves site logins throughknown_site_secrets(), the function Browser Use uses, and stops before it writes anything when a registered login is unset. Publishing stops too, including when it resumes a saved submission, because its package check callsbuild()before any request.export_public_report_bundle, the example export route for site assembly, stops the same way, scans the report pages it copies for every site password, and writes nothing when either check fails. Rendering is unchanged:public_projection,stage_reportandrebuild_report.pystill work without logins. The package smoke runs on synthetic values, and also checks that rebuilding works without logins and that packaging does not.known_site_secrets()resolves the whole login, so a registered username that is unset also stops packaging, exactly as it does for Browser Use.make public-webarena-reportpackages after it renders, so it now needs the logins as well;rebuild_report.pyis the route that renders without them.Other limits in #160
These stay as they are, on the issue's default, and are now recorded in
docs/trajectory-replay-protocol.md:evaluate_resulttrace step and its validation. Runs do not record the variable names they used.No measured evidence, profile or receipt changes. Golden report hashes are unchanged.
Test plan
ruff check --config 'include=["*.py"]' --select F,TID252 .andruff check: passed.pytest tests/test_golden_reports.py tests/trajectory_replay/public_webarena tests/browser_use/test_publication.py tests/test_lexbench_report_runtime.py tests/test_package_contents.py tests/test_packaging_hygiene.py tests/test_moli_report_render_contract.py tests/environments/test_webarena_topology.py: 890 passed, 3 skipped.pytest tests/web_search tests/test_lexbench_dependency_boundary.py tests/test_release_metadata.py tests/test_report_software_versions.py tests/test_resource_build_context.py tests/test_runtime_entrypoints.py tests/trajectory_replay/test_catalog_contracts.py: 617 passed, 1 skipped.setuptools.build_metafrom a copy of the tree and confirmed both list the five template files. From the unpacked wheel, outside the checkout, ranverify_package_tree,verify_lexbench_packageandverify_public_trajectory_publication: passed.tests/package_smoke.pyand full suite were not run locally; CI runs them on Linux.