Skip to content

refactor(trajectory-replay): read engines and the default model from registries - #206

Merged
lanyue-llk merged 12 commits into
mainfrom
refactor/trajectory-replay-registry
Nov 4, 2026
Merged

lanyue-llk merged 12 commits into
mainfrom
refactor/trajectory-replay-registry

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

What, why and how of this PR

Issues

Closes #202

Part of #97 (this PR covers the Browser Trajectory Replay items). Follow-up for the hash-bound files: #205.

Summary

  • Curated report reads its participants from the evidence. report.py had 34 lines naming Chromium or Moli. Tables, titles, filters, the recommendation and ratio sections now come from the summary's engines, with the browser registry as the order for an empty summary. What remains is Moli-specific and renders only when Moli is a participant: the timing finding, the analysis page's timing study (时序机制研究), and the screencast wording and 验证方案 link in the home page's root-cause sentence.
  • More or fewer than two browsers. A winning cell must beat every other participant. Ratio tables and duration audits repeat per comparison browser against the baseline. Curated summaries publish relative_ratios for any set other than two, because paired_ratios can only describe two engines. Two-engine summaries are unchanged. A single browser renders no ratio section and no winner.
  • One default model. gpt-5.6-sol was written in 8 places in this track. It now has one definition, DEFAULT_DIAGNOSIS_MODEL in participants.py. run.sh passes --diagnosis-model only when TRAJECTORY_REPLAY_DIAGNOSIS_MODEL is set.
  • Runners and entry points.
    • The curated runner rotates its order over ENGINE_IMAGES. The rotation is one shared helper, rotated_engine_order, which also replaces the Browser Use copy and the public runner's reversal. Order is the same as before for one or two browsers.
    • New curated manifests record protocol.engines, and rebuild_report.py reads it and rejects a manifest whose list differs from the rows, including an empty one. Older manifests use registered engines in registry order, then unregistered ones in first-seen order, so the baseline does not depend on row order.
    • verify_metrics.py audits any participant set and rejects a summary whose browsers differ from the raw attempts.
    • The public report's reproduction command shows the run's engines.
  • Adapter set. playwright_tool.py and catalog_runner.py share BROWSER_ADAPTERS.
  • Removed. Unused _functional_rows and _aggregate_ratio in the curated report.

Left unchanged, with reasons

Hash-bound files. cohort_reference_hashes in remote_execution.py records these for each remote cohort. None of them is changed here:

  • remote_execution.py (runner, remote_execution)
  • remote_runtime.py
  • webarena_replay.py
  • retrieval_acceptance.py
  • webarena_corrections.py (correction_logic)
  • scripts/run_remote_three_method_cohort.py (command_entry)
  • evaluation/trajectory-replay/webarena-verified/task-corrections.json (task_corrections)

The task_id == 225 branch must stay for now. It sits in webarena_corrections.py, and moving its checks to correction data would change both that file and task-corrections.json. #205 tracks doing this with the next cohort revision, together with the engine literals in remote_execution.py and remote_runtime.py.

Literals that do not mean the participant set:

  • Capability branches, such as the Moli layout publishing in playwright_tool.py and Chromium host resolver rules in catalog_runner.py.
  • The Chromium-only qualification protocol in public_webarena/qualification.py, its check in public_webarena/runner.py, and the three sentences in public_webarena/report.py that describe it (冷 Chromium, lines 569, 1066 and 1771).
  • The binding.get("engine", "chromium") default for older bindings in catalog_acceptance.py.
  • Historical measured prose in webarena_report.py.

Rendered output

Existing golden route hashes are unchanged, so no route changes for the current cohort.

The curated report had no snapshot, so this PR adds three (trajectory-replay-curated-*: baseline leads, comparison leads, tied). They were recorded from the unchanged renderer in the first commit, and the second commit leaves them untouched, so they show the two-browser bytes are the same.

test_shared_core.py changes on purpose: it asserted curated summaries omit relative_ratios at three engines. It now asserts that for two engines, and that three engines publish them.

Test plan

  • Lint gate: both ruff commands pass.
  • Targeted tests: pytest tests/test_golden_reports.py tests/trajectory_replay tests/browser_use tests/test_explicit_utf8_io.py tests/test_source_language_policy.py: 2636 passed, 5 skipped, 0 failed, with PYTHONPATH set to the checkout.
  • New tests:
    • End-to-end curated reports with three browsers and no Moli, a partial tie among three, and a single browser, whose method page has no order alternation clause.
    • The three-browser report without Moli has no timing study and no screencast or 验证方案 wording; the three-browser report with Moli keeps them.
    • Rejection of an unsafe engine ID.
    • Rotation order for one, two and three browsers.
    • A check that the default model has one definition.
    • verify_metrics.py with three browsers, with tamper and wrong-participant controls, plus swapped paired labels and a changed relative baseline.
    • The public reproduction command following protocol.engines, and escaping a hostile engine value.
    • The rebuild command run end to end with a moli-first older file, unregistered engines, a declared order, and manifests that disagree with their rows, including an empty or null list, and an unsafe row engine ID, which stops before anything is written.
    • The runner recording protocol.engines.
    • The research page's Mind2Web sentence with two, three and one browser, and the method page's resource baseline sentence with three browsers.
  • Not run: the full suite locally (CI is the gate), a rebuild from private measured evidence, a real browser run of the runners, or the visual release check.
  • CI: results are on this PR.

@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 · 0c12797

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 0c127976 against base d894600d. Four findings: three P2 and one P3. No P0 or P1 defects found.

Findings

P2. examples/trajectory_replay/rebuild_report.py:55-58: the fallback can flip the baseline, and the new engine logic has no test.

  • Problem: for a manifest without protocol.engines, the order comes from the first-seen row. _ratio_pairs and verify_metrics.py treat the first engine as the baseline. The old code always used chromium, then moli. I ran attempts that start with a moli row through this logic: the denominator became moli and the duration ratio mean went from 1.99× to 0.50×. Labels would also flip, so the result reads as valid. Older runners started task 0 with chromium, so this needs a reordered or merged attempts file. I had no curated evidence locally to check real files.
  • Related: protocol.engines is not checked against the rows. An engine missing from it silently drops out: summarize_attempts(rows, engines=("chromium",)) over chromium and moli rows returned only chromium. rebuild_report.py does not call verify_metrics.py, so nothing rejects this.
  • Test gap: the rebuild test in tests/trajectory_replay/test_runner.py mocks summarize_attempts, so it never checks the engines argument. I found no assertion on the new protocol.engines field in that file.
  • Fix: for the fallback, take registered engines in DEFAULT_BROWSER_IMAGES order, then any unregistered engines in first-seen order. Reject a protocol.engines set that differs from the row engines. Add tests for a moli-first legacy file, a manifest that disagrees with its rows, and the runner recording protocol.engines.

P2. src/harness/trajectory_replay/report.py:703: the method page still says "both sides" for any participant count.

  • Problem: the page keeps the fixed text 资源基线只比较双方都成功的同任务. I rendered ("alpha", "beta", "gamma") and ("alpha",), and both method pages contain it. The rest of the same list and the home page's matching sentence already use _all_parties or _provider_count. The new three-browser test checks other sentences on this page but not this one.
  • Fix: use {_all_parties(engines)} here, which keeps the two-browser bytes, and add the assertion to test_report_renders_every_registered_participant_of_a_larger_set.

P2. src/harness/trajectory_replay/public_webarena/report.py:1845: a manifest value reaches published HTML unescaped.

  • Problem: engine_arguments joins protocol.engines and goes into run_command, which is written raw into <pre>. The neighbouring suite_argument goes through _e. summary_engines validates summary IDs, but this path reads only the manifest. Calling _appendix_page with protocol.engines = ["<img src=x onerror=alert(1)>"] emitted the tag unescaped.
  • Fix: wrap the joined value in _e(...). Current engine IDs render the same bytes. Add a negative test next to the new --engines assertions.

P3. src/harness/trajectory_replay/public_webarena/report.py:558 and src/harness/trajectory_replay/participants.py:37: two small leftovers.

  • Public report prose: line 558 still says the Mind2Web dataset 不能真正比较 Chromium 和 Moli. This names the compared browsers, so it reads wrongly for another participant set. It is also not under the PR's "Literals that do not mean the participant set". Build it from the participant list, which keeps the current bytes, or add it to that list with the reason.
  • Duplicate pattern: participant_registry still has its own copy of the regex that this PR adds as SAFE_ENGINE in the same file. Use the constant.

Verified with no defect

  • Bytes for the current cohort: the first commit changes only tests, and tests/golden is identical between the two commits, so the curated snapshots came from the unchanged renderer. All golden tests pass.
  • Rotation: rotated_engine_order gives the old order for one and two browsers in all three runners.
  • Winner logic: a cell must beat every other participant. Ties and missing values stay neutral, and a single browser renders no winner.
  • Larger and smaller sets: with three browsers named alpha, beta and gamma, no generated route contains chromium or moli outside the CSS and scripts I excluded from the scan. With one browser, the home page has no ratio section.
  • verify_metrics.py: the three-browser audit passes, and the tamper and wrong-participant controls fail as intended.
  • Default model: the only definition in the track code and run.sh is DEFAULT_DIAGNOSIS_MODEL. examples/trajectory_replay/README.md still names the model when documenting the default, which is not a second definition.
  • Hash-bound files: none of the files returned by cohort_reference_hashes is in the diff, and the PR's list matches that function. A search of evaluation/, configs/, research/ and scripts/ found no references binding the other changed source files.
  • Scope: Closes #202 holds if the findings above are fixed. The issue allows the bound files and the task_id == 225 branch to stay when listed and explained, and #205 tracks them.

Local runs and CI

  • Lint gate: both ruff commands pass.
  • Targeted tests: pytest tests/test_golden_reports.py tests/trajectory_replay tests/test_explicit_utf8_io.py tests/test_source_language_policy.py: 2281 passed, 5 skipped, including the ASCII-locale test the PR could not confirm locally.
  • CI on this head: Tests and static checks, Installation and packaging, and Rendered reference and report checks all pass.
  • Not run: a rebuild from real measured evidence or a real browser run, because none was available here.

@lanyue-llk

lanyue-llk commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Review round 1: all four findings are fixed, none disputed.

P2, rebuild baseline (025f300a). The engine logic now lives in attempt_engines in participants.py. Without protocol.engines, registered engines come first in DEFAULT_BROWSER_IMAGES order, then unregistered ones in first-seen order. A protocol.engines list that differs from the row engines or contains a duplicate exits before summary.json is written. New tests/trajectory_replay/test_rebuild_report.py runs the command with the real summarize_attempts. It covers a moli-first older file, whose denominator stays chromium with a duration mean above 1.9x. test_runner.py now asserts the runner records protocol.engines.

P2, method page sentence (b58a9a2b). The sentence uses _all_parties(engines), and the three-browser test asserts it.

P2, unescaped engines (c08b657f). The joined value goes through _e(...), with a negative test next to the --engines assertions.

P3, Mind2Web prose and regex (52d4a78a). The sentence is built from the summary's participants through engine_names, which also replaces the curated report's _names. participant_registry uses SAFE_ENGINE.

The golden route hashes are unchanged, so the rendered bytes for the current cohort are the same. Hash-bound files are untouched.

I also added the 冷 Chromium 重放 sentences in the public report to the PR's list of literals left unchanged, since they describe the Chromium-only qualification protocol.

Added after this comment was first posted, P2 from the automated review of 52d4a78a (4a724d35). An explicit protocol.engines: [] or null counted as absent and skipped the disagreement check. Only a manifest without the key now counts as older, and both values have rejection cases in test_rebuild_report.py. CI and the automated review pass on 4a724d35.

@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 · 52d4a78

This review found 1 issue(s), including 1 blocking issue(s).

Comment on lines +50 to +51
declared = tuple(str(engine) for engine in protocol.get("engines") or ())
if declared:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
P2: An explicitly declared empty engine list bypasses the new disagreement check. For example, protocol: {"engines": []} with Chromium/Moli attempt rows falls through to registry order, and rebuild writes a summary despite the manifest's participant set differing from the rows. The documented legacy fallback is for an absent field, not an empty declaration. Distinguish key absence from an explicitly supplied list and validate the latter against seen; add an empty-list rejection case to the rebuild tests.

@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 · 4a724d3

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 2

Reviewed head 4a724d35 against base d894600d, which is still the tip of main. Three P3 findings. No P0, P1 or P2 defects. All round 1 findings are fixed.

Findings

P3. examples/trajectory_replay/rebuild_report.py:76, src/harness/trajectory_replay/participants.py:48: an unsafe engine ID fails only after the saved files are overwritten.

  • Problem: attempt_engines does not check SAFE_ENGINE, so an ID such as my browser in attempts.jsonl gets through. summary.json and manifest.json are then rewritten, and write_latest_report raises an uncaught ValueError with a traceback. I confirmed each step separately: attempt_engines accepted <x>, the rebuild wrote both files with the report writer mocked, and the real renderer raised on an unsafe ID. The rejection added for a disagreeing protocol.engines does stop before writing, so this path behaves differently from it.
  • Fix: Check SAFE_ENGINE in attempt_engines, so the existing try turns it into SystemExit before anything is written. Add this case to test_rebuild_report.py.

P3. examples/trajectory_replay/verify_metrics.py:62: the audit takes the baseline from key order and does not check the labels that name it.

  • Problem: The audit used to fix the direction as moli over chromium. It now treats the first key of functional as the baseline. It never compares that with relative_ratios.baseline_engine, or with paired_ratios.numerator_engine and denominator_engine. A summary with baseline_engine changed to moli still returned status: pass for three browsers, and so did one with the paired labels swapped for two browsers. The numbers are still audited, and the curated report does not read these labels. Anyone reading summary.json can still be told the wrong direction.
  • Fix: Reject a summary whose labels differ from engines[0] and engines[1], and add these two tamper cases to test_verify_metrics.py. Check that a real two-browser summary still passes.

P3. src/harness/trajectory_replay/report.py:698, and the PR body: two small wording errors.

  • Problem: A one-browser method page says 按任务交替 1 个 Provider 的执行顺序, but one browser has no order to alternate. The PR describes the single-browser case as having no comparisons, and its test does not cover this sentence. Separately, the PR body says two sentences in public_webarena/report.py describe the Chromium-only qualification. There are three: lines 569, 1066 (冷 Chromium 验证) and 1771.
  • Fix: Omit the alternation clause when there is one browser, keeping the two-browser bytes, and assert it in the single-browser test. Change the PR body to say three sentences.

What I verified

  • CI on 4a724d35: Tests and static checks, Installation and packaging, Rendered reference and report checks, and Python 3.11 all pass. The PR is mergeable.
  • Local gates: both ruff commands pass. pytest tests/test_golden_reports.py tests/trajectory_replay tests/browser_use tests/test_explicit_utf8_io.py tests/test_source_language_policy.py gives 2627 passed, 5 skipped.
  • Bytes for the current cohort:
    • No existing golden file changes, and the three new curated snapshots are unchanged since the commit that recorded them.
    • I also rendered old and new report.py side by side on 10 two-browser summaries the snapshots do not cover. They covered all-failed, disjoint failures, no failures, identical metrics in every column, and agent_smoke. All 13 output files were byte-identical in each case.
  • Other participant sets: I rendered three browsers without Moli, one browser, a pair without Moli, and a moli-first pair, keyword-searched every output file and read the home page conclusions. The search found no stale browser names or wrong two-party wording apart from the sentence above. Winner cells, ratio sections and the Moli finding follow the participants.
  • Tests fail without the code: changing all to any in the winner cell fails one test. Forcing relative_ratios=False fails three.
  • Order: the rotation gives the same order as the old code for one and two browsers in the curated, public and Browser Use runners. Public --engines still rejects an empty list before the rotation can divide by zero.
  • Hash-bound files: no file in cohort_reference_hashes is changed. I searched for other source-file bindings of the changed files in src, scripts, evaluation, research and configs and found none. The PR's list of bound files is complete for repository code.
  • Scope of Closes #202:
    • The issue allows the task_id == 225 branch to stay if the PR says why, and the PR does.
    • #205 is open and tracks the remaining bound literals.
    • The synthetic participant-set test is present.
    • The default model appears once in src. examples/trajectory_replay/README.md:129 also names it, which I treat as reader documentation, not a second definition.
  • Not verified: a rebuild from private measured evidence, a real browser run, and the visual release check.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 2: all three findings are fixed, none disputed.

  • 54979fe9: attempt_engines now checks SAFE_ENGINE, so an unsafe row engine ID such as my browser becomes SystemExit before summary.json or manifest.json is written. test_rebuild_report.py covers an older manifest and a declared list. Both cases fail without the fix.
  • 87c651dc: verify_metrics.py rejects a summary whose ratio labels differ from the participant order: paired_ratios denominator and numerator at two browsers (null otherwise), and relative_ratios.baseline_engine when published. New tests cover swapped paired labels, a changed baseline at three browsers and a paired label at three browsers. Summaries from summarize_attempts still pass at one, two and three browsers, including a two-browser run with moli as the baseline. I did not run the audit on a measured summary, because there is no saved replay run on this machine.
  • d5fc2d4e: a one-browser method page omits the order alternation clause, which the single-browser test now asserts. The three-browser test asserts the clause stays. Existing golden route hashes and the curated two-browser snapshots are unchanged.
  • PR body: now says three sentences in public_webarena/report.py describe the Chromium-only qualification (lines 569, 1066 and 1771).

Lint gate passes. pytest tests/test_golden_reports.py tests/trajectory_replay tests/browser_use tests/test_explicit_utf8_io.py tests/test_source_language_policy.py: 2636 passed, 5 skipped, 0 failed.

Left as is: the same one-browser method page still says 分别启动并预热 1 个浏览器 and 资源基线只比较所有 Provider 都成功的同任务. Both are slightly awkward at one browser but still accurate.

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

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 d5fc2d4e against base d894600d. One P3 finding. No P0, P1 or P2 defects. All round 2 findings are fixed.

Finding

P3. src/harness/trajectory_replay/report.py:1193 (also :477): the Moli timing content is only partly gated on Moli being a participant.

  • Problem: the PR renders MOLI_TIMING_FINDING only when Moli takes part, because it is a Moli-specific fact. The analysis page's first section, 时序机制研究, is the study of that same behaviour, and it still always renders: 低频 screencast 或其触发的布局快照 ... 随 screencast 条件系统性变化. I rendered a report with three browsers and no Moli (alpha, beta_x, gamma). Its analysis page opens with a research hypothesis about a low-frequency screencast that no participant in that cohort was shown to have. The home page's 根因边界 sentence also names screencast as a candidate cause and links to that 验证方案.
  • Fix: render the 时序机制研究 section only when "moli" in engines, and do the same for the screencast wording and 验证方案 link in the 根因边界 sentence. Assert both in the three-browser test. The two-browser bytes stay the same. If this text is meant to stay for every cohort, add it to the PR's "Left unchanged" list with the reason instead.

What I verified

  • Round 2 fixes: I removed each of these checks in turn, and the new tests failed each time:
    • the SAFE_ENGINE check in attempt_engines
    • the verify_metrics.py paired label check
    • the verify_metrics.py relative baseline check
    • the one-browser alternation clause
  • Older mechanisms: tests also fail when the winner check changes from all to any, and when rotated_engine_order uses % 2.
  • Byte comparison for two browsers: I rendered the curated report from d894600d and from this head with chromium, moli, and compared the hashes of all 85 generated files. All of them match. The seven scenarios were Chromium leads, Moli leads, tied at full pass, tied with failures, all tasks failed, a run with a retry, a missing metric and an agent smoke section, and an empty summary.
  • Golden snapshots: only cdb8c2a7, the snapshot commit made before the renderer change, touches tests/golden/. No existing route hash changed.
  • Other participant sets: I rendered three browsers with no Moli, one browser, and Moli first, plus three browsers with an empty success intersection. Leftover 双方 and 两个 appear only where they are correct for that set. The text 不是两个 Provider 边际分位数相除 still holds, because each ratio is one pair. The 成功判定 heading's 两个 counts metrics, not browsers.
  • Rotation: rotated_engine_order gives the same order as the old public runner for one or two browsers and the old curated runner for two. Empty engines is still rejected in the public runner before rotation.
  • Runner and entry points:
    • run.sh still gets the same default through the CLI when TRAJECTORY_REPLAY_DIAGNOSIS_MODEL is unset.
    • gpt-5.6-sol now appears in code only in participants.py, plus one README sentence.
    • The new import in cli.py does not load docker, requests or playwright.
    • __PROVIDER_LIST__ is used only by the curated report, which replaces it.
  • Hash-bound files: the PR's diff touches none of the listed files, and nothing under evaluation/. playwright_tool.py and catalog_runner.py do change, but they are not in cohort_reference_hashes, and I found no other binding for them.
  • Scope: Closes #202 is sound. Engine literals in the replay reports and runners and the repeated default model are done, and there is a synthetic test at other participant counts. The remote_execution.py branches and the task 225 branch are explained, and open issue #205 tracks them. The remaining capability literals match the PR's list, including the three sentences at public_webarena/report.py lines 569, 1066 and 1771.
  • Lint and tests: both ruff commands pass. pytest tests/test_golden_reports.py tests/trajectory_replay tests/test_explicit_utf8_io.py tests/test_source_language_policy.py: 2301 passed, 5 skipped, 0 failed. pytest tests/browser_use: 335 passed.
  • CI on d5fc2d4e: all checks pass, including "Tests and static checks", "Installation and packaging" and "Rendered reference and report checks".

Not verified: a rebuild from private measured evidence, a real browser run of the runners, and the visual release check.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 3.

Fixed (f846c06), P3: the timing study (时序机制研究) on the analysis page, and the screencast wording and 验证方案 link in the home page's root-cause sentence, now render only when Moli is a participant. Without Moli the sentence reads 尚不能确认渲染器或适配层中的具体根因 and links to 查看逐任务证据.

The test for three browsers without Moli asserts both pages drop this text. The test for three browsers with Moli asserts both keep it. The curated golden snapshots are unchanged, so the Chromium and Moli bytes are the same.

Disputed: none.

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

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 4

Head reviewed: f846c06. One P3 finding. No P0, P1 or P2.

Finding

P3, src/harness/trajectory_replay/report.py:488, :711 and :1220: a one-browser report still describes ratios it does not render.

The PR says a single browser renders no ratio section and no winner, and the single-browser test confirms that. Three sentences still describe those missing parts when I render ("chromium",):

  • Home page (:488): 绝对值优胜项为绿色粗体;配对比值低于 1 为绿色、高于 1 为红色.
  • Method page (:711): 配对比值的定义和逐项计算过程见首页性能表与计算审计. The link points to a calculation audit that does not exist on that report.
  • Appendix (:1220): 所有 Provider 成功任务与逐任务配对比值审计.

Suggested fix: leave these clauses out when len(engines) == 1, keeping the bytes for two or more browsers. Extend test_report_renders_a_single_participant_without_comparisons to assert that 配对比值 is absent from all three pages. The curated snapshots should stay unchanged.

What I verified

  • Same bytes for two browsers. I rendered the curated report with the base renderer (d894600) and with this head, and compared every route, including the data JSON. There were seven cases: the fixture, an agent_smoke block, a bare manifest, empty ratio metrics, Moli without resources, an empty summary and zero tasks. All were byte-identical. The three curated snapshots do not change after the commit that recorded them, and no existing snapshot changes.
  • Round 3 fix. The timing study, the screencast wording and the 验证方案 link follow Moli's participation, and the tests cover three browsers with and without Moli.
  • Hash-bound files. The diff touches none of the files in cohort_reference_hashes, nothing under evaluation/ and no workflow. A search of src, scripts, evaluation, configs, tests, docs and .github found no hash binding for the changed source files.
  • Shared helpers. rotated_engine_order gives the same order as the old code for one and two browsers, and the public runner rejects an empty engine list before using it. summary_engines matches the old public _engines, apart from the new rejection of unsafe IDs. [engine, "--version"] matches the old command table for both current engines. Nothing still imports the removed helpers.
  • Scope of Closes #202.
    • The default model has one definition in the track's Python, and run.sh no longer names it.
    • Synthetic tests cover one and three browsers.
    • The task_id == 225 branch stays, with a stated reason, and #205 is open for it and for the remaining engine literals in remote_execution.py and remote_runtime.py.
    • The remaining literals I found in this track match the PR's list or are capability branches and comments.
  • Local checks.
    • Both ruff commands pass.
    • The PR's targeted command (tests/test_golden_reports.py tests/trajectory_replay tests/browser_use tests/test_explicit_utf8_io.py tests/test_source_language_policy.py) gives 2636 passed, 5 skipped, 0 failed.
  • CI on this head. All checks pass, including Tests and static checks, Installation and packaging, and Rendered reference and report checks.

Not verified

I did not rebuild from private measured evidence, run a real browser or run the visual release check. The PR lists the same limits.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Review round 4:

Fixed

  • P3, ratio and winner wording on a one-browser report (68534be). With one browser, the home page legend, the method page sentence that links to the calculation audit, and the appendix field row no longer mention paired ratios or winners. I also removed the same wording from the appendix reproduction step, which said "所有比值、分位数和均值". test_report_renders_a_single_participant_without_comparisons now asserts that 比值 and 优胜项 are absent from the home, method and appendix pages. That test fails without the fix.

Reports with two or more browsers keep the same bytes, and the golden route hashes are unchanged.

Disputed

  • None.

@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 · 68534be

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 5

Head reviewed: 68534be. Base: d894600, which is still the tip of main.

No defects found. CI passes on this head.

What I verified

  • Round 4 fix: A one-browser report no longer has the ratio or winner wording on the home, method or appendix pages. The new test assertions fail if the legend condition is removed.
  • Two-browser bytes: I rendered the curated report from the base renderer and from this head, then compared SHA-256 hashes of every output file. All files matched across 40 randomized two-browser runs and one empty summary. The runs varied failures, retries, tied values, zero and missing resource values, and the CowAgent smoke section. This goes beyond the three curated snapshots.
  • Golden snapshots: The diff under tests/golden/ only adds the three trajectory-replay-curated-* files. They were last touched in the commit that recorded them, before the registry change.
  • Other participant sets: I rendered one browser, one browser as Moli, three browsers with and without Moli, and two browsers without Chromium. I read the home, method, analysis and appendix text plus the Markdown. The participant wording, ratio tables, baseline labels and Moli-only sections were correct for each set.
  • Test strength: I made six temporary source changes, and each one failed at least one test:
    • winner check changed from all to any
    • ratio pairs cut to one comparison browser
    • one-browser wording conditions removed
    • relative_ratios turned off
    • registry ordering removed from attempt_engines
    • provider filter list hard-coded
  • Runner order: rotated_engine_order gives the old order for one and two browsers in the curated, public and Browser Use runners, including an explicit reversed public order. The public runner already rejects an empty engine list before reaching the rotation.
  • Imports: Each of the 10 changed or dependent modules I tried imports in a fresh process. participants.py also imports with docker and playwright blocked, so the new import from playwright_tool.py adds no heavy dependency.
  • Hash-bound files: None of the files cohort_reference_hashes records is in the diff. None of the 12 main changed source and script files has its base hash recorded under evaluation/, configs/ or research/.
  • Scope: Every #202 item is either done or has a stated reason. The remote_execution.py engine literals and the task_id == 225 branch are in hash-bound files, so they stay, with the reason in the PR body and the work tracked in #205, which is open. Closes #202 is accurate. Remaining chromium and moli literals in the non-bound replay code match the PR's "Left unchanged" list and the Moli-only sections it describes.

Test results

  • Lint gate: both ruff commands pass.
  • Local tests: pytest tests/test_golden_reports.py tests/trajectory_replay tests/browser_use tests/test_explicit_utf8_io.py tests/test_source_language_policy.py: 2636 passed, 5 skipped, 0 failed, which matches the PR's test plan.
  • CI on this head: Tests and static checks, Installation and packaging, Rendered reference and report checks, and ocr-review all pass.

Not verified

  • A rebuild from measured replay evidence. A search of the local data home, limited to four directory levels, found no replay summary.json.
  • A real browser run of the runners.
  • The visual release check.

lanyue-llk added a commit that referenced this pull request Nov 4, 2026
…saved runs

A manifest without protocol.engines took its order from the first-seen row, so
attempts starting with a moli row moved the ratio baseline to moli. Registered
engines now keep their registry order, followed by unregistered ones. A manifest
whose protocol.engines differ from its rows is rejected before anything is
written, because an unlisted engine would otherwise drop out of the summary.
…ne sentence

The method page kept the two-party wording for any participant count.
…ommand

The public appendix wrote protocol.engines unescaped into its run command.
…articipants

The research page named Chromium and Moli whatever the participant set was. The
join moves to engine_names so both reports share it, and participant_registry
reuses SAFE_ENGINE instead of keeping its own copy of the pattern.
…n rebuild

An empty or null list counted as absent and skipped the disagreement check. Only
a manifest without the key is treated as predating the field.
@lanyue-llk
lanyue-llk force-pushed the refactor/trajectory-replay-registry branch from 68534be to da4c3d1 Compare November 4, 2026 01:49

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

No findings in this review.

@lanyue-llk
lanyue-llk merged commit 0565b4a into main Nov 4, 2026
7 checks passed
@lanyue-llk
lanyue-llk deleted the refactor/trajectory-replay-registry branch November 4, 2026 01:55
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.

Drive Browser Trajectory Replay engines and models from registries

1 participant