Skip to content

Add reproducible Chromium and Moli browser evaluation harness - #2

Merged
lanyue-llk merged 19 commits into
mainfrom
codex/browser-evaluation-harness
Sep 2, 2026
Merged

lanyue-llk merged 19 commits into
mainfrom
codex/browser-evaluation-harness

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Reproducible, Docker-isolated Chromium and Moli browser-tool microbenchmark; one step is one declared tool call, excluding implicit readiness waits.
  • 30 public-web tasks: 5 simple, 10 medium, 15 complex. Tasks have explicit reference actions, exact expected outputs, source attribution, and dataset-hash-bound browser validation evidence.
  • Warm browsers with per-task storage/cache/history reset, fresh renderer pages, verified 1280 × 900 viewports, and isolated per-engine cgroup/network accounting.
  • One primary attempt per task/provider; only failures receive a retry (one by default). Result correctness and result-plus-reference-process correctness are separate metrics. Performance uses the common primary-success task set.
  • Five-page report with provider-specific failure links, task filters, 60 linked task/provider detail pages, reference-versus-actual browser actions, answer comparisons, resource metrics, and modal raw evidence.
  • Absolute provider percentiles and per-task paired-ratio percentiles are separate distributions. An independent raw-data audit checks all 81 metric groups and each ratio's task identity and operands.

Latest report

Chromium 与 Moli 浏览器工具调用评测 · 最新版

This stable Sites link opens the latest published version. Generated HTML,
Markdown, and report data are ignored local outputs, not part of this PR.

Review fixes

  • Shared selector validation rejects unsupported ref-only calls before browser execution, with a descriptive error rather than KeyError.
  • Save attempts, summary, manifest, and integrity hashes before optional diagnostics. Remote diagnostic failures preserve deterministic findings and scoring and record diagnostic error status/type. Final artifacts are rehashed after diagnostics.
  • Previously fixed missing Docker port-binding errors; per-engine dedicated bridges and host-loopback publication restrict CDP exposure. The disabled nested Chromium sandbox remains a documented container-security limitation.

Verification

  • uv run --extra test ruff check harness/browser_use tests/browser_use — passed.
  • uv run --extra test pytest -q — 66 passed, 2 real-container smoke tests skipped in this revision.
  • uv run python examples/browser_use/verify_metrics.py --artifacts artifacts/browser_use/latest — passed: 65 raw attempts, 25 paired tasks, 81 metric groups.
  • uv run python examples/browser_use/rebuild_report.py — regenerated from existing raw attempts; no new benchmark run for these review fixes.
  • git diff --check — passed.

Execution boundary

The formal run is a deterministic browser-provider/tool-call microbenchmark, not an end-to-end CowAgent or LLM Agent ranking. LLMs never judge success; optional LLM diagnostics only explain failures. Docker is the measurement/isolation boundary, not a production deployment recommendation. Browser replay evidence does not imply human sign-off.

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 30s —— View job


PR Review

  • Read PR diff and key files
  • Identify bugs and security issues
  • Post findings

Findings

Bug — KeyError instead of descriptive RuntimeError on missing port binding

runner.py, line ~1210:

bindings = container.attrs["NetworkSettings"]["Ports"][f"{cdp_port}/tcp"]
if not bindings:
    raise RuntimeError(f"{engine}: Docker did not publish CDP port")

If the container exits before ports are registered, the key f"{cdp_port}/tcp" will be absent from the dict and a bare KeyError is raised instead of the readable RuntimeError. The if not bindings guard only fires when the key is present but empty. Fix: use .get().

bindings = container.attrs["NetworkSettings"]["Ports"].get(f"{cdp_port}/tcp")
if not bindings:
    raise RuntimeError(f"{engine}: Docker did not publish CDP port")

Fix this →


Security — CDP port 9222 exposed on 0.0.0.0 inside the container

start-chromium.sh:

--remote-debugging-address=0.0.0.0

Port 9222 is bound to all interfaces inside the container. Port 9223 (the socat proxy) is correctly mapped to 127.0.0.1 on the host, but port 9222 remains reachable to any container sharing the same Docker bridge network. A container on that network can connect to CDP directly and achieve arbitrary code execution in the browser process without going through the socat proxy at all.

Moli has the same exposure via --host 0.0.0.0 in its ENTRYPOINT.

Mitigation options:

  • Add --network none to the client.containers.run() call and communicate via a host-mapped port only (breaking the current socat model), or
  • Use --network=host with a custom iptables rule, or
  • Accept the risk with a documented note that the eval containers must not share a bridge with untrusted containers.

Security — --no-sandbox removes Chromium's internal renderer isolation

start-chromium.sh passes --no-sandbox, which disables Chromium's seccomp/namespace sandbox for renderer processes. If any page in the task suite delivers malicious content (e.g. via a compromised CDN), the renderer has direct access to the container process namespace with no additional kernel boundary. This is standard practice for containerised Chromium but should be noted: the Docker --security-opt no-new-privileges flag is set, which helps, but does not substitute for the sandbox.


No other bugs or security issues found.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33389466373. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Addressed the automated review and reran the formal benchmark.

Changes in 62282ff:

  • fixed the missing Docker port-binding path to raise a descriptive RuntimeError instead of KeyError, with unit coverage
  • placed each engine on its own temporary Docker bridge with no peer containers; CDP remains published only on host loopback, and real smoke verified public-web access plus zero network/container residue
  • documented the Chromium --no-sandbox container-boundary limitation
  • pinned the shared Debian base-image digest and automatically recorded Chromium/Moli versions in the manifest
  • reran the full 100-attempt benchmark under the corrected network topology and replaced the latest-only reports

Updated formal result: Chromium 50/50; Moli 44/50. Moli had five reproducible RFC click-after-scroll failures and one PyPI visible-element failure. On 44 matched passing attempts, Moli/Chromium medians are 2.11× duration, 1.32× CPU, 0.57× peak memory, 1.66× RX, 4.37× TX, and 1.00× output tokens.

Verification: Ruff pass, 20 tests pass, shell syntax pass, real isolated smoke pass, full formal run complete.

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 11s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit
  • Post findings

Previous findings (commit df5f4c9) — status after 62282ff

Bug — KeyError on missing port binding: Fixed. The new _published_endpoint helper (runner.py:143–148) uses .get() at every level, so a missing key raises the descriptive RuntimeError correctly.

Security — CDP port 9222 bound to 0.0.0.0 inside container: Mitigated. Each engine now gets a dedicated Docker bridge network with no peer containers (runner.py:297–313). The 0.0.0.0 binding inside the container is only reachable from that isolated bridge, which has no other containers. Residual risk is negligible for an eval harness.

Security — --no-sandbox: Unchanged and acceptable for containerised Chromium.


New finding in 62282ff

Bug — playwright.stop() unguarded in finally block causes Docker resource leak

runner.py, line 400:

    playwright.stop()          # ← not in try/except
    for container in containers.values():
        try:
            container.remove(force=True)
        ...
    for network in networks.values():
        try:
            network.remove()
        ...

If playwright.stop() raises (e.g. the process already exited or a Playwright internal error), the finally block propagates the exception and the subsequent container and network cleanup loops are never reached. This leaves orphaned Docker containers and bridge networks on the host.

Fix: wrap playwright.stop() in its own try/except, consistent with every other cleanup call in the block.

        try:
            playwright.stop()
        except Exception:
            pass

Fix this →


No other bugs or security issues found.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33391291508. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 0s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous finding (playwright.stop() unguarded) was fixed
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous finding (commit 62282ff) — status after 09b3b80

Bug — playwright.stop() unguarded in finally block: Fixed. The cleanup logic is now extracted into _cleanup_runtime (runner.py:269–293), where playwright.stop() is wrapped in try/except Exception: pass, exactly as recommended. Container and network teardown always runs regardless of whether playwright.stop() raises. A dedicated unit test (test_runner.py:65–100) verifies the continuation behaviour.


No new bugs or security issues found in 09b3b80.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33391650411. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 52s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after ebaa716

Bug — KeyError on missing port binding: Fixed and intact. _published_endpoint (runner.py:143–145) uses .get() at every level.

Security — CDP 0.0.0.0 binding: Mitigated and intact. Each engine uses an isolated Docker bridge with no peer containers.

Bug — playwright.stop() unguarded: Fixed and intact. _cleanup_runtime (runner.py:269–293) wraps playwright.stop() in try/except Exception: pass.


Latest commit ebaa716 — no new bugs or security issues found

The commit rewrites the report generator to Chinese paginated HTML and adds paired_ratios to metrics.py. Reviewed:

  • report.py HTML generation uses html.escape() consistently for all externally-derived strings (task titles, error text, environment JSON). Navigation links and page labels come from the hardcoded PAGES constant — no injection path.
  • metrics.py paired-ratio computation correctly guards division by zero and missing keys before appending to the ratio list.
  • runner.py adds tags, steps, assertions as list() copies to the manifest — safe.
  • test_real_smoke.py passes the isolation network to _cleanup_runtime correctly; Docker resources will be cleaned up even on failure.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33394931603. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 13s —— View job


PR Review

  • Check previous findings status
  • Read latest commit 5cc6ecd diff
  • Scan for new bugs or security issues
  • Post findings

Previous findings — status after 5cc6ecd

All prior findings (KeyError on missing port binding, CDP 0.0.0.0 binding, playwright.stop() unguarded) remain fixed and intact.


New finding in 5cc6ecd

Bug — KeyError: 'selector' when a task uses ref instead of selector

suite.py:65–68 accepts either a selector string or a ref integer for click, fill, and select calls:

if action in {"click", "fill", "select"} and not (
    str(step.get("selector") or "") or isinstance(step.get("ref"), int)
):
    raise ValueError(f"{task_id}: {action} call {index} requires selector or ref")

But executor.py uses hard key access call["selector"] for all three actions (executor.py:55, 58, 63) with no ref fallback:

elif action == "click":
    page.locator(call["selector"]).first.click(timeout=timeout)   # KeyError if ref-only
elif action == "fill":
    page.locator(call["selector"]).first.fill(...)                # KeyError if ref-only
elif action == "select":
    page.locator(call["selector"]).first.select_option(...)       # KeyError if ref-only

A task that passes validation with only ref set will crash the executor with an unhandled KeyError, which is swallowed into the trace but leaves the attempt marked fail with a confusing error. No task in tasks.v2.json currently uses ref, so this is latent, but the validator creates an API contract the executor doesn't honour.

Fix: use .get() with a fallback or resolve ref to a selector string before the action dispatch, and add suite coverage for ref-only calls.

Fix this →


No other bugs or security issues found in 5cc6ecd.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33402864434. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 48s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous finding (KeyError: 'selector' in executor.py) was fixed in latest commit 98e7a7c
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous finding (commit 5cc6ecd) — status after 98e7a7c

Bug — KeyError: 'selector' when a task uses ref instead of selector: Not fixed. Commit 98e7a7c does not touch executor.py. Lines 55, 58, and 63 still use call["selector"] with direct key access. The new tasks.v3.json introduced in this commit uses only selector fields (59 occurrences, zero ref), so run.sh will not trigger the bug — but the validator in suite.py still accepts ref-only calls that will crash the executor. The fix noted in the previous review is still needed.

Fix this →


No new bugs or security issues found in 98e7a7c.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33468663129. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

PR Review

  • Read PR diff and key files
  • Check if previous finding (KeyError: 'selector' in executor.py) was fixed in latest commit faf8dc1
  • Scan latest commit for new bugs or security issues
  • Post findings

View job run

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 17s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous finding (KeyError: 'selector' in executor.py) was fixed in latest commits faf8dc1 and 6bee0df
  • Scan latest commits for new bugs or security issues
  • Post findings

Previous finding (commit 98e7a7c) — status after faf8dc1 + 6bee0df

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

faf8dc1 modified executor.py (timeout defaults, wait_for_text loop, judge_outputs) but did not address the direct key access in the click, fill, and select branches. All three still use call["selector"]:

# executor.py:62, 65, 70
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still accepts ref-only steps as valid. tasks.v4.json has zero ref fields (70 selector), so the bug remains latent — but the validator still creates an API contract the executor doesn't honour.

Fix this →


No new bugs or security issues found in faf8dc1 or 6bee0df.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33475371942. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 26s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous finding (KeyError: 'selector' in executor.py) was fixed in latest commit 0a4b0b1
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous finding (commit 6bee0df) — status after 0a4b0b1

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

0a4b0b1 modified executor.py only to add an outputs parameter to execute_steps(). Lines 63, 66, and 71 still use call["selector"] with direct key access:

# executor.py:63, 66, 71
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still accepts ref-only steps as valid. tasks.v4.json has zero ref fields so the bug remains latent, but the mismatch between the validator contract and executor behaviour is unresolved.

Fix this →


New finding in 0a4b0b1

Bug — diagnose_summary() unguarded in run_evaluation causes data loss when LLM diagnostics fails

runner.py:491–497:

summary = summarize_attempts(rows, engines=tuple(ENGINE_IMAGES))
diagnose_summary(           # ← unguarded
    summary,
    use_llm=llm_diagnostics,
    model=diagnosis_model,
    reasoning_effort=diagnosis_reasoning_effort,
)
manifest = { ... }          # ← never reached if diagnose_summary raises
(output / "attempts.jsonl").write_text(...)   # ← never reached
(output / "manifest.json").write_text(...)    # ← never reached

diagnose_summary → add_llm_diagnoses contains several unguarded failure paths when llm_diagnostics=True:

  • urllib.request.urlopen(request, timeout=timeout_seconds) raises URLError on network failure or timeout
  • payload["choices"][0]["message"]["content"] raises IndexError/KeyError on unexpected API response shape
  • json.loads(response.read()) raises JSONDecodeError on malformed response

Any of these propagate past diagnose_summary(), and because the JSONL/manifest writes come after that call, an entire 60-attempt evaluation run is lost with no artifacts on disk.

Fix: wrap the call in runner.py so evaluation artifacts are always saved regardless of diagnostic failure:

summary = summarize_attempts(rows, engines=tuple(ENGINE_IMAGES))
try:
    diagnose_summary(
        summary,
        use_llm=llm_diagnostics,
        model=diagnosis_model,
        reasoning_effort=diagnosis_reasoning_effort,
    )
except Exception as exc:
    summary.setdefault("failure_diagnostics", {"error": str(exc)})

Fix this →


No other bugs or security issues found in 0a4b0b1.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33477928556. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 57s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit 5d04423
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after 5d04423

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

5d04423 only modifies report.py, test_report.py, and HTML docs. executor.py lines 63, 66, and 71 still use call["selector"] with direct key access:

# executor.py:63, 66, 71
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still validates ref-only steps as valid. No task in tasks.v4.json uses ref, so the bug remains latent, but the validator/executor contract mismatch is unresolved.

Fix this →

Bug — diagnose_summary() unguarded causes data loss: Still not fixed.

runner.py:491–497 still calls diagnose_summary() without a try/except, meaning a network error, URLError, JSONDecodeError, or KeyError in the LLM diagnostics path will propagate before attempts.jsonl and manifest.json are written, losing the entire evaluation run.

Fix this →


No new bugs or security issues found in 5d04423.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33480243502. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 39s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit 3fe8569
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after 3fe8569

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

3fe8569 added _actionability_probe and calls it safely with call.get("selector") in the except block — but the primary dispatch at executor.py:89, 92, and 97 still uses direct key access:

# executor.py:89, 92, 97
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still accepts ref-only steps as valid. No task in tasks.v4.json uses ref, so the bug remains latent, but the validator/executor contract mismatch is unresolved.

Fix this →

Bug — diagnose_summary() unguarded causes data loss: Still not fixed.

runner.py:492–497 still calls diagnose_summary() without a try/except, meaning a URLError, JSONDecodeError, or KeyError in the LLM diagnostics path propagates before attempts.jsonl and manifest.json are written.

Fix this →


No new bugs or security issues found in 3fe8569.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33484810479. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 29s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit 9ed61a7
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after 9ed61a7

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

9ed61a7 does not touch executor.py. Lines 89, 92, and 97 still use call["selector"] with direct key access:

# executor.py:89, 92, 97
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still accepts ref-only steps as valid. No task in the current suite uses ref, so the bug remains latent, but the validator/executor contract mismatch is unresolved.

Fix this →


Bug — diagnose_summary() unguarded causes data loss: Still not fixed.

runner.py:492–497 still calls diagnose_summary() without a try/except. A URLError, JSONDecodeError, or KeyError in the LLM diagnostics path propagates before attempts.jsonl and manifest.json are written, losing the entire evaluation run.

Fix this →


No new bugs or security issues found in 9ed61a7.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33486578866. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 44s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit b9ef54f
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after b9ef54f

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

b9ef54f only modifies report.py, test_suite.py, tasks.v4.json, and HTML docs. executor.py:89, 92, and 97 still use call["selector"] with direct key access:

# executor.py:89, 92, 97
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still accepts ref-only steps as valid. No task in tasks.v4.json uses ref, so the bug remains latent, but the validator/executor contract mismatch is unresolved.

Fix this →

Bug — diagnose_summary() unguarded causes data loss: Still not fixed.

runner.py:492–497 still calls diagnose_summary() without a try/except. A URLError, JSONDecodeError, or KeyError in the LLM diagnostics path propagates before attempts.jsonl and manifest.json are written, losing the entire evaluation run.

Fix this →


No new bugs or security issues found in b9ef54f.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33487095344. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 23s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit 76a909f
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after 76a909f

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

76a909f modifies report.py, metrics.py, diagnostics.py, runner.py, and docs — but does not touch executor.py. Lines 89, 92, and 97 still use call["selector"] with direct key access:

# executor.py:89, 92, 97
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still accepts ref-only steps as valid. No task in tasks.v4.json uses ref, so the bug remains latent, but the validator/executor contract mismatch is unresolved.

Fix this →


Bug — diagnose_summary() unguarded causes data loss: Still not fixed.

runner.py:493–498 still calls diagnose_summary() without a try/except. A URLError, JSONDecodeError, or KeyError in the LLM diagnostics path propagates before attempts.jsonl and manifest.json are written, losing the entire evaluation run.

Fix this →


No new bugs or security issues found in 76a909f.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33491287143. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 33s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commits 76a909f and 80dd0cf
  • Scan latest commits for new bugs or security issues
  • Post findings

Previous findings — status after 80dd0cf

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

80dd0cf modifies only report.py, test_report.py, HTML docs, and fixture files. executor.py:89, 92, and 97 still use call["selector"] with direct key access:

# executor.py:89, 92, 97
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still accepts ref-only steps as valid. No task in tasks.v4.json uses ref, so the bug remains latent, but the validator/executor contract mismatch is unresolved.

Fix this →


Bug — diagnose_summary() unguarded causes data loss: Still not fixed.

runner.py:493–498 still calls diagnose_summary() without a try/except. A URLError, JSONDecodeError, or KeyError in the LLM diagnostics path propagates before attempts.jsonl and manifest.json are written, losing the entire evaluation run.

Fix this →


No new bugs or security issues found in 76a909f or 80dd0cf.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33497207951. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 18s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit 65b6418
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after 65b6418

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

65b6418 modifies only report.py, test_report.py, and HTML docs. executor.py:89, 92, and 97 still use call["selector"] with direct key access:

# executor.py:89, 92, 97
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:71–74 still accepts ref-only steps as valid. No task in tasks.v4.json uses ref, so the bug remains latent, but the validator/executor contract mismatch is unresolved.

Fix this →


Bug — diagnose_summary() unguarded causes data loss: Still not fixed.

runner.py:493–498 still calls diagnose_summary() without a try/except. A URLError, JSONDecodeError, or KeyError in the LLM diagnostics path propagates before attempts.jsonl and manifest.json are written, losing the entire evaluation run.

Fix this →


No new bugs or security issues found in 65b6418.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33497689987. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 28s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit 654e854
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after 654e854

Bug — KeyError: 'selector' when a task uses ref instead of selector: Still not fixed.

654e854 modified executor.py (adding get_attribute / get_property actions, code formatting) but did not address the direct key access in the click, fill, and select branches. All three still use call["selector"]:

# executor.py:85, 88, 93
page.locator(call["selector"]).first.click(timeout=timeout)
page.locator(call["selector"]).first.fill(...)
page.locator(call["selector"]).first.select_option(...)

suite.py:99–102 still accepts ref-only steps as valid for these actions. No task in tasks.v4.json uses ref, so the bug remains latent, but the validator/executor contract mismatch is unresolved.

Fix this →


Bug — diagnose_summary() unguarded causes data loss: Still not fixed.

runner.py:506–511 still calls diagnose_summary() without a try/except. A URLError, JSONDecodeError, or KeyError in the LLM diagnostics path propagates before attempts.jsonl (line 602), summary.json (line 603), and manifest.json (line 609) are written, losing the entire evaluation run.

Fix this →


No new bugs or security issues found in 654e854.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33503951308. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 0s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings were fixed in latest commit 8e5ed0e
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after 8e5ed0e

Bug — KeyError: 'selector' when a task uses ref instead of selector: Fixed. The commit adds validate_selector() to suite.py (lines 89–95) and imports and calls it in executor.py (line 71) before any action dispatch. The old suite validator that accepted ref-only steps (or isinstance(step.get("ref"), int)) has been removed. Both the suite loader and the executor now consistently require selector to be a non-empty string, so a ref-only step is rejected with a descriptive ValueError at load time rather than crashing with a bare KeyError at runtime.

Bug — diagnose_summary() unguarded causes data loss: Fixed. Two changes address this in concert: diagnostics.py now wraps the entire LLM block in try/except Exception (lines 240–257), storing failure details in result["llm"] instead of propagating the exception; and runner.py now calls _write_run_artifacts() before diagnose_summary() (line 618) as belt-and-suspenders. Either change alone would prevent the data loss; together they are complete.


No new bugs or security issues found in 8e5ed0e.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Addressed both outstanding findings in 8e5ed0e.

  1. Validator/executor selector mismatch: reproduced all three ref-only calls (click, fill, select) against the previous committed code: validation succeeded, then execution raised KeyError: 'selector'. The shared validator now requires an explicit non-empty string selector in both suite loading and direct execution. No speculative snapshot-ref resolver was added. Regression tests cover ref-only, empty/whitespace and non-string selectors, plus failure traces without browser actions.
  2. Diagnostic failure losing run evidence: core attempts, summary and manifest (including SHA-256 hashes) are persisted before diagnostics. Optional LLM errors are caught at the diagnostic boundary, preserving rule-based failure groups and scores. Error status/type is recorded without potentially sensitive remote exception text. Final artifacts are updated and rehashed after diagnosis. Tests inject URLError, JSONDecodeError, missing response keys and missing credentials; mocked full-run tests verify evidence exists before diagnosis, report generation continues on remote failure, hashes match, and runtime cleanup still occurs. Even an unexpected diagnostic implementation exception leaves the pre-diagnostic artifacts intact.

Verification after report regeneration: 66 passed, 2 real-container smoke tests skipped; Ruff passed; independent audit passed for 65 raw attempts, 25 paired-success tasks and 81 metric groups. No benchmark results or oracle values were changed for these fixes.

This commit also includes the previously published report/UI work: provider-specific failure navigation, suite filters, linked case details, modal evidence, explicit browser action labels, and the public-suite 5/10/15 difficulty mix. The PR description now reflects the current report rather than the obsolete 10-task run.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33600787704. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 1m 1s —— View job


PR Review

  • Read PR diff and key files
  • Check if previous findings remain fixed in latest commit 3b5c8f9
  • Scan latest commit for new bugs or security issues
  • Post findings

Previous findings — status after 3b5c8f9

Bug — KeyError: 'selector' when a task uses ref instead of selector: Fixed in 8e5ed0e and intact. 3b5c8f9 does not touch executor.py or suite.py.

Bug — diagnose_summary() unguarded causes data loss: Fixed in 8e5ed0e and intact. 3b5c8f9 does not touch runner.py or diagnostics.py.


Latest commit 3b5c8f9 — no new bugs or security issues found

The commit removes generated HTML/JSON report artifacts from the repository, adds /docs/reports/browser-use-evaluation-* to .gitignore, and updates README.md and examples/browser_use/README.md to link to the hosted report instead. No executable code was changed.

@github-actions github-actions 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.

Automated Claude review completed. Review run: https://github.com/lexmount/browser-harness-eval/actions/runs/33601617737. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk
lanyue-llk merged commit 63c7a36 into main Sep 2, 2026
1 check passed
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