Repository navigation
refactor(trajectory-replay): share executor and Docker runner code between tracks - #204
Conversation
lanyue-llk
left a comment
There was a problem hiding this comment.
Independent review, round 1
Reviewed head fa9fa03b against base d894600d. I found no correctness, behaviour or rule defects. There is one test gap (P2) and one small test cleanup (P3).
Findings
P2: the new shared reset and engine-start code has no test of what it does
src/harness/trajectory_replay/core/docker_runner.py:71, :102, :291, :148, :326
reset_browser_state and start_engine are now the single implementation behind task isolation in both tracks, but no test checks that they clear anything. test_tracks_keep_their_own_reset_scope stubs out reset_browser_state, so it only checks which origins reach it. test_tracks_keep_their_own_page_replacement and the run_evaluation tests stub _reset_state.
I applied each mutation below to core/docker_runner.py and ran tests/trajectory_replay, tests/test_resource_accounting.py, tests/environments/test_webarena_topology.py and tests/test_golden_reports.py. All four mutations survived (2244 passed, 5 skipped):
| Mutation | Effect if shipped |
|---|---|
for origin in sorted(origins) becomes for origin in () |
Visited origins keep their storage between tasks |
The warm-up reset_state(page, {"https://example.com"}) in start_engine is removed |
The warm-up origin's state reaches the first task |
attempt_identity always writes is_retry: False |
Retry rows are recorded as first attempts |
manifest_task omits source |
Run manifests lose each task's source |
This is not a regression, because the old per-track copies had no such tests either. It still matters more now that one edit changes both tracks.
Suggested fix: add to test_shared_core.py:
- a test that runs
reset_browser_stateon a mock page and assertsStorage.clearDataForOriginis sent once per sorted origin, the cookie and cache calls are made, and the page ends onabout:blank, including when a CDP call fails; - a test that
start_enginecallsreset_statebefore it publishesruntime.pages[engine]; - direct assertions on the fields returned by
attempt_identityandmanifest_task.
P3: dead monkeypatch in the reset-scope test
tests/trajectory_replay/test_shared_core.py:208
The patch of docker_runner.reset_browser_state has no effect. Both runners import the name directly and the test patches those bindings separately. Removing it makes clearer what the test covers.
What I verified
- Moved helpers: I compared the AST of
_http_origin,_resource_result,_start_fixture_server,_write_run_artifacts,_QuietFixtureHandler,_encoding,_body_text,_actionability_probe,judge_outputsandvalidate_outputsfrom both tracks at base against theircore/versions. All are identical. The reset body from the public track at base matchesreset_browser_stateunder a text diff, and I read the curated copy's removed lines in the PR diff. - Composed helpers, by reading the diff:
start_enginekeeps the order of calls and of resource recording.docker_environmentplus the public_environmentkeeps the image key order.process_validationgives the same values and key order. It still runs before theevaluate_resulttrace entry is appended.main_frame_origin_recorderis safe because_run_tasknever rebindspage.open_task_pageandprint_attempt_progressmatch the old code.
- My own comparison of base and head: I ran each track's
_run_taskon mocks with a fixed clock, once passing and once with a failing click, and compared the rows as JSON. The only differences were the worktree path in tracebacks and mock ids. This used mocks only, with no real browser or Docker. I did not rerun the PR'srun_evaluationcomparison. - Two small differences with no observable effect:
materialize_tasknow keepsevaluator,environmentandtrajectoryon curated tasks, where the old code dropped them. Curatedrunner.pynever reads those fields, and its manifest is built fromsuite.tasks.- In the public track,
ENGINE_IMAGES[engine]is now read before the network is created.run_evaluationvalidates engines earlier, so this lookup cannot fail.
- Tracebacks in new runs: a failure inside a moved helper now names its
core/frame in the row'serrortext. I found no code in the diagnostics or metrics modules that parses those frames. - Scope of
Closes #201:- No function or class definition remains identical between the track runners or between the track executors.
catalog_runner.pyimports only public names fromremote_execution.- No references to the removed private names remain in the tree.
- Short identical blocks remain inside
execute_steps,_run_taskandrun_evaluation(at most 14 consecutive lines). The PR explains why, and I readaction_pageas assigned inside the step'stry, which supports its reason for keeping the failure block in place. I am not asking for more extraction.
- PR table: the action counts (12, and 22 in public) and the task viewports match the code.
- Frozen bindings: the SHA-256 of each of the six changed source files, at base and at head, appears nowhere in the tracked tree.
cohort_reference_hashescomparesremote_execution.pyonly within a run.webarena_results.pyandcatalog_contracts.pydo not refer to theremote_executionorcommand_entrykeys. - Tests that do catch breakage: mutations to
start_engineresource recording,process_validation,materialize_task, the public reset scope andwrite_run_artifactseach failed tests. - Rules: no compatibility aliases or re-exports, no workflow or evaluation files changed, and golden snapshots unchanged.
- Local runs: both lint gates pass. The targeted tests above gave 2244 passed, 5 skipped.
- CI on
fa9fa03b: all checks pass, including "Tests and static checks" and "Installation and packaging".
|
Review round 1 fixes, both findings fixed and none disputed.
Checks
This round changes tests only, with no change to source code or rendered output. These tests use mocks only, so they do not show that a real browser clears its state. |
There was a problem hiding this comment.
ℹ️ Review skipped · 0aaabda
No reviewable content was selected for this run.
lanyue-llk
left a comment
There was a problem hiding this comment.
Independent review, round 2
Reviewed head 0aaabda6. The production refactor looks correct and I found no behaviour change. Two test-coverage findings remain, one P2 and one P3. Neither is a regression, because the base commit had no such tests either.
Findings
P2: src/harness/trajectory_replay/core/docker_runner.py:58 (main_frame_origin_recorder)
Problem: No test checks the origin recorder, which is the remaining untested part of task isolation. It supplies the origins that reset_browser_state clears for the next task. The round 1 tests pass the origins in directly, so they never exercise this step. I applied two mutations, and each survived tests/trajectory_replay, tests/test_resource_accounting.py and tests/environments/test_webarena_topology.py:
- Removing
visited_origins.add(origin). A task that navigates from origin A to origin B would then leave A's storage in place for the next task, because reset only adds the current page's origin. - Removing the
frame != page.main_framecheck, so subframe origins are recorded too.
Fix: Add a test to test_shared_core.py that:
- calls the listener with a main frame and asserts its HTTP origin is recorded;
- calls it with a subframe and asserts nothing is recorded;
- calls it with
about:blankand asserts nothing is recorded.
P3: src/harness/trajectory_replay/core/docker_runner.py:209 and :281 (fixture binding and start_engine arguments)
Problem: The base-commit comparison in the PR description was a one-off script and was not committed, so nothing protects these behaviours in future. These mutations also survived the same suite:
- Binding the fixture server to
127.0.0.1, which the comment on that line says makes it unreachable from containers. - Dropping
network=network.namefromstart_browser_container. - Hard-coding
cpus=1. - Computing
network_rx_bytes_per_secondfrom the tx counter inresource_result. - Setting
output_charsto 0 inoutput_volume.
Fix: Assert the start_browser_container keyword arguments in the existing _start_engine helper test, the server address in test_fixture_server_keeps_the_host_alias_origin, and exact values from resource_result and output_volume.
What I verified
- Moved code: I compared the AST of each moved function against both base copies.
_http_origin,_resource_result,_start_fixture_server,_write_run_artifacts,record_origin, the fixture handler,_body_text,_actionability_probe,judge_outputsandvalidate_outputsmatch apart from names. materialize_task: It differs on purpose by usingdataclasses.replace. The curated copy used to dropevaluator,environmentandtrajectory, but curated tasks load with no evaluator and the curated runner reads none of the three, so this has no effect.- Other helpers, read side by side against the base diff:
reset_browser_state,open_task_page,start_engineanddocker_environmentkeep their order and output. The publicbuild_sourcekey still comes last in each image.process_validationruns where the old expressions ran, beforeevaluate_resultis appended to the trace, so it gives the same result.attempt_identity,output_volume,manifest_taskandground_truth_validationkeep their key order.
- Track differences: The per-track table in the PR description matches the code for reset scope, pages closed, viewport and receipt. It also has the right action counts: 12 curated and 22 public.
- Scope of #201:
catalog_runner.pynow imports only public names, and no references to the removed names remain insrc,scripts,docs,examplesor.agents, apart from a separate_http_origininplaywright_tool.pythat this PR did not touch. No function with the same name in both tracks is still a copy. The remaining shared line blocks are at most 21 lines and are mostly import lists, call sites and manifest fields. - Frozen bindings: The base SHA-256 of all six replaced files appears nowhere in the base tree. I found no non-test code outside
remote_execution.pythat reads therunnerorremote_executioncohort hashes. No non-test files underevaluation/orresearch/changed. - Local checks: Both ruff gates pass.
tests/trajectory_replay,tests/test_resource_accounting.py,tests/environments/test_webarena_topology.pyandtests/test_golden_reports.pygave 2257 passed, 5 skipped, and golden snapshots are unchanged. - CI on
0aaabda6: All checks pass, including Tests and static checks, Installation and packaging, and Rendered reference and report checks.
These checks used mocks and static comparison only. I did not run a real browser or Docker container.
|
Review round 2 findings are fixed, and none are disputed. Only tests changed, so route-hash snapshots are unchanged. P2: P3: behaviours protected only by the one-off comparison (ef21e85).
Checks
|
There was a problem hiding this comment.
ℹ️ Review skipped · ef21e85
No reviewable content was selected for this run.
There was a problem hiding this comment.
Independent review, round 3
Reviewed head ef21e85d against base d894600d. main has not moved. I found no correctness, behaviour or rule defects in the production code. There is one test-coverage finding (P3). It is not a regression, because the base commit had no such tests either.
Findings
P3: four recorded or exposed behaviours in the shared code still have no test
I applied each mutation below on its own and ran tests/trajectory_replay, tests/test_resource_accounting.py and tests/environments/test_webarena_topology.py. All four survived.
| Location | Mutation | Effect if shipped |
|---|---|---|
src/harness/trajectory_replay/core/docker_runner.py:340 (ground_truth_validation) |
Remove human_review or source_commit from the key list |
Run manifests lose that provenance, and both reports read this block |
src/harness/trajectory_replay/core/docker_runner.py:206 (start_fixture_server) |
directory=str(root) becomes directory="." |
The server, bound to 0.0.0.0, serves the working directory instead of the fixtures |
src/harness/trajectory_replay/public_webarena/runner.py:373 (_run_task) |
"process_validation": process_check becomes {} |
Public attempt rows lose the field result_audit.py and the report read. The same mutation in the curated runner fails a test |
src/harness/trajectory_replay/core/executor.py:13 (body_text) |
Remove [:limit] |
max_chars stops limiting navigate and snapshot output, which changes the recorded output volume |
Fix:
- Assert the exact returned dictionary from
ground_truth_validation, andNonefor no evidence. - In
test_fixture_server_keeps_the_host_alias_origin, fetch a file fromtmp_paththrough the server. - Assert
process_validationon a public_run_taskrow. - Assert that
body_texttruncates tolimit.
The other survivors I do not consider worth a test: the progress line fields, fixture server shutdown calls, container.reload(), the warm-up wait_until value, and two judge_outputs mutations that only change the recorded actual value or are equivalent on string outputs.
What I verified
- Moved helpers: AST comparison against both base copies, allowing only for the rename, is identical for
_encoding,http_origin,resource_result,write_run_artifacts,_QuietFixtureHandler,body_text,actionability_probe,judge_outputsandvalidate_outputs. I compared the rest by reading the diff:reset_browser_stateand its JavaScript,open_task_page,process_validation(same boolean result and key order),attempt_identity,manifest_task,docker_environment(sameimageskey order withbuild_sourceadded last),start_engine(same call order) andmaterialize_task.materialize_tasknow keepsevaluator,environmentandtrajectoryon curated tasks, but the curated runner and its manifest do not use them, so no output changes. - Real browser: I ran both tracks'
_prepare_page, the origin recorder and the fixture server in locally installed headless Chrome, using two origins. Cookies andlocalStoragewere cleared for both origins, the page ended onabout:blankwith the expected viewport (1280x900 curated, 1280x720 public), and the fixture server served bytes and stopped. This did not use the benchmark browser images or Docker, and no fullrun_evaluationran. - Scope of
Closes #201:catalog_runner.pyhas no private imports left.- No function or class is AST-identical across the track modules.
- Same-named functions remaining in both tracks are
_reset_state,_prepare_page,_run_task,run_evaluationandexecute_steps, and each differs for a stated reason. - The curated track is not retired.
- PR description: I confirmed the audit correction, the 12 curated actions, the extra public actions set and the task viewports.
- Frozen bindings: the base-commit SHA-256 of
runner.py,executor.py, their public counterparts,catalog_runner.py,remote_execution.pyandpublic_webarena/evaluators.pymatches nothing tracked in the repository. No path references bind those files outside tests. The self-hash inremote_execution.pyis as the PR describes. - Stale references: no removed names remain. The
_http_origininplaywright_tool.pyis a separate function with a different return type, and the_run_taskstring intest_webarena_review.pyis a traceback fixture. - Tests: both lint gates pass.
tests/trajectory_replay,tests/test_resource_accounting.py,tests/environments/test_webarena_topology.pyandtests/test_golden_reports.pygive 2262 passed, 5 skipped. Golden snapshots are unchanged. I did not run the rest oftests/locally. - CI on
ef21e85d: all checks pass, including Tests and static checks, Installation and packaging, and Rendered reference and report checks.
|
Review round 3: the one P3 finding is fixed with tests only; nothing is disputed. No production code changed.
I reapplied each mutation from the finding (removing Local run: |
There was a problem hiding this comment.
ℹ️ Review skipped · e8d66da
No reviewable content was selected for this run.
lanyue-llk
left a comment
There was a problem hiding this comment.
Independent review, round 4
Head reviewed: e8d66dab. CI on this head fails, and one of the two failures comes from this PR.
Findings
P0: tests/environments/test_webarena_topology.py:295: the new fixture server fetch breaks the UTF-8 guard, so CI is red
- Problem: commit
97738957addedwith direct.open(url, timeout=5).tests/test_explicit_utf8_io.py::test_every_text_read_and_write_names_its_encodingtreats a.opencall on a name outsideOTHER_OPENERSas a text open with no encoding. CI reportstests/environments/test_webarena_topology.py: 1as a new violation, which fails "Tests and static checks" and "Python 3.11". It also fails locally on this head. The test is not in the known local failures, and the targeted suite does not include it, so the targeted run did not show this. - Fix: rename the variable to
openeron lines 293 and 295.openeris already inOTHER_OPENERS, and the call is a binary HTTP read, so no exemption is needed. I tried this rename in my review worktree:tests/test_explicit_utf8_io.pyandtests/environments/test_webarena_topology.pygave 97 passed. I did not push it.
P3: src/harness/trajectory_replay/core/docker_runner.py:296: some recorded evidence and cleanup in the shared code still has no test
Not a regression, and it should not block merge once the P0 is fixed. I ran 36 one-at-a-time mutations against tests/trajectory_replay, tests/test_resource_accounting.py and tests/environments/test_webarena_topology.py. 16 survived. These are the ones worth pinning, because both tracks now depend on one copy:
docker_environment(line 296): removing or blankingrunner_platform,docker_cpusorcgroup_version, and theexit N, no outputandunavailable: ...version fallbacks.write_run_artifacts(line 363): droppingensure_ascii=Falsechanges the bytes ofattempts.jsonl, and so its recorded hash, for non-ASCII tasks.stop_fixture_server(line 220): removingshutdown,server_closeorjoineach survives.test_fixture_server_keeps_the_host_alias_originstops the server by hand instead of calling this helper.start_engine(line 284): removingcontainer.reload()survives, althoughpublished_endpointreads the container's ports straight after it.
Fix: assert the exact docker_environment dictionary, including both fallbacks. Write a non-ASCII row and check the bytes. Call stop_fixture_server in the fixture test and assert that the thread has stopped and the socket is closed. Assert in the _start_engine helper test that reload runs before published_endpoint.
The other survivors I would leave alone: the print_attempt_progress fields, the warm-up wait_until, the 500-character probe text limit, and daemon=True. Replacing isinstance(expected, str) and actual == expected with actual == expected makes no practical difference, because actual is always a string.
CI on e8d66dab
| Check | Result |
|---|---|
| Tests and static checks | fail: 2 failed, 19798 passed, 157 skipped |
| Python 3.11 (aggregate) | fail, because of the check above |
| Installation and packaging | pass |
| Rendered reference and report checks | pass |
test_every_text_read_and_write_names_its_encoding: caused by this PR (the P0 above).tests/test_native_cdp_port.py::test_port_check_ignores_the_log_of_an_earlier_attempt:DID NOT RAISE RuntimeError. This looks like an existing timing race and not an effect of this PR, though I did not reproduce it. The PR does not touchharness/web_fetchor this test, and the test does not import replay code. The stubbed handshake can return before the fake server exits, so a loaded runner can see the server as still alive. It passed 5 of 5 local runs, and CI passed on the earlier headsfa9fa03b,0aaabda6andef21e85d. If it fails again after the P0 fix, it needs its own issue.
Verified, no defects found
- Helper swaps: I compared the old and new code in both tracks. Row key order,
process_validationresults, the reset sequence, engine start order, the fixture server, artifact bytes and the publicbuild_sourceaddition all match. - Two differences, neither affects results:
- Curated
materialize_tasknow keepsevaluator,environmentandtrajectorythroughdataclasses.replace, where the old code dropped them. The curated_run_taskand manifest do not read those fields. ENGINE_IMAGES[engine]is now read before the network is created. This only matters for an unknown engine, which fails either way.
- Curated
- Scope of
Closes #201: complete.- An AST comparison finds no identical function or class left between the track runners or between the track executors. The same-named
_prepare_page,_reset_state,_run_task,run_evaluationandexecute_stepsall differ. catalog_runner.pyimports no private names fromremote_execution.- The track executors do not re-export the moved helpers, and no references to the removed names remain.
_http_origininplaywright_tool.pyis a separate function with a different return type.
- An AST comparison finds no identical function or class left between the track runners or between the track executors. The same-named
- Hash bindings:
cohort_reference_hashesdoes not list the track runners or executors, so moving code out of them removes nothing from that binding.remote_execution.pydoes change, and its hash is compared only within a run. - Local runs on this head:
- Both lint gates pass.
tests/trajectory_replay,tests/test_resource_accounting.py,tests/environments/test_webarena_topology.pyandtests/test_golden_reports.py: 2265 passed, 5 skipped.- Golden route hashes are unchanged, and the PR changes no snapshots.
Not verified: these checks use mocks only, and no real browser or Docker container ran. I did not rerun the author's base-commit comparison. The mutation sweep ran the targeted suite, not the whole of tests/.
PR description
The test plan still says 2262 passed and does not mention the round 3 tests. Please update it when pushing the fix.
There was a problem hiding this comment.
ℹ️ Review skipped · 3dd9d56
No reviewable content was selected for this run.
|
Review round 4 fixes, head 3dd9d56. Nothing disputed.
Each of 13 one-at-a-time mutations of these behaviours made a test fail (one-off script, not committed). These were only the mutations listed in the finding, not the other survivors from the review's run of 36. The PR test plan is updated: 2329 passed, 5 skipped on the targeted suite, with route-hash snapshots unchanged. CI on this head is still running. |
lanyue-llk
left a comment
There was a problem hiding this comment.
Independent review, round 5
Head reviewed: 3dd9d56c. No defects found. I checked out this head in a fresh worktree and did not push anything.
CI
All checks pass on this head: "Tests and static checks", "Installation and packaging", "Rendered reference and report checks" and "Python 3.11". This includes tests/test_explicit_utf8_io.py, which failed in round 4. tests/test_native_cdp_port.py::test_port_check_ignores_the_log_of_an_earlier_attempt, the possible timing race from round 4, also passed in CI, so no follow-up issue is needed for now.
What I verified
- Local gates: both lint gates pass.
tests/trajectory_replay,tests/test_resource_accounting.py,tests/environments/test_webarena_topology.py,tests/test_explicit_utf8_io.pyandtests/test_golden_reports.pygave 2329 passed, 5 skipped, which matches the test plan. The PR changes no route-hash snapshot and nothing underevaluation/,configs/orresearch/. It does not touch.github/. - Base: main is still
d894600d, so the PR is current. - Round 4 fixes: the
openerrename is in place, and the guard passes with no exemption. The new tests for the environment receipt, artifact bytes, fixture server shutdown andcontainer.reload()order assert exact values. - Old and new code, read line by line:
- Reset, page replacement, engine start, the fixture server, resource results, attempt rows, process validation, progress output, the environment receipt, manifest tasks and artifact writing all match the base commit in behaviour and key order.
process_validationgives the samepassedvalue as the old expression, including for an empty trace._run_tasknever rebindspage, so moving the origin listener out of its closure changes nothing.image=ENGINE_IMAGES[engine]is now evaluated before the network is created, not after. That only matters for an unknown engine, and it then creates less to clean up.
materialize_task: this is the one place the shared code differs from the old curated copy.dataclasses.replacekeepsevaluator,environmentandtrajectory, which the old curated copy dropped. Curatedload_suitenever sets those fields, and the curated runner and executor never read them, so curated results do not change.- Scope of
Closes #201:catalog_runner.pyimports no private names from any module.- An AST comparison of both track runners, both track executors,
remote_execution.pyand the core modules found no remaining identical function bodies, and no identical statements of 5 lines or more. - The behaviour left in each track matches the table in the PR description, as far as the track diffs show it. I did not recount the
execute_stepsactions.
- Removed names: the old private helpers have no remaining references.
_http_origininplaywright_tool.pyis a separate helper with different behaviour, and_run_taskstill exists in each track's runner. Theremote_execution.pytraceback string intest_webarena_review.pyis test data. There are no re-exports or compatibility aliases. - Frozen bindings: none of the base SHA-256 values of the changed runner, executor, evaluator,
catalog_runner.pyorremote_execution.pyfiles appears anywhere in the base tree. No file underevaluation/,configs/orresearch/names those files.cohort_reference_hashesonly compares values within one run, andwebarena_results.pydoes not read therunnerorremote_executionkeys. - Mutations: I ran 14 new one-at-a-time mutations against the targeted suite (not all of
tests/), and 12 made a test fail. Neither survivor is worth a test:judge_outputswithoutisinstance(expected, str)behaves the same, becauseactualis always a string.print_attempt_progresschoosing the first error line instead of the last only affects console progress, not recorded evidence.
- PR text: no attribution lines in the commits or PR body,
Closes #201is justified, and the test plan numbers match my run.
Limits
This review used mocks only, as the author's tests do. No real browser or Docker container ran. I did not repeat the author's byte-for-byte comparison against the base commit; I compared the code by reading it and with the AST check instead. I did not run the rest of tests/ locally, so CI is the gate for it.
…and engine cleanup
3dd9d56 to
02059d8
Compare
Issues
Closes #201
Summary
The curated and public replay tracks each kept a copy of their executor helpers and Docker runner code. That code now lives once under
src/harness/trajectory_replay/core/, and each track keeps only its own behaviour on top. Neither track is retired, and #103 keeps that decision.core/executor.pyownsbody_text,actionability_probe,judge_outputsandvalidate_outputs. Their callers import them from there, with no re-exports from the track modules.core/docker_runner.pyowns engine startup (EngineRuntime,start_engine), the browser state reset, opening the task page, the fixture server, resource results, attempt row fields, process validation, the environment receipt and run artifact writing.catalog_runner.pynow imports only public names fromremote_execution:run_replay_taskandstop_browser.No action semantics, canonical input, result, denominator or report target changes.
What the audit got wrong
#103 and #201 say
catalog_runner.pyimports_browser_command,_run_taskand_wait_cdp. On the current code it imports_run_taskand_stop_browser._browser_commandand_wait_cdpare only used insideremote_execution.py, behind the publicstart_local_browser, so they stay private.I named the function
run_replay_taskand notrun_taskbecausecatalog_runner.mainhas a localrun_taskfunction. With the shorter name, the nestedexecute_taskwould have called that local function instead.Most of
execute_stepsand the track_run_taskfunctions is not a copy, so these stay in each track:execute_stepsactionspage.locator(selector).firstlocator_for, with tabs and geometry waitsconfigured_browser_images()DEFAULT_BROWSER_IMAGESThe failure block in both
execute_stepsfunctions also stays in place. In the public track,action_pagecan be unbound when that block runs, and the error is recorded asactionability_probe_error. Moving the block into a helper would change that recorded evidence.Frozen bindings
No file had to be left alone.
evaluation/,src/,tests/,configs/andresearch/for the current SHA-256 ofrunner.py,executor.py, their public counterparts,catalog_runner.pyandremote_execution.py, and found no match.remote_execution.pydoes hash itself into each cohort asrunnerandremote_execution.cohort_reference_hashesonly compares those values within one run, andwebarena_results.pydoes not check those two keys. Historical receipts keep their recorded hashes and still verify.remote_execution.pyhash, as it would after any earlier edit to that file.Test plan
tests/trajectory_replay,tests/test_resource_accounting.py,tests/environments/test_webarena_topology.py,tests/test_explicit_utf8_io.pyandtests/test_golden_reports.py: 2329 passed, 5 skipped. Route-hash snapshots are unchanged. I did not run the rest oftests/locally, so CI is the gate for it.test_shared_core.pyadds tests that the tracks keep their own reset scope, page replacement and environment receipt, and that a failed engine start keeps started resources for cleanup.test_shared_core.pyalso checks on mocks whatreset_browser_stateclears, including when a call fails, thatstart_engineresets the warm-up page before publishing it, and the fields returned byattempt_identityandmanifest_task. Mutating these behaviours one at a time made the tests fail (14 of 14, one-off script, not committed).test_shared_core.py,test_resource_accounting.pyandtest_webarena_topology.pynow pin the origins recorded for the next reset, the fixture server bind address, thestart_browser_containerarguments, the per-second network rates andoutput_volume. Each of 11 one-at-a-time mutations of these behaviours made a test fail (one-off script, not committed).test_shared_core.pynow asserts the exactdocker_environmentdictionary with both browser version fallbacks, the exact non-ASCII bytes and hashes fromwrite_run_artifacts, and thatstart_enginereloads the container before reading its published endpoint. The fixture server test now stops the server throughstop_fixture_serverand checks that it waits for the thread and closes the socket. Each of 13 one-at-a-time mutations of these behaviours made a test fail (one-off script, not committed).run_evaluationfromd894600dand from this branch on the same mocks, for both tracks and five scenarios: plain, ground-truth evidence, no fixtures, a failed engine start and a failing click.attempts.jsonl,summary.json,manifest.json, stdout, and every call made to the page, container, Docker client and Playwright mocks. The only normalization masked the mock ids and the listener function's repr, which changes with its new name.