Skip to content

WebArena site adapters in the shared environment package #325

Done

Description

@lanyue-llk

Part of the convergence on the repository specification (#313). Rules: 1, 3. Size: M.

Problem

Site-specific login, reset and labels are duplicated outside the environment package (about 36 site-name literals in 7 files).

  • trajectory_replay/public_webarena/webarena_environment.py:478-508, 637-721 holds _login_shopping, _login_reddit, _login_gitlab and a per-site reset chain, separate from environments/webarena/runtime.py:592.
  • Two CdpHarRecorder classes: public_webarena/har.py:138 and environments/webarena/har.py:98.
  • Site sets and labels: trajectory_replay/catalog_contracts.py:412, 441, remote_runtime.py:306, 311, browser_use/selection.py:19, browser_use/report.py:131-134, trajectory_replay/webarena_report.py:1808-1813.

Direction

Define an environment adapter per site in environments/webarena/ with login, reset, label and a stateful flag. The public replay, the catalog replay and Browser Use use it, and one HAR recorder remains.

Done when

  • Site names appear only in site adapters and task data.
  • One login and reset implementation per site, one HAR recorder.

Paths are relative to src/harness/ unless prefixed; line numbers are from main at 997a228.

Activity

  1. added
    refactor
    on Nov 24, 2026
  2. lanyue-llk commented on Nov 24, 2026

    @lanyue-llk
    ContributorAuthor

    Remaining after #350: each site keeps two login flows (form login and header/session login) side by side in its adapter, since merging them would change measured behaviour; the two CdpHarRecorders differ (API, redaction, creator name) and both stay so recorded HAR is unchanged; site names still appear in environments/webarena/ deployment contract and Map setup code.

  3. lanyue-llk commented on Nov 24, 2026

    @lanyue-llk
    ContributorAuthor

    Done in #350 and #372: site adapters in environments/webarena/sites.py own labels, stateful flags, login/reset and data archives; contract check, Map setup and environment CLI read them. Accepted by design: each site keeps its form login and header/session login side by side (merging them would change measured behaviour), and the two CdpHarRecorders stay because their recorded HAR formats differ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactor

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions