Repository navigation
refactor: shared HTTP/privacy/style modules and uniform webstone <track> <stage> verbs - #345
Merged
Merged
Conversation
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
Comment on lines
+460
to
+461
| run=owner_stage("harness.web_extract.certification", "main", | ||
| "Run a certified cohort", takes_argv=True), |
There was a problem hiding this comment.
The new run stage is registered only here, not in build_parser(). Consequently, webstone web-extract --home H run --profile P --method M --run-dir R reaches the track parser and fails with an invalid-command error, although the certification owner supports --home. Track help also omits run, and the module entry point cannot invoke it. Register and dispatch run in the track parser as well, forwarding the parsed home and remaining arguments to the certification owner.
…d report style into shared modules The HTTP client and its call-event sink, the publication privacy projection and the shared report stylesheet were used by several tracks but lived in web_fetch. Web Fetch keeps its call log writer, asset loader and ranking styles. The certified Web Fetch entry no longer re-routes Web Search; the root certified runner already selects it.
… <track> <stage> Each track's cli.py exports STAGES (harness.adapters.TrackStages) mapping the fixed verbs to its existing owners, with its own commands under extra. The root command dispatches through it for every track, including a new webfetch subcommand. Web Fetch rescore becomes score. The report-template registry rejects keys that are neither a field, a stage verb nor a <variant>_<stage> variant.
… run in its parser, accept compose Rebased on main: the new compose and revise commands join Web Fetch extras and the registry accepts the saved_matrix_compose key. Web Extract's run stage is a parser command that forwards --home and its arguments to certified collection. Tests that called Web Fetch rescore use score.
lanyue-llk
force-pushed
the
refactor/shared-cli
branch
from
November 24, 2026 07:52
74b4ea2 to
9616f61
Compare
This was referenced Nov 24, 2026
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Two steps of the spec convergence (#314, #316):
web_fetch. Shared code and other tracks import them from neutral modules.harness.adapters.TrackStages, and the root command runswebstone <track> <stage>the same way for all of them.flowchart LR root["webstone <track> <stage><br/>harness/cli.py TRACKS"] -->|"stage in STAGES.names()"| stages["<track>/cli.py STAGES<br/>TrackStages(run, score, report,<br/>check, package, publish, export, extra)"] root -->|"--help, track options"| main["<track>/cli.py main(argv, prog)"] stages --> owners["existing owners<br/>(unchanged mains)"] subgraph shared["shared modules"] http["harness/http_client.py"] events["harness/call_diagnostics.py"] privacy["harness/reporting/publication_privacy.py"] style["harness/reporting/style.py + report-style.css"] end web_extract --> http web_extract --> privacy web_search --> privacy browser_use --> style web_fetch --> http & events & privacy & style http --> eventsWhat moved
web_fetch/providers/http_client.pyharness/http_client.pyemit,redact,diagnostic_contextfromweb_fetch/diagnostics.pyharness/call_diagnostics.pyCallDiagnostics(names Web Fetch native logs) stays inweb_fetch/diagnostics.pyweb_fetch/publication_privacy.pyharness/reporting/publication_privacy.pyreporting/**is lintedSTYLEandassets/report-style.cssharness/reporting/style.py,harness/reporting/report-style.css(package data)asset_textandRANKING_STICKYare Web Fetch-only and stayweb_fetch/certification.pyweb-searchbranchharness.cli.certified_mainalready routesweb-searchto its ownerThe Claude fetch worker's
RUNTIME_SOURCESnow names the moved paths. Local and remote checkouts compare those hashes live, and nothing in Git pins them.Not moved:
harness/safety.pyandreporting/visual.pyimportlexbench_webfetch.paths. That module is part ofSCORING_SOURCE_FILES, so its bytes feedSCORING_SOURCE_SHA256, which certified profiles and corrections bind. The package also has to stay importable withoutharness. Shared code keeps importing it.Stage verbs (#316)
adapters.py:TrackStages.names()and.command(), plusowner_stage(lazy import, keeps owners'main()unchanged),run_stageandstage_main. These replace five copies of the same dispatch code.cli.pyexportsSTAGES:report-revision-check), package (site-package), publish (site-publish)report --check), publish, export (report --export-delivery)--home), score, report, check, package, publishpython -m harness.lexbench)harness/cli.pygains awebfetchsubcommand. Web Fetch stages also stay top-level.rescoreis renamed toscore, and its two guide mentions are updated.--homeafter the stage name, sowebstone web-extract check --home H ...works.reporting/templates.pyrejects any registry key that is neither a field, a stage verb nor<variant>_<stage>. Existing keys are not renamed because built reports record the whole template entry.Still open in #316: the
wcxb-*andwebmainbench-*commands stay as Web Fetch extras because the Fetch-run lane owns them. Trajectory Replay has norunverb yet:evaluateandreplayare both candidates, and a process guard matchestrajectory_replay evaluate. The per-track Make targets are unchanged.Breaking changes
rescoreis nowscore(webstone score,webstone webfetch score,python -m harness.web_fetch score).rescoreno longer exists. Guides and tests are migrated.webstone --helpandpython -m harness.web_fetch --helpnow also listcheck,packageandpublish, which run the same owners asreport-revision-check,site-packageandsite-publish.python -m harness.web_fetchstill lists only Web Fetch commands; the root-only commands (tracks,datasets, the other tracks,webfetch) appear only inwebstone --help.<variant>_<stage>.harness/http_client.pyandharness/call_diagnostics.py, because the runtime-source hashes are compared by path.Allowlists
benchmarks.publication -> web_search.revisions, an instance branch owned by the benchmark-adapter lane)Baselines
tests/baselines/*.jsonandtests/golden/*are unchanged. The Web Fetch scorer hash is unchanged (0fe8931734e1ba7282e1e9c8303eea958d20fdcee83d84e87cdc7e08cd08169e).tests/baselines/test_web_fetch.pynow callsscoreinstead ofrescore.Verification
make lint-check: passeduv run --frozen --all-extras python -m pytest tests/test_architecture_layering.py tests/test_architecture_instance_literals.py: passedPart of #316. Part of #314.