Skip to content

Browser Trajectory Replay reports as variants of one track template - #376

Merged
lanyue-llk merged 4 commits into
mainfrom
refactor/replay-report
Nov 24, 2026
Merged

lanyue-llk merged 4 commits into
mainfrom
refactor/replay-report

Conversation

@lanyue-llk

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

Copy link
Copy Markdown
Contributor

Purpose

Browser Trajectory Replay reports move onto the shared report template (spec "Report templates"). The four replay report shapes become registered variants of one track template instead of four page skeletons. This lands the report half of #339. The execution-backend half is listed under "Remaining" below.

flowchart TB
    BT["Base template<br/>reporting/templates.py · shell.py · explorer.py · locales.py"]
    TT["Track template<br/>trajectory_replay/template.py"]
    BT --> TT
    TT --> C["catalog<br/>webarena_report.build_webarena_replay_report"]
    TT --> CA["catalog-acceptance<br/>webarena_report.build_catalog_acceptance_report"]
    TT --> CU["curated<br/>report.write_latest_report"]
    TT --> P["public<br/>public_webarena/report.write_latest_report"]
    CU & P --> FP["core/report.flat_page · replay_table · explorer_labels"]
    C & P --> EX["shared same-task explorer"]
    C --> RC["webarena_report_check: check_template_pages + explorer check"]
    CA --> RV["validate_catalog_acceptance_report: check_template_pages"]
    P --> RB["publication.check_report_bundle: check_template_pages + nav"]
    IC["Instance content (data)"] -.-> C & CU & P
Loading

What changed

  • Track template src/harness/trajectory_replay/template.py: variants catalog, catalog-acceptance, curated and public, each with its own pages, role mapping and editions. The public replay keeps its own profile, target, denominator and file names.
  • One shell: every page goes through reporting/shell.page and templates.compose. Each page now marks its role and slots, and navigation comes from the variant. shell.page accepts base=None because the catalog report's hosted preview sets the base URL itself. The interpretation link is now a regular template page, and the post-hoc _add_interpretation_navigation HTML rewrite is removed.
  • Shared explorer: the catalog and public same-task matrices use reporting/explorer.py. assets/public-webarena-comparison.js and the matrix code in webarena-report.js are removed.
  • Template records: the manifest or audit of each new build records the variant. The release checks run check_template_pages: the catalog check, the public bundle check and the catalog-acceptance package validation. Reports built before this record still pass their earlier checks, so existing published reports keep verifying.
  • Instance prose is now data:
    • The Moli screencast timing study (report.py:366-368) is now bound content: examples/trajectory_replay/moli-timing-content.json, passed with rebuild_report.py --content. The default curated build is generated from data only.
    • The legacy "Chromium 90/90 and Moli 54/90" notice comes from research/trajectory-replay-validity-notices.json, keyed by the measured identity (results, dataset and profile hashes). It still renders for that historical report. The "74 inputs" link uses the measured count.
    • The public selection-rationale prose (public_webarena/report.py:523-536) and the engineering rationales are in evaluation/browser-use-public/benchmark-catalog.json. The 179/4/3/172 counts come from webarena-amd64-scope.json, which is now bundled. The hard-coded "30 条" denominators in the review page come from the suite.
    • Check rules: the unused _check_affected36_comparison ("36 failures") is deleted. The browser and method population check uses data attributes instead of a Chinese phrase. "后续 179 题" leaves the forbidden-term list. The legacy retrieval audit checks internal consistency instead of 37/74.
  • Languages: the curated, public and catalog-acceptance renderers are Chinese only. Each one now writes a report-languages.json record and says so on every page, following the language contract. These flat reports have no language switch.
  • Messages stay in messages.json through reporting/locales. core/report.py joins the message-coverage test, and unused keys are removed.

Breaking changes

  • rebuild_report.py (curated) has a new optional --content. Without it, the Moli timing study and the Moli-specific root-cause wording no longer appear in the default curated report.
  • webarena_report._historical_replay_validity_notice / LEGACY_REPLAY_VALIDITY_INPUTS and _add_interpretation_navigation are removed (internal).

Allowlists

The instance-literal allowlist stays at 1 entry and the layering allowlist at 0. The scanned shared packages are unchanged.

Baselines

The scored records and metrics are unchanged. I compared every table on every page of the replay fixtures (catalog failed/pass/steps, curated ×3, public staged) between main and this branch:

  • All table cells are identical, except:
    • Tables appear in base-template slot order. On the results page the inventory now comes before the comparison.
    • The same-task table has changed from grouped "Official pass / Fail" columns to one column per registered method, as rendered by the explorer.
    • The public review row now states the run's real denominator instead of a hard-coded 30.
  • Route digests change because of the page skeleton (shell, data-page-role, data-slot). The curated and public baselines add report-languages.json.
  • In trajectory-replay.json, the outline changes only by the explorer heading (h3) and the slot order.
  • browser-use.json and browser-use-pass.json change only in the assets/report.js digest. The shared explorer script now initializes immediately when the document is already parsed, so a script inserted after DOMContentLoaded still wires its filters.

Verification

  • uv run --frozen --all-extras python -m pytest tests -n 8 --dist worksteal: all pass.
  • tests/test_report_browser_interactions.py (replay, real browser): pass.
  • make lint-check: pass.
  • uv run --frozen lexbench-webfetch version: the scoring hash is unchanged.
  • Screenshots of the catalog, curated and public pages, compared with main.

Remaining (#339)

The WebArena-Verified catalog loops (webarena_replay, catalog_runner, remote_execution) still need to become local and remote execution backends of core/runner.py, and catalog_acceptance / retrieval_acceptance still need to be registered as evaluator kinds. That work changes live execution code that has no offline coverage of real WebArena runs, so it is left for a separate change. The curated suite still has no standalone release command; its template conformance is tested.

Part of #339, #337, #331, #330

…k template

The curated, WebArena-Verified catalog, catalog-acceptance and public
WebArena reports become registered variants of the trajectory-replay track
template. Each page fills its base-template role and slots through the
shared shell, the manifest or audit records the variant, and the release
checks compare built pages with it (check_template_pages) while reports
built before the record keep their earlier checks.

The catalog and public same-task matrices become the shared explorer.
Instance prose leaves the renderers: the Moli screencast study is bound
report content, the legacy 90-task validity notice comes from a registry
keyed by measured identity, and the public selection rationale and scope
counts come from the benchmark catalog and the frozen amd64 scope. Release
checks drop the dead affected-36 comparison and campaign phrases. The
curated and public reports record that they are Chinese only.

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

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

pages_checked += 1
# Every registered page exists, fills its template role in order, and is in the navigation.
audit = _read_json(reports / f"{REPORT_STEM}-data.json")
variant = check_template_pages(reports, audit.get("template"), TEMPLATE)

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
Pre-template public bundles now fail validation unconditionally: their audit has no template, and check_template_pages calls recorded_variant(None, ...), which raises ValueError. Even bypassing that call would leave the new navigation regex incompatible with the old <nav aria-label="报告分页"> and unquoted aria-current=page markup. Preserve the earlier page/navigation checks when template metadata is absent, and apply the new checks to template-recorded bundles. Add a legacy-bundle regression test to uphold the stated backward-compatibility requirement.

("medium", t("replay.filter.medium", "Medium")),
("complex", t("replay.filter.complex", "Complex")),
])
matrix = explorer.same_task_explorer(

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
The shared explorer wraps its table in .scroll, but this report's stylesheet only gives horizontal scrolling to .table-wrap (and defines no .scroll rule). Its global table { min-width:760px } and main { overflow:hidden } therefore clip the comparison's browser columns on narrow screens with no way to scroll to them. The previous matrix used .table-wrap. Add the shared explorer's scrolling styles to the public report, or give its wrapper the existing scroll-container styling.

ASSETS = Path(__file__).with_name("assets")
REPORT_CSS = (ASSETS / "webarena-report.css").read_text(encoding="utf-8")
REPORT_JS = (ASSETS / "webarena-report.js").read_text(encoding="utf-8")
REPORT_JS = (ASSETS / "webarena-report.js").read_text(encoding="utf-8") + explorer.SCRIPT

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 · high
The shared explorer initializes only from a DOMContentLoaded listener, but _shell loads this bundle through a dynamically inserted external script. That script does not delay DOMContentLoaded, so when it finishes loading after the event (e.g. on an uncached hosted preview), the explorer never initializes: its filters have no listeners and all participant columns remain visible. Initialize immediately when document.readyState !== 'loading', or explicitly initialize the explorers after the bundle loads, rather than relying solely on that event.

outcomes=outcomes, filters={"site": sites[0] if sites else ""}, search=str(task_id),
))
matrix_sites = sorted({(task["task"].get("sites") or [""])[0] for task in tasks.values()})
result_matrix = explorer.same_task_explorer(

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
The shared explorer wraps its table in div.scroll, but this report only loads webarena-report.css, which defines horizontal overflow for .table-scroll and has no .scroll rule. Its global table { min-width:900px } therefore makes the new comparison overflow the page on mobile instead of scrolling inside its container, unlike the previous matrix. Add an overflow rule for the explorer's scroll wrapper (or supply the shared explorer styles) when adopting this markup.

…legacy bundle checks

The shared explorer script initializes at once when the document is already
parsed, so a report that inserts its script after DOMContentLoaded still
wires the filters. The catalog and public stylesheets give the explorer's
table wrapper its own horizontal scroll. Public bundles built before the
template record keep their earlier navigation check.

@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 · 322692e

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

.score-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}.comparison-panel{background:var(--panel);border-radius:11px;padding:14px;margin:14px 0}.matrix-controls{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr)) minmax(210px,1.5fr);gap:12px;align-items:end}.matrix-controls label{font-size:12px;font-weight:700;color:var(--muted)}.matrix-controls select,.matrix-controls input{display:block;width:100%;height:40px;margin-top:5px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit}.comparison-methods{margin:12px 0 0;padding:0;border:0}.comparison-methods legend{font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}.engine-checks{display:flex;flex-wrap:wrap;gap:8px}.engine-checks label{display:flex;gap:6px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:999px;padding:5px 10px;font-size:13px;cursor:pointer}.engine-checks label:has(input:disabled){opacity:.48;cursor:not-allowed}.comparison-table .comparison-row{display:table-row;padding:0;border:0}.comparison-table th:first-child,.comparison-table td:first-child{width:64px;min-width:64px;text-align:center}.comparison-table th:nth-child(2),.comparison-table td:nth-child(2){min-width:300px}.comparison-table small{display:block;font-weight:500}.outcome-list{display:flex;flex-wrap:wrap;gap:7px;min-width:180px}.outcome-pill{display:inline-flex;gap:5px;align-items:center;border:1px solid currentColor;border-radius:999px;padding:3px 8px;text-decoration:none;font-size:12px;font-weight:750}.outcome-pill.ok{background:#f1fbf7}.outcome-pill.bad{background:#fff5f4}@media(max-width:900px){.matrix-controls{grid-template-columns:1fr 1fr}}@media(max-width:760px){.comparison-table .comparison-row{display:table-row;margin:0;border:0}}@media(max-width:600px){.matrix-controls{grid-template-columns:1fr}.comparison-table table{min-width:760px}}
.compact-two{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:560px){.compact-two{grid-template-columns:1fr}}@media(max-width:480px){.result-guide{grid-template-columns:repeat(2,minmax(0,1fr))}.result-guide a span{display:none}}
body>nav{background:#fff;border-bottom:1px solid var(--line);padding:12px max(24px,calc((100% - 1192px)/2));align-items:center}nav a[aria-current=page]{background:#e8eeff;color:#173fa8;font-weight:750}main>p.muted:first-child{font-size:13px;color:var(--accent);font-weight:750;margin-bottom:0}main>h1{margin-bottom:16px}
.same-task-explorer .scroll{max-width:100%;overflow:auto;overscroll-behavior-inline:contain}.same-task-explorer [hidden]{display:none}.outcome-pill.pass{color:var(--good);background:color-mix(in srgb,var(--good) 8%,transparent)}.outcome-pill.fail{color:var(--bad);background:color-mix(in srgb,var(--bad) 8%,transparent)}

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
The shared explorer now puts the task title in the first column, but the existing .comparison-table th:first-child,.comparison-table td:first-child rule still fixes that column to 64px and centers it (previously it contained only the row number). The second-column rule now gives the first browser a 300px minimum instead of the task title. Consequently task titles are squeezed into a narrow column while status cells take the available space. Override or scope these legacy column rules for .same-task-explorer, giving its first column the task-title sizing and subsequent columns status sizing.

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

No findings in this incremental review.

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.

1 participant