Repository navigation
refactor(replay): one replay runner loop, run verb, qualification command and site data - #372
Conversation
8fb6984 to
43f73d9
Compare
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
| selected = tuple(item.strip() for item in (engines or "").split(",") if item.strip()) | ||
| if profile_path is None: | ||
| return selected or default |
There was a problem hiding this comment.
An explicitly empty filter (--engines '', whitespace, or --engines ',') becomes an empty tuple and silently selects every default/profile engine. In particular, public WebArena previously passed that empty tuple through to engine validation rather than starting a full run. Distinguish engines is None (use defaults) from a supplied filter that selects nothing, and reject the latter before launching containers. Add coverage for empty filters both with and without a profile.
There was a problem hiding this comment.
Fixed in 12f3de7: run_engines now raises when --engines is supplied but names nothing, with or without a profile. Tests cover both cases and profile-order narrowing.
…command Add `python -m harness.trajectory_replay qualification` with one subcommand per qualification, repair and recording-audit stage, and replace the repair proposal kind if-chain with the REPAIR_KINDS registry. Remove the 27 thin scripts that fronted these stages.
… runner loop Promote the replay evaluator protocol and kind registry to trajectory_replay/core, make the curated and public runners benchmark adapters of core/runner.py, take participants from a run profile, and replace the evaluate and replay verbs with one run verb keyed by a benchmark registry.
…tract data The deployment contract check, archive verification, Map setup and the environment CLI no longer name the map or wikipedia sites: the delivered component that declares data archives, and the site adapter that declares data_archives, select them.
43f73d9 to
12f3de7
Compare
Purpose
Browser tracks, round 2 of the spec convergence (#336). The curated and public WebArena replays now run through one Trajectory Replay runner loop, and each of them is a benchmark adapter. Replay evaluators live in a track-level registry. The track has a single
runverb. Qualification and repair go through one command backed by a registry of repair kinds. WebArena deployment code no longer names sites.flowchart LR RUN["webstone trajectory-replay run --benchmark NAME"] --> REG{"BENCHMARK_RUNS registry"} REG -- curated --> CA["CuratedReplay adapter"] REG -- public-webarena --> PA["PublicWebArenaReplay adapter"] REG -- webarena-verified --> WV["webarena_replay.run_replay_suite (own loop, remaining)"] CA --> LOOP["core/runner.py run_replay: engines, fixtures, task x engine x retry, records, manifest, diagnostics, report hook"] PA --> LOOP PA -. "evaluator kinds" .-> EV["core/evaluators.py EVALUATOR_KINDS + EvaluatorRegistry"] EV --- K1["exact_outputs"] EV --- K2["webarena_verified (registered by public_webarena/evaluators.py)"] PROF["--profile methods[].engine"] --> LOOP Q["trajectory-replay qualification SUB"] --> RK["REPAIR_KINDS registry (propose KIND)"]What moved or was removed
trajectory_replay/core/runner.py, which holds theReplayBenchmarkprotocol,run_replay, the sharedreset_state/prepare_pageandrun_engines.runner.pyis now theCuratedReplayadapter andpublic_webarena/runner.pyis now thePublicWebArenaReplayadapter. The two copies ofrun_evaluation,_reset_stateand_prepare_pageare gone. The evaluator protocol,TaskEvidence/TaskEvaluation,ExactOutputsEvaluatorand a kind-keyedEvaluatorRegistrymoved tocore/evaluators.py.public_webarena/evaluators.pykeeps only the WebArena-Verified kind, which it registers. The curated benchmark keeps its single-tab reset through an explicitall_tabs=False, so its measured behaviour is unchanged.--profile(methods[].engine).--enginesnarrows that list; with no profile, the registry supplies it. The loop has no default participant set of its own.runverb (Give every track the same stage verbs and a fixed stage registry #316).evaluateandreplayare replaced byrun --benchmark curated|public-webarena|webarena-verified, and each benchmark parses its own options. The latency process guard now also matcheswebstone trajectory-replay run.trajectory-replay qualification <subcommand>with 21 subcommands.propose <kind>resolves its kind through theREPAIR_KINDSregistry, which replaces themain_repair_proposal(kind=...)if-chain. The 27 thinscripts/*webarena*qualification, diagnostics and manifest-repair scripts were removed. Every stage is still named as current bydocs/trajectory-replay-protocol.md, so no stage or kind was removed.maporwikipedia. The archive site comes from the delivered component that declaresdata_urlsand from a newdata_archivessite-adapter field. The setup error listsSHARED_SITES.Breaking changes
python -m harness.trajectory_replay evaluate ...becomes... run --benchmark curated ....python -m harness.trajectory_replay replay ...becomes... run --benchmark webarena-verified ....scripts/*webarena*qualification and repair scripts are removed. Each one is now the matchingpython -m harness.trajectory_replay qualification <subcommand>.action_repairbecomesaction-repair, and likewise for all six), andmain_repair_proposal(argv, kind=...)becomesmain_repair_proposal([kind, *args]).public_webarena.runner.run_evaluationandtrajectory_replay.runner.run_evaluationare replaced bycore.runner.run_replay(adapter, ReplayOptions(...)).EvaluatorRegistry(webarena_config_path=...)becomescore.evaluators.EvaluatorRegistry(config_path=...).Remaining (Part of)
webarena_replay.py,catalog_runner.pyandremote_execution.py, which use CowAgent BrowserService instead of Docker/Playwright). Local and remote execution are not yet backends ofrun_replay.catalog_acceptance/retrieval_acceptanceare not yet registered evaluator kinds. The three report builders are not merged, because that waits for the shared report template lane.CdpHarRecorders remain, for the reasons given on the issue.lexbench/resource_matrix.pyandresource_profiles.pystill name moli, because frozen protocols bind their bytes.agent_workflows.TRACKSregistry and the per-track Make targets remain.Checks
tests/baselinesis unchanged and passes.uv run --frozen lexbench-webfetch version:0fe8931734e1…169ebefore and after.make lint-check: pass.pytest tests/trajectory_replay tests/baselines tests/environmentsplus the architecture, command and package tests (-n 8): 2597 passed.pytest tests -n 8: 22997 passed, 2 failed under load (test_playwright_tooland a 5 s subprocess budget intest_reference_quality), both of which pass when rerun serially. After rebasing onto refactor: one track registry, generic stage make targets, instance hooks and Yours docs #368 the focused set passes (2517).Closes #335
Part of #339
Part of #325
Part of #321
Part of #316