Skip to content

refactor(privacy): clear internal data from the public tree - #141

Merged
lanyue-llk merged 24 commits into
mainfrom
refactor/remove-exposed-internal-data
Nov 3, 2026
Merged

lanyue-llk merged 24 commits into
mainfrom
refactor/remove-exposed-internal-data

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 #147.

Part of the #87 refactor roadmap.

Summary

Clears internal dev hostnames, the recording gateway, private addresses, a local username, Artifact Site share links and site slugs, WebArena site passwords and deployment identifiers from the current tree. Values still needed at runtime move to variables named in .env.example, with real values kept in the local gitignored .env.

This is a correction of inputs. Frozen replay inputs are rewritten and their bindings updated, and that invalidates earlier evidence as listed under "What this invalidates". No stored verdict or measured evidence is patched. Original bytes are archived privately outside Git, under the data home's private-originals/.

New dataset edition. This PR pins WebArena Replay 1.0.1 of Lexmount/LexBench-WebArena-Replay (ede6b17c21cef8a496b61e81c365934db5443919). Its exported task questions, actions and evaluator inputs are unchanged. Its definitions change only the hashes that bind the corrected Browser Eval sources. The data lock keeps the previous edition in history. The manifest records a source_revision that was a local build commit and was never published; the manifest is immutable, so docs/releases.md and a note beside the lock entry state this, and revision identifies the edition. The Hub tags v1.0.0 and v1.0.1 resolve to the previous and current editions pinned in the data lock.

The guard has no exemptions and passes on the whole tree.

Git history is deliberately not rewritten, by owner decision. Earlier commits and this PR's removed diff lines still show the old values.

Variables

All are empty in .env.example.

Variable Replaces Behaviour when empty
WEBARENA_{SHOPPING,SHOPPING_ADMIN,REDDIT,GITLAB}_{USERNAME,PASSWORD} (existing names) Credentials in topology.json Read only from the repository .env; exported values do not override it. Runs that log in stop before any site or browser starts, and Browser Use redaction and its report privacy check stop, naming the variables. Offline tools do not need them
WEBARENA_RECORDING_GATEWAYS (optional) Recording gateway in topology.json Current inputs do not need it. Rebinding a private-address recorded URL that the variable does not list stops, naming the variable. So do the Browser Use package gate and release check when public text still holds a private address. Entries must be bare hostnames or IPv4 addresses; hostnames match and redact in any case
WEBARENA_HOST_OVERRIDE_PATTERN, WEBARENA_HOST_OVERRIDE_ADDRESS host_overrides in environment.json Chromium and Kitesurf replay stop, naming the variables, including when the env file is absent
WEBARENA_ACCEPTANCE_APP_ID, WEBARENA_SOURCE_APP_ID, WEBARENA_SHARED_MAP_APP_ID, WEBARENA_SHARED_WIKIPEDIA_APP_ID deployment in environment.json Replay preparation stops, naming the variables
WEBARENA_RAINBOND_TEAM team in environment.json Named by the profile only. No code reads it
WEBFETCH_REPORT_EXAMPLE_URL, TRAJECTORY_REPLAY_REPORT_EXAMPLE_URL, BROWSER_USE_REPORT_EXAMPLE_URL Example links in configs/report-templates.json Optional. scripts/report_template.py shows an empty example, and report manifests never carry them

Site accounts come only from the repository .env through harness.env_file.repository_credential, so a run and the redaction of its public output use one value. Other variables here use harness.env_file.local_setting: an exported variable wins, then the file given to --credential-env-file, then the repository .env. Importing the code reads no file. Kitesurf credentials predate this and come only from the env file. #159 tracks the public WebArena login path, which still reads the process environment. The site account values are the default accounts of the self-hosted WebArena images; .env.example and the public replay README link to the upstream list.

Redaction tables are built from the resolved credentials and any listed gateways. Tests use synthetic values from tests/conftest.py.

How requests resolve

Corrected inputs use the recorded container host, which the existing rebinding already maps to the site map by port. Requests reach the same site path as before for every input that used the gateway.

Six tasks (243, 404, 464, 590, 658 and 714) named internal slice hosts directly. The rebinding path did not recognize those hosts, so their requests stayed on those hosts. They now resolve to the sites in your site map, which is a behaviour change for those tasks and is what a replay should do.

File-by-file treatment

Paths marked D/ are under evaluation/trajectory-replay/webarena-verified/.

Files Treatment Rebinding
D/trajectories.json, D/trajectories-corrected.json, 18 retrieval candidates and 7 trajectory candidates Host values in tool calls become the recorded container host Digests inside each file, D/retrieval-candidates/qualification-matrix.json, D/retrieval-candidates/recompiled-seed-bindings.json, D/cohort-step-roles.json, D/cohort-diagnostic-variant.json, D/dataset-revision-bindings.json, D/trajectory-candidates/task-510.json, research/browser-use-trajectory-replay-bridge.json, research/trajectory-replay-contract-audit.json and the task 243 and task 510 research records. The legacy replay identity in webarena_report.py keeps its original hash, so archived evidence keeps its disclosures
research/trajectory-replay-task280-revised-reference.json, task282-revised-reference.json, research/trajectory-replay-task67-reference-audit.json Internal hosts become reserved .example hosts D/task-corrections.json; D/retrieval-candidates/task-67.json and the bindings above
research/browser-use-bridge-inputs/trajectory-run-profile.json Share link and slug removed; gateway becomes a neutral label research/browser-use-trajectory-replay-bridge.json
src/harness/benchmarks/data-lock.json Pins the new edition through harness.benchmarks.pinning Previous edition kept in history
evaluation/trajectory-replay/webarena-verified-full/environment.json Routing, team and app IDs become variable names Runs record a hash of the resolved routing in inputs.json; acceptance carries it and rejects mixed routing
src/harness/environments/webarena/topology.json Credentials and gateway become variable names None
research/trajectory-replay-failure-review.json, research/trajectory-replay-reviews/20260920-three-method.json Evidence paths are relative to the data home; selector hosts use a reserved domain No binding in Git
research/report-changes.json, evaluation/dynamic-content-100-moli-webfetch/current-local-results.json, evaluation/publication-archives.json, evaluation/webmainbench-content-binding.json Share links, slugs and an unread link removed None
configs/report-templates.json Example links become example_env and example_version tests/golden/web-fetch.json
src/harness/browser_use/report_check.py Forbidden-text rule is built on use from resolved passwords None
Test fixtures Reserved or generic values, synthetic credentials, a generic server path None; no hash-bound or golden value depends on them

Golden change: only report-manifest.json in the web-fetch snapshot changes. Its template block has example_env and example_version instead of a link. No rendered page changes.

Docs changed: docs/benchmarks.md (input correction and maintainer steps), docs/releases.md (edition entry), docs/architecture.md (how to obtain a pinned export), docs/trajectory-replay-protocol.md, deploy/webarena/README.md, examples/trajectory_replay/public_webarena/README.md, the full replay README, .env.example, and the dataset card source src/harness/benchmarks/cards/webarena-replay.md. docs/releases.md limits direct comparison to exported tasks and names tasks 280, 282 and the six rerouted tasks. The card's new "Versions" section reaches Hugging Face with the next dataset commit.

What this invalidates

What changed What becomes stale or stops What a maintainer must do
Correction records for tasks 280 and 282, whose digests include the new reference hashes Stored attempts for those two tasks fail as a stale correction binding. The corrected task contract is unchanged Re-evaluate those tasks under the new records, or check old attempts against the archived originals
D/task-corrections.json file hash An ordered sweep crossing this change stops as a changed execution contract. A resumed run stops with resumed run inputs changed Start a new run or sweep
Corrected candidates and D/cohort-step-roles.json Any frozen cohort manifest recording an old source_revision stops with revised source actions changed Freeze a new cohort manifest and qualify it
Corrected candidates and D/retrieval-candidates/qualification-matrix.json Qualification receipts refer to the old candidate bytes. Manifests holding an old contract digest are stale Requalify those tasks
D/trajectories-corrected.json and D/trajectories.json hashes A profile binding the old file hash stops Update the bound hash, or select the earlier edition by revision
Pinned catalog and corrected-dataset hashes A profile or ledger binding the old hash no longer matches the current edition Keep selecting the earlier edition by revision, or update the binding for a new run
environment.json file hash A resumed run stops with resumed run inputs changed. Completed runs keep their recorded hash Set the variables and start a new run
Bridge hash A Browser Use instance profile stops with a hash error Update trajectory_replay_bridge.source_sha256
Failure review bytes Existing package attestations stop at publication Repackage the replay report
Report template registry A saved Web Fetch report fails report_check Rebuild it
Credentials Runs that log in and public Browser Use redaction need the repository .env; exported values no longer count. Offline tools do not need accounts Copy the values into it
Older evidence that used the gateway The Browser Use package gate and release check stop, naming the variable, until that host is listed Set WEBARENA_RECORDING_GATEWAYS and rebuild

Published report versions and earlier dataset revisions are unchanged. A scan of all nine earlier revisions of the dataset repository found none of the cleared hosts or the local username.

What remains

  • Addresses: the reserved documentation range, and generic private values in tests that need one, limited to 10.0.0.0/24, 172.16.0.0/24 and 192.168.0.0/24. The guard rejects any other private address by range. It keeps no address digest, because an IPv4 digest can be brute-forced.
  • Site usernames that appear as task data in frozen inputs, reference files and tests.
  • The reviewer field in research/risk-control-navigation-language-revision.json, by owner decision. It is the owner's public GitHub login, and the file is hash-bound by three tracked files.
  • Public product endpoints, commit authors and image digests.

Review fixes after the edition

  • Env files must be regular files: a FIFO or directory now fails at once in the shared parser instead of hanging, and the null device reads as empty.
  • The replay environment page never names a recording gateway.
  • Offline tools no longer resolve site accounts, because nothing reads EnvironmentConfig.credentials. Each run entry checks them first, so a run stops before any site or browser starts.
  • Private addresses use one recognizer in harness/reporting/privacy.py; public replay replaces a match, and Browser Use stops with an error that names the gateway variable.

Test plan

Local runs used the repository's pytest and ruff through an existing virtualenv, with pytest -o pythonpath="src .", which does not reach subprocesses. CI runs those tests properly.

  • Ruff, both Makefile invocations: pass
  • Local run of tests/test_public_tree_privacy.py, tests/test_golden_reports.py, tests/environments, tests/browser_use, tests/trajectory_replay, tests/test_env_file.py, tests/test_report_templates.py, tests/test_config.py and tests/test_local_path_privacy.py at 97b5a779: 2698 passed, 5 skipped. One failure is a subprocess test that local -o pythonpath does not reach; CI passes it
  • tests/benchmarks, tests/test_documented_paths.py and tests/test_public_tree_privacy.py at 97b5a779: 11368 passed
  • Tool calls compared with main: 193 calls changed, only in host values within url or text. The 29 changed input files hold 207 task records and 1,806 calls; all 53 trajectory and candidate files hold 231 records and 1,885 calls. The same 193 changes appear in both sets
  • Rebinding compared with main over the 29 changed input files: identical for 200 task records. The other 7 records are the six tasks above, with task 243 appearing twice. An independent review over all 53 files found 224 of 231 identical, with the same 7
  • Dataset definitions compared with the previous edition: 212 values changed, all hashes (2 inside an embedded JSON string); task questions, actions and evaluator inputs are unchanged
  • Pin and fetch: all 17 definition files verify against the lock after a fresh download through the supported path; the merged release archive matches the build scanned before publication
  • Offline replay against the pinned edition, with the variables set and local stub sites: all 812 catalog rows compile; 868 catalog and 119 corrected-dataset navigation requests all reach the stub deployment; 14 real Chrome navigations for the corrected tasks also reach it
  • git grep at the head: no internal host, gateway, local username or cleared fixture address
  • CI at 97b5a779: all checks pass, including the full suite with its subprocess tests
  • Not run: a live WebArena replay. No reachable WebArena environment exists here, so the official evaluator did not score a live run of this edition

Frozen-binding checks covered Git and the JSON and JSONL files in this host's data home, including canonical digests of subtrees. This host holds no trajectory replay run evidence, so a hash recorded only on another host would not have been found.

@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

Head reviewed: c88a149e. No P0 or P1 findings. Findings below are P2 and P3. Internal values are deliberately not quoted.

Findings

P2. Guard does not cover addresses. tests/test_public_tree_privacy.py:61-65
Problem: the PR clears the private routing address, but the guard has no address check. Appending a private IPv4 address to a tracked doc still passes, so the cleared address could return unnoticed.
Fix: add a digest set for the cleared address, the same way as the domain, or reject private ranges outside an explicit fixture allowlist.

P2. Other private addresses remain in test fixtures; owner should confirm them. tests/trajectory_replay/public_webarena/test_webarena_environment.py:281, tests/trajectory_replay/public_webarena/test_publication.py:14, tests/test_cohort_exclusions.py:12, tests/test_network_preflight.py:9
Problem: these use addresses in the same private /16 as the cleared routing address. test_publication.py:14 also has a server path that looks real. I cannot tell from the tree whether they are real, but the PR moved similar fixtures to the documentation range and left these.
Fix: confirm with the owner. Use 192.0.2.0/24 where any address works, and a generic 10.0.0.x where the test needs a private one.

P2. environment_host_overrides_sha256 has no test. src/harness/trajectory_replay/catalog_runner.py:666-670
Problem: the file hash no longer covers routing, so this key is now the only binding for it, and nothing protects it from regression. A throwaway probe through main() showed it behaves correctly (see Verified).
Fix: commit that test: key present for Chromium, same values resume, changed address stops with resumed run inputs changed, key absent for moli.

P3. Acceptance records do not carry the routing binding. src/harness/trajectory_replay/catalog_acceptance.py:401
Problem: environment_profile_sha256 in run_record no longer identifies the route, so two runs with different routing now show the same value. The new key is covered only indirectly, through inputs_sha256.
Fix: copy the key into run_record when present, as action_overrides_sha256 already is.

P3. Missing .env gives an error that does not name the variables. src/harness/trajectory_replay/catalog_runner.py:140, :539
Problem: Chromium replay did not need this file before. Without it the error is credential environment file must be a regular file, while the PR body says the error names any missing variable. The --credential-env-file help still says the file is for a remote browser.
Fix: name the variables in _load_environment_profile when the file is absent, and update the help text.

P3. Guard misses some home and share forms. tests/test_public_tree_privacy.py:61, :63
Problem: confirmed by mutation, all of these pass: file:///Users/<name>/x, PATH=/bin:/Users/<name>/bin, and a preview URL with __artifact_share=<token>. src/harness/trajectory_replay/webarena_report.py:2075 generates that preview shape.
Fix: allow / after file:// and : in the lookbehind, and match __artifact_share=, with paired controls.

P3. Exemptions are by path only. tests/test_public_tree_privacy.py:38, :109
Problem: a new internal host added to an exempted file passes (confirmed by mutation), and the "byte-identical" claim is not enforced. The guard file also skips its own home and share scan, so a real home path added there passes.
Fix: map each exempted path to its SHA-256 and assert it. Build the guard's synthetic strings so they do not match, then drop is_guard.

P3. Relative review paths are tested only at the helper. src/harness/trajectory_replay/webarena_review.py:106, :150, src/harness/trajectory_replay/webarena_report.py:319
Problem: no committed test sends a relative path through load_validated_failure_review or _load_artifact. The helper itself is correct, and _load_artifact passed in my probe.
Fix: add a relative path case to the existing review test.

P3. Binding no longer says where the pinned export lives. docs/architecture.md:131, evaluation/webmainbench-content-binding.json
Problem: no code reads source.url, so nothing breaks. But the doc says to restore from the binding's pinned export, and the version and hashes can only validate an export, not locate one. The removed slugs in research/report-changes.json and current-local-results.json have the same effect.
Fix: state in the doc how a maintainer obtains the export, for example a private variable like example_env.

P3. PR body wording on the username. research/risk-control-navigation-language-revision.json:8
Problem: this reviewer field holds a public Git login that contains the local username, so "the local username does not appear" holds only for home paths. The file is hash-bound by three tracked files. This is informational and I would not change the file.
Fix: note it in the PR body as a public identity.

Verified, no finding

  • Item 1, routing variables. Set values give the same resolved host_overrides, Chromium rule and Kitesurf bridge options as the old literal form. Unset, partial and blank values stop with an error naming the variables. A comma in a value is rejected. The hash is stable across quoting and whitespace, and a change or a resume of a pre-change run stops. No other reader of host_overrides exists. Kitesurf main() was not run, only its option function. No live replay.
  • Item 2, hash bindings. No old hash of a changed file appears at the head or in this host's data home, datasets included. The bridge rebinding matches the new file hash and is the only change in that file. Exemptions: task-243, trajectories-corrected and task67 are bound by file hash in the pinned dataset. task-404 and task-464 match recomputed action digests in publication-input-bindings. task-714 is bound in cohort-step-roles.json, and task280 and task282 in task-corrections.json. task-590 and task-658 match no digest. Their stem appears in the dataset only as a candidate_id, not as a path. This host has no replay run evidence, so hashes recorded only elsewhere were not checked.
  • Item 3, removed fields. Readers of site_slug, slug and share_url take instance profiles, receipts or publication targets, not the edited files. The bridge reads the trajectory profile only for its hash. No reader of report-changes or publication-archives needs the removed values. example is read only through discover_template.
  • Item 4, review paths. Empty, .. and symlink paths are rejected. Absolute paths behave as before.
  • Item 5, guard. Host, home, share and guard-file host mutations fail as intended. exempt_hits works as a live positive control for the real digest. CI's full suite passed in tracked-file mode.
  • Item 6, golden. The one line changed is report-manifest.json in web-fetch.json, because published_snapshot.py:231 writes resolve_template. The other goldens use template_identity, which is unchanged.
  • Item 7, cleared values. Share tokens, slugs, the routing address and the hosts removed by this PR do not appear outside the eight exempt files. The internal domain, private addresses, home paths and share links do not appear in the PR body or commit messages. The body mentions only the documentation range.
  • Tests. With PYTHONPATH set, so subprocess tests were covered: 18924 passed, 18 failed, 60 skipped. 15 of the failures are on the known local list. The other 3 are in tests/test_optional_reports.py and fail the same way on the base. CI at this head: all five checks pass.

lanyue-llk added a commit that referenced this pull request Nov 3, 2026
@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Independent review, round 1: fixes

Head: ba9ac88e. All CI checks pass.

Finding Fix Commit
1. Guard does not cover addresses Rejects cleared addresses by digest and private ranges outside generic fixture networks ad06e050, tightened in ba9ac88e
2. Private addresses and a server-like path in fixtures Reserved or generic values and a generic path. No hash-bound or golden value uses them 74e2e253, remainder in ba9ac88e
3. Routing binding has no test Runner test: present for Chromium, same values resume, changed address stops, absent for Moli e745a8da
4. Acceptance records lack the routing binding Copied into run_record when present, with a test bd1826b7
5. Missing env file error does not name variables Names them, and the help text is updated 817aca38
6. Guard misses home and share forms Catches file URLs, PATH entries and preview share tokens, with paired controls c11fb917
7. Exemptions by path only; guard skips itself Exemptions map to SHA-256 and are asserted; is_guard removed 600cb162, list replaced in ba9ac88e
8. Relative review paths tested only at the helper Test goes through load_validated_failure_review and _load_artifact 4aac98fe
9. Binding does not say where the export lives docs/architecture.md explains how a maintainer obtains it 72e6e58f
10. Username wording in the PR body Noted in the PR body; file unchanged PR body

Later owner decisions on clearing frozen inputs are in 2d05c455, 2db35848 and ba9ac88e. The PR body lists what they invalidate.

Disputed or not fully done

Finding 7 asked for an exact-byte exemption, and that is in place. The later instruction to remove path exemptions entirely is not fully met, because 22 files remain exempt at their exact SHA-256.

Evidence: a pinned dataset outside this repository binds them, directly or through a chain, by file hash or action digest. publication-input-bindings.json holds the digests, and corrected-90-v1 and full-812-v1 hold file hashes. The data lock pins that dataset's commit and file hashes, so neither side can be changed from this repository. Clearing them needs a new dataset edition first.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Correction to my earlier comment: finding 1 no longer uses address digests. An IPv4 digest can be brute-forced, so 63dee533 removed them. The guard now rejects private addresses by range, with synthetic paired controls.

@lanyue-llk
lanyue-llk force-pushed the refactor/research-data-and-stale-docs branch from efc1279 to 0ebf206 Compare November 3, 2026 06:03
Base automatically changed from refactor/research-data-and-stale-docs to main November 3, 2026 06:14

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

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

value = os.environ.get(name)
if value is None:
value = dotenv_values(repository_root() / ".env").get(name)
return (value or "").strip()

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: Preserve credential bytes when resolving configuration. site_credentials() uses this helper for passwords, so a quoted .env value such as WEBARENA_GITLAB_PASSWORD=" secret " (or the equivalent environment value) becomes secret before being passed to EnvironmentConfig and the login helpers. Leading/trailing spaces can be significant in a password, causing authentication to fail despite correctly configured credentials. Return the original value for credentials and restrict whitespace normalization to settings such as the gateway list; add a credential-resolution test with significant whitespace.

Comment on lines +413 to +416
if "environment_host_overrides_sha256" in binding:
run_record["environment_host_overrides_sha256"] = binding[
"environment_host_overrides_sha256"
]

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: The resolved routing digest is copied into the acceptance record but is never compared in participant_contract or segment_contract. With routing now supplied by .env, two sweep segments can use different override addresses while keeping the same site map, preparation receipt, profile bytes, and revisions; audit() accepts them as one unchanged deployment even though their browser traffic can reach different deployments. Include this digest in the deployment/participant identity comparison (with compatible handling for historical runs without the field), and add a negative test for segments with different routing hashes.

aliases[alias] = full_name
fields.append(
f'{alias}: repository(owner:{json.dumps(owner)}, name:{json.dumps(name)}) {{'
" nameWithOwner url stargazerCount isFork isArchived description "

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security · high
P1: Recheck visibility before verifying historical candidates. refresh() unions previously discovered repositories, but this metadata query does not request isPrivate and eligibility checks only archive status, stars and activity. If a formerly public repository becomes private and the authenticated gh account still has access, its current private HEAD and blob fingerprints are fetched and written to the survey. report_build.py copies that survey into public report packages. Request and enforce current public visibility before fetching files or persisting refreshed metadata, and add a regression case for a historical candidate that is now private.

'searches': searches, 'included': included, 'scope': SCOPE,
}
refresh(previous_snapshot=previous, discovered=result)
print('COMPLETE', len(QUERIES), 'providers', len(included), 'included repositories', flush=True)

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 · low
P2: This completion count is the preliminary search count, not the saved verified count. refresh() can reject current search hits whose signatures are absent at HEAD and add historical-only candidates, but it does not update this local included list. Consequently the final COMPLETE message can contradict both the preceding Verified message and the persisted survey. Return the verified count from refresh() (or omit the count here) so completion reports the actual result.

@lanyue-llk
lanyue-llk force-pushed the refactor/remove-exposed-internal-data branch from ace70f6 to 355ebec Compare November 3, 2026 06:23

@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 · 355ebec

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

value = parse_env_file(repository_root() / ".env").get(name)
except FileNotFoundError:
value = None
return (value or "").strip()

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: Preserve credential values verbatim rather than stripping them in the shared resolver. For example, a quoted .env assignment WEBARENA_GITLAB_PASSWORD=" secret " is preserved by parse_env_file, but this line changes it to secret; site_credentials() then passes the wrong password to site login. This affects credentials with meaningful boundary whitespace now that credentials are configurable. Return the original value here, normalize gateway names at their existing parsing boundary, and validate blank credentials separately without modifying their contents. Add a quoted-password regression case.

Comment on lines +413 to +416
if "environment_host_overrides_sha256" in binding:
run_record["environment_host_overrides_sha256"] = binding[
"environment_host_overrides_sha256"
]

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: The resolved routing digest is copied into the ledger but never compared in participant_contract or segment_contract. Two Chromium/Kitesurf segments can therefore use different local override addresses while keeping the same profile, site map, receipt and revisions, and audit() will accept them as one ordered sweep. Moving routing out of the versioned profile makes this a mutable execution input; recording it alone does not enforce deployment consistency. Include this digest in the deployment/participant contract comparison (using .get() to preserve compatibility for historical runs without it), and add a negative test with two otherwise-identical segments using different routing digests.

@lanyue-llk
lanyue-llk force-pushed the refactor/remove-exposed-internal-data branch from 355ebec to 7d73007 Compare November 3, 2026 06:33

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

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

value = parse_env_file(repository_root() / ".env").get(name)
except FileNotFoundError:
value = None
return (value or "").strip()

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: Preserve credential bytes rather than stripping them. parse_env_file() preserves whitespace inside quoted values, but a setting such as WEBARENA_GITLAB_PASSWORD=' secret ' is now resolved as secret. SITE_CREDENTIALS passes that altered value to authentication, so a valid configured password cannot log in. Return the original value for credentials; apply whitespace normalization only to settings such as gateway names (and separately validate missing/blank values). Add a quoted-password/environment-value regression case.

Comment on lines +412 to +415
if "environment_host_overrides_sha256" in binding:
run_record["environment_host_overrides_sha256"] = binding[
"environment_host_overrides_sha256"
]

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: Enforce the resolved routing digest when comparing acceptance runs, rather than only copying it to the output. With routing now resolved from .env, two sweep segments can have identical profile, site-map, receipt and runtime identities but different environment_host_overrides_sha256 values. Neither participant_contract nor segment_contract compares this field, so the audit accepts segments routed to different hosts as one unchanged execution contract. Include the digest in the deployment/participant comparison (preserving compatibility for historical runs without the field), and add a negative test combining otherwise matching runs with different routing digests.

Comment on lines +151 to +152
if site is None and parsed.port in by_port and _is_private_ipv4(parsed.hostname):
require_recording_gateways()

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: Reject an unmatched recorded private host even when another gateway is configured. With WEBARENA_RECORDING_GATEWAYS=192.168.0.3 and a frozen URL http://192.168.0.2:7780/admin, this branch calls a check that only tests whether the gateway tuple is nonempty; it then returns the original URL because site remains None. Moving the previously fixed gateway to configuration thus allows an incorrect/incomplete setting to silently leave frozen actions targeting the old deployment instead of the selected remote site. Raise an actionable configuration error for this unmatched-private-host case, rather than treating any nonempty gateway setting as sufficient, and test a nonempty but mismatched setting.

@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 · 37df36f

No findings in this incremental review.

@lanyue-llk
lanyue-llk force-pushed the refactor/remove-exposed-internal-data branch from 37df36f to 9f26e6b Compare November 3, 2026 07:30

@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 · 9f26e6b

No findings in this review.

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

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

(
"abaaa0e90aced74a831093f2d6d7c3371639acb984b3a2c057f3cc39632ea935",
"61bb38bce552b5c7eea0e1f5fcca1bc898f55e2e39ee6e72498cff346ca1e4e3",
"36ce56e10b1e8fa0f23dda916628c4dabb56576968d4bff1926cafe2706e1f0a",

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: Preserve the original legacy identity. This tuple identifies measured historical evidence, not a binding to the current repository dataset. build_webarena_replay_report checks that the results' embedded dataset_sha256 matches the selected dataset before consulting this set. Keeping the original results hash while replacing only the dataset hash therefore cannot identify that historical run with the rewritten dataset; rebuilding with the archived original inputs instead no longer matches the set, silently omitting both the historical-validity warning and legacy retrieval provenance. Retain the original tuple so archived evidence keeps its disclosures; add another identity only if separately bound results actually exist.

@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 · 9efc2e5

No findings in this incremental review.

lanyue-llk added a commit that referenced this pull request Nov 3, 2026

@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

Head reviewed: 9efc2e54. CI at this head: all checks pass. No P0 or P1 findings. Replay behaviour, scoring inputs and the rebindings hold up. There are two P2 findings, both in how the moved values are handled, and six P3 findings. Internal values are deliberately not quoted.

Findings

P2. Unset WEBARENA_RECORDING_GATEWAYS silently leaves the recording address in public Browser Use output. src/harness/environments/webarena/topology.py:78, :131, :142, src/harness/browser_use/publication.py:27, :32, src/harness/browser_use/report_check.py:52
Problem: on main this host was always redacted. Now it is redacted only if listed. I ran sanitize_text on text holding the old gateway, with the variable unset. The address stayed, in both its origin and bare forms, and the origin was not converted to its site token. _forbidden_public_text() also does not match it, so the release check passes. Replay stops in this case (remote_runtime.py:158), but the public path does not. The PR body gives this as a maintainer step, with nothing enforcing it. With the variable set, redaction matches main.
Fix: fail closed on the public path as replay does. Have the Browser Use package and release check reject any private IPv4 address outside the listed gateways, naming the variable, with a paired negative control.

P2. Public readers can no longer find out what to put in the site account variables. .env.example:44-52, examples/trajectory_replay/public_webarena/README.md:3, docs/trajectory-replay-protocol.md:120, docs/webarena-fixed-trajectory-reproduction.md:26
Problem: the variables are named, but the default fixture accounts were documented only by their values in topology.json, which are now gone. No doc, nor the installed evaluator package, supplies them or says where to get them. A public user following the replay README stops at the missing-variable error with no next step. AGENTS.md asks .env.example to carry account requirements and official acquisition links.
Fix: add one line to .env.example and the README saying these are the accounts of the self-hosted WebArena images, with a link to the upstream source that lists them.

P3. .env is parsed when topology is imported, including by a publisher. src/harness/environments/webarena/topology.py:27-35, :78, docs/report-hosting.md:66
Problem: configured_value catches only FileNotFoundError, and RECORDING_GATEWAYS is built at import. An unreadable .env or a directory at that path breaks every importer of the module (confirmed for both). publish_public_webarena_report now opens .env on import, shown with an audit hook on open; on main it does not. Only the gateway value is used, so no credential reaches publishing. It still contradicts "Repository publishers never read .env for publishing" and the same rule in AGENTS.md.
Fix: resolve the gateways on use, as credentials already are, or state the narrow exception in both places.

P3. Two different rules resolve these variables. src/harness/environments/webarena/topology.py:27, src/harness/trajectory_replay/catalog_runner.py:162, :616
Problem: site logins and gateways read the environment, then the repository .env, and ignore --credential-env-file. Routing and app IDs read only that file and ignore the environment. A routing variable that is only exported, or a login that is only in a custom file, stops with an error. The error is clear, but both sets are described together as local configuration, and the option's name suggests it supplies the logins.
Fix: use one resolver, or state the difference in .env.example and the option's help text.

P3. Gateway entries are not validated. src/harness/environments/webarena/topology.py:78
Problem: an entry written as host:port or as a URL is accepted. With <address>:7770 listed, a bare mention of the address is not redacted and an origin becomes a placeholder without its port.
Fix: reject any entry that is not a bare hostname or address, naming the variable.

P3. The edition's source_revision cannot be resolved. src/harness/benchmarks/data-lock.json:10719
Problem: 267bf126… returns 404 from the Hugging Face revision API, and GitHub has no such commit in this repository. The manifest names Hugging Face as source_repository. The Hub merge created ede6b17c from a commit that was not kept, so a reader cannot follow this provenance. The previous edition's value resolves. Nothing fetches this field at runtime, and revision and the hash bindings are sound. manifest.json is immutable at this revision.
Fix: note it beside the edition entry, or record a resolvable source in the next dataset commit.

P3. The release index overstates comparability. docs/releases.md:76
Problem: "results compare directly when execution settings match" holds for the exported tasks. But stored attempts for tasks 280 and 282 now need re-evaluation, and runs from the Git source candidates for the six rerouted tasks reached different hosts.
Fix: link to the input correction section in docs/benchmarks.md and limit the sentence to exported tasks.

P3. The PR picture is stale. PR body image
Problem: it says "Guard added; 8 files await a decision", while the PR now has no exemptions and pins a new edition.
Fix: regenerate it.

Item 1: replay behaviour

  • Tool calls. I compared every record in both trajectory files and all candidates against main: 231 records, 1,885 calls, 193 changed. The PR body says 207 and 1,806 with the same 193; my wider count includes more candidate files. Every change is the host in a navigate url (191) or a fill text (2). Scheme, port, path and query are unchanged where a port was recorded. Nothing outside tool calls changed except hashes.
  • Rebinding. I bound main's and the head's inputs to one synthetic site map with rebind_remote_calls, under both trusted host sets. 224 of 231 records give identical results. The other 7 are the six tasks, with 243 appearing twice. None raises with the gateway variable unset.
  • Tasks 243, 404, 464, 590, 658, 714. Each moves from a site-specific host with no port to the site's recorded port, and reaches the matching site: 243 and 464 shopping admin, 404 and 714 reddit, 590 and 658 gitlab. Paths are preserved, and each path fits that site.
  • Literally compared text. The only changed text is task 615's submission[url], in two files. The official evaluator compares it literally with __REDDIT__/submission_images/<hash>.jpg. It derenders to exactly that through remote_benchmark after rebinding. It also does so through configure_benchmark without rebinding, because that path registers the container host as an equivalent URL. The score should not change. This comes from calling the evaluator's URL normalization, not from a full evaluation of the task.

Items 2 and 3: edition and bindings

  • Fetch. harness.benchmarks.data.snapshot fetched ede6b17c into a scratch cache, and it verifies against the lock. The Hub's v1.0.1 tag resolves to the same revision with identical files. The prior edition came from an earlier scratch cache, also verified by snapshot.
  • Edition diff. Between fc32333d and ede6b17c, exactly 212 values differ, all hashes (2 inside an embedded string) and none in another field. Exported questions, actions and evaluator inputs are identical. All 2,732 full-812-v1 fixed actions and 752 corrected actions bind to the site map with no unbound host.
  • Forward closure. All 90 corrected source_actions and source_task digests match the head. All 28 changed source_actions, 26 effective_actions and 12 retrieval contract hashes match the head, and the old values match main. All 42 retrieval candidate contracts pass validate_contract.
  • Backward closure. All 108 changed hashes in Git trace to a head file or a canonical subtree. About 32,000 subtree digests of the old files turned up no stale value in the tree or the edition.
  • Old file hash. The only old file hash left is LEGACY_REPLAY_VALIDITY_INPUTS, deliberately, and it equals main's value. Old edition identifiers appear only in the lock's history.
  • Covered files. The above includes task-corrections.json, cohort-step-roles.json, cohort-diagnostic-variant.json, dataset-revision-bindings.json, qualification-matrix.json, recompiled-seed-bindings.json and the bridge.
  • No patched evidence. No measured evidence or stored verdict is in the diff. failure-review and three-method change only in evidence paths, each equal to the old path relative to the data home, and in one host in a quoted selector. Hash fields and verdicts are unchanged.
  • Golden. One line changes, report-manifest.json in web-fetch.json.

Items 4 to 7

  • Credentials. Unset values stop sanitize_text, site login and report checks, naming the variables. Map and Wikipedia correctly return no credentials. Values from the environment are redacted, and _forbidden_public_text() matches them.
  • Routing hash. environment_host_overrides_sha256 (catalog_runner.py:663) is an unsalted SHA-256 of a low-entropy address, the weakness that removed the guard's digests. It stays in private inputs.json and ledger records; the catalog report and the ledger's participant block do not carry it. No change is needed while those records stay private.
  • Guard. No path or file exemptions. Appending the real cleared domain (both cases), address, gateway, a CIDR, home paths, and share and preview links to a tracked doc each failed the test, and it passes when restored. It keeps no address digest. One domain digest remains, by design.
  • Docs. .env.example, the replay README, deploy/webarena/README.md, the protocol doc and the docs/benchmarks.md correction table match the code apart from the findings above. The Versions section is absent from the published dataset card at this revision, as the PR body says.
  • Cleared values. At this head, none of the cleared hosts, addresses, username, team, passwords or share tokens appears in the tree, the PR body or commit messages. That covers URL-encoded and base64-decoded forms, and both editions were scanned the same way.

Tests and limits

  • Tests. With PYTHONPATH set, so subprocess tests were covered, offline against the verified caches: 19204 passed, 16 failed, 132 skipped. 11 failures are on the known local list. 3 in tests/test_optional_reports.py fail identically on main. 2 in tests/test_moli_provider.py failed under parallel load and pass when that file is run alone.
  • Not verified. No live WebArena replay, so no official evaluation of the six rerouted tasks or task 615 end to end. Rainbond preparation was not run. Browser Use redaction was tested at sanitize_text, not on a full report built from real older evidence. I did not read private evidence or local secrets, so hashes recorded only elsewhere were not checked.

@lanyue-llk
lanyue-llk force-pushed the refactor/remove-exposed-internal-data branch from 9efc2e5 to f85710c Compare November 3, 2026 09:29

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

No findings in this review.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Independent review, round 2: fixes

Head: f85710c3, rebased on main 335217ee. All CI checks pass, including ocr-review.

Finding Fix Commit
P2. Unset gateway variable leaves a private host in public output The Browser Use package gate and release check reject a private address left in public text and name the variable. Evidence without one needs no setting. Paired tests cover both 5a64f4a9
P2. Readers cannot find the site account values .env.example and the public replay README link to the upstream ACCOUNTS list at a pinned commit. I checked that it lists all four accounts 6d23702d
P3. .env parsed when topology is imported Gateways resolve on use, and a subprocess test with an open audit hook covers topology and a publisher c301199f
P3. Two resolution rules harness.env_file.local_setting: an exported variable wins, then the selected env file, then the repository .env. --credential-env-file now selects the file for site accounts, gateways, routing and deployment values c301199f
P3. Gateway entries not validated Entries must be bare hostnames or IPv4 addresses, and the error names the variable c301199f
P3. source_revision cannot be resolved Stated in docs/releases.md and in a source_revision_note beside the lock entry, which moves into history at the next pin. The dataset is unchanged, and the Hub tags are recorded f85710c3
P3. Release index overstates comparability Limited to exported tasks, with tasks 280 and 282 and the six rerouted tasks named and linked to the input correction f85710c3
P3. PR picture Updated separately by the coordinator Not in this branch

The PR body now states the file set behind each tool-call count: 207 records and 1,806 calls cover the 29 changed input files; 231 records and 1,885 calls cover all 53 trajectory and candidate files. Both find the same 193 changed calls.

Disputes and limits

  • Kitesurf credentials keep their file-only rule. They predate this PR, and AGENTS.md says evaluation credentials come only from the repository .env. The option's help text states the difference.
  • The shared rule lets an exported variable win. That matches the review's request for one precedence and the existing report-language rule, but it is broader than that AGENTS.md sentence for site accounts. I did not edit AGENTS.md; the owner can decide the wording.
  • The fail-closed check matches any private-range IPv4 text. A four-part version number in those ranges would also stop a release, and the error says how to proceed. I kept it broad because this is a privacy gate.
  • No Hugging Face write was made. The manifest keeps its source_revision value.
  • Not verified. No live WebArena replay ran, and the check was not run on a full report built from real older evidence.

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

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

Comment thread src/harness/env_file.py
Comment on lines +91 to +92
state = path.stat()
return _parsed_settings(path, state.st_mtime_ns, state.st_size).get(name, "") or ""

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: Reject non-regular files before parsing. An explicitly selected FIFO passes both is_symlink() and stat(), then _read_bindings() calls read_text() and blocks indefinitely if no writer opens it. This is reachable through Chromium's --credential-env-file: its routing lookup uses local_setting() without the regular-file validation used by _load_env_values(). Check stat.S_ISREG(state.st_mode) before calling _parsed_settings() and add a FIFO rejection test so invalid settings paths fail promptly rather than hanging replay startup.

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

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 3

Head reviewed: ab260204, which landed during this review. Its one new commit, the FIFO fix, is on top of ebff3a27. CI at this head: all checks pass, including ocr-review with 0 findings.

No P0 or P1 findings. The tree is clear and evaluation still works, apart from the limits under "Not verified". There are two P2 and four P3 findings. The PR is not fully compliant with AGENTS.md: site account precedence conflicts with "Evaluation credentials come only from the repository .env". Internal values are deliberately not quoted.

Findings

P2. An exported site password displaces the one redaction removes, so the real password can pass the public privacy gate. src/harness/environments/webarena/topology.py:189, :196, src/harness/env_file.py:89-91, src/harness/browser_use/report_check.py:58
Problem: this is the AGENTS.md conflict, and it has a practical effect. sanitize_text and _forbidden_public_text redact only the one value local_setting resolves now. With one password in the env file and a different one exported, I ran sanitize_text and check_public_privacy on text holding the file's password. It was not redacted, and the gate passed. On main the passwords were literals, so this could not happen. A file passed to --credential-env-file gives the same result when a later report build resolves a different value.
Fix: see "Proposed fix for precedence" below.

P2. The replay report publishes a listed private gateway, and no gate stops it. src/harness/trajectory_replay/webarena_report.py:1408-1412, :1857, :1864, :2585
Problem: when the run profile's trusted_source_site_hosts includes a listed gateway, the environment page names that host in its diagram and prose. I changed the test gateway to a private address and ran test_local_environment_page_names_the_profile_bound_site_gateway: it passed, so the page contains the address. The report check looks only for path markers. Round 2's fail-closed gate covers Browser Use only, while the PR body's "Set WEBARENA_RECORDING_GATEWAYS and rebuild" step sets the same variable this page reads. Main also named the host, so this is not a regression, but rebuilding older evidence would publish the address this PR clears.
Fix: always use the generic "The site gateway" wording and remove the naming branch and the variable lookup. Change the test to assert a listed host never appears. Check the golden files for this page in the same change.

P3. A symlinked .env now stops scripts/report_template.py. src/harness/reporting/templates.py:32, src/harness/env_file.py:94
Problem: discover_template passes root / ".env" as an explicit file, so local_setting applies its rule against links to the default file. With a symlinked .env and the variable unexported, the script stops with local settings file must be a regular file. Callers that use the default file accept the same link. AGENTS.md requires this script before report authoring, and it reads only an optional example link.
Fix: when root is the repository root, call local_setting(name) with no file, or apply the link rule only to a file selected through --credential-env-file.

P3. The FIFO fix also rejects --env-file /dev/null. src/harness/env_file.py:25, tests/test_runner_supplement_dataset.py:113
Problem: this is new in ab260204. load_runtime_env(Path("/dev/null")) now raises env file must be a regular file. An existing test uses that argument for --validate-only, but it mocks the loader, so it still passes. I found no doc or workflow that uses it.
Fix: reject only what can block (S_ISFIFO) along with directories, or accept /dev/null explicitly. Add a test through the real loader. If the rejection is intended, change that test's argument so it no longer implies the form works.

P3. A second private-address recognizer sits beside an existing one. src/harness/browser_use/publication.py:20-23, src/harness/trajectory_replay/public_webarena/publication.py:28
Problem: AGENTS.md says to extend the current owner, and harness/reporting/privacy.py already owns the per-surface public text rules. The two runtime rules also differ: the public replay pattern matches an out-of-range octet such as a value above 255, and the Browser Use check does not.
Fix: define the pattern once in harness/reporting/privacy.py and use it from both. Public replay can keep substituting and Browser Use can keep stopping.

P3. The PR body is behind the head. PR body, "Summary" and "Test plan"
Problem:

  • The test and CI lines name f85710c3.
  • The FIFO commit is not mentioned.
  • The summary still says the Hub tags "label snapshots with the same definition archives", while docs/releases.md now says they resolve to the pinned editions.

Fix: restate the tags as in the doc and refresh the CI and test lines at the final head. Update the precedence paragraph with the first finding.

Proposed fix for precedence

Keep local_setting for settings that are not credentials. Read site accounts in one place:

  1. Add repository_credential(name) to harness/env_file.py. It reads only repository_root() / ".env", ignoring both the process environment and select_env_file.
  2. Call it from site_credentials at topology.py:189. known_site_secrets and redaction follow automatically.
  3. Give tests a synthetic credential file through a private module-level path set in tests/conftest.py, not a new environment variable, which would reopen the same route.
  4. Update .env.example:44-46, docs/trajectory-replay-protocol.md:122, the --credential-env-file help text and the PR body.

I tried this as an uncommitted prototype and removed it. Over the 2,669 focused tests, 4 needed updates: 2 topology tests that assert the old source and 2 subprocess tests that need the credential file. Other test directories were not run with the prototype.

I would not fix this by editing AGENTS.md. A wider sentence would still leave redaction bound to a value that may differ from the one used in the run.

The author's disputes

  • Precedence versus AGENTS.md: the conflict is real for site accounts only. Passwords and usernames are evaluation credentials. web_fetch/config.py:77-80 removes credentials taken from the parent shell, browser_use/runner.py:78 allows only a non-secret path from the process, and public_webarena/diagnostics.py:274 states the same rule. Routing, app IDs, gateways and report example links are not credentials, so exported-wins is fine for them and matches the report-language rule. One existing path does not follow the rule: public_webarena/webarena_environment.py:246-251 reads these same variables from os.environ, and load_runtime_env uses setdefault. That predates this PR and only reads a login, so it can be a follow-up.
  • File-only Kitesurf credentials: agree, no change. The default is the repository .env, and a file-only read is closer to AGENTS.md than the shared rule. The custom path is on main too. Web Fetch rejects credentials from a non-repository file while this option allows them, which is a separate follow-up.
  • Private-range false positives: agree, keep it broad. The risk is real: a four-part version and a minified SVG path such as M followed by a private-range quad both match in my probe, and agent page text may hold private addresses. Chrome/120.0.0.0 and Windows NT 10.0.22621.1 do not match. The sibling public replay rule has the same shape, and a false stop costs less than a leak. Optional wording change: the error tells the maintainer to list a recording host, but listing a value that is page text rewrites it to the host placeholder. The message could say so. It correctly does not print the matched value.

Verified, no finding

  • FIFO fix. The check sits in _read_bindings, so every reader gets it. A FIFO now stops at once where ebff3a27 hung, directories are rejected, a missing file keeps FileNotFoundError, and parse_env_file still follows a link.
  • Fail-closed gate. It runs first in validate_release and again in check. Private addresses in bare, URL, URL-encoded and IPv6-mapped forms are caught. A listed host is redacted and then passes. Loopback, link-local and shared-range addresses are outside the rule, and they are not what the PR cleared. The report's public artifacts use suffixes the gate scans.
  • Lazy resolution. I imported all 268 harness modules in separate processes with an invalid gateway value in .env, using an audit hook on open. None failed. One opened .env: harness.web_fetch.workers.crawl4ai_worker, and importing crawl4ai alone does the same, so that read is third-party.
  • Gateway validation. Entries with a port, scheme, path or space are rejected, naming the variable. A hostname listed in mixed case does not match the lowercase form. I am not raising this, because the recorded gateway is an address.
  • --credential-env-file. Workers use fork, so they inherit the selected file. The Python hook run as a subprocess at remote_execution.py:1001 does not, and I did not trace whether it reads these settings.
  • Accounts link. At the pinned upstream commit, ACCOUNTS lists all four sites, and each username and password equals the value main held in topology.json, compared without printing. The statement in .env.example and the README is correct.
  • source_revision_note. pinning.py:143 copies the entry into history with the note, and the new entry is built without it, so a later edition does not inherit it. Re-pinning the same revision would drop the note. No reader depends on it.
  • docs/releases.md. I confirmed through the Hub revision API that v1.0.0 resolves to fc32333d and v1.0.1 and main to ede6b17c. The lock holds both as full commits, with fc32333d first in history. The input correction anchor exists.
  • PR picture and body. The picture matches the PR. The body holds no private address outside the generic fixture ranges. The new test addresses are synthetic: they share no /16 with a private address in main's topology or environment profile.
  • Tests. With PYTHONPATH="$PWD/src:$PWD", offline, at ab260204: 19273 passed, 14 failed, 132 skipped. 11 failures are on the known local list. The other 3 are in tests/test_optional_reports.py, and the same file also has 3 failures on base 335217ee. Ruff on src and tests passes. The public tree guard passes.

Not verified

  • No live WebArena replay and no official evaluation of a live run.
  • This host has no Browser Use report or evidence built from real runs, so the false-positive rate on real page text is unmeasured, and the gate was not run on such a report. evaluation/, research/ and src/harness/benchmarks have no matches.
  • The replay finding was confirmed through the environment page's test, not a full package and publish.
  • I did not read local .env files or private originals, so hashes recorded only elsewhere were not checked.

@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 · 9d1b7b0

No findings in this incremental review.

@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 · 9faa152

No findings in this incremental review.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Independent review, round 3: fixes

Head: 9faa152d, on main 335217ee. All CI checks pass, including ocr-review.

Finding Fix Commit
P2. Exported password displaces the redacted one repository_credential reads only the repository .env, and site_credentials uses it, so a run and redaction share one value. A test shows an exported password neither changes the value nor escapes redaction, and a selected env file cannot supply an account. AGENTS.md is unchanged d6a9342e, tests in 9faa152d
P2. Replay report names a listed gateway The environment page always uses generic wording and no longer reads the variable. A test with a private value covers both languages 44397aed
P3. Symlinked .env stops report template discovery The optional example follows links, and an unusable file leaves it unset. A bad example version still stops cbf37f1a
P3. FIFO fix rejects the null device os.devnull reads as empty, tested through the real Web Fetch loader. FIFOs and directories stay rejected a56feca0
P3. Second private address recognizer PRIVATE_IPV4 now lives in harness/reporting/privacy.py, used by both surfaces. Public replay still replaces and Browser Use still stops 9d1b7b04
Private address error wording The error now says every listed value, including page text, is replaced with the host placeholder 9d1b7b04
P3. PR body behind the head CI and test lines name the head; the FIFO fix and tag wording are stated PR body

Follow-up

public_webarena/webarena_environment.py reads accounts from the process environment, and that predates this PR. It is not a small change: variable names come from runtime configuration, --env-file can select another file, and tests set the variables directly. Tracked in #159.

Things to check

  • Offline tools now need site accounts. configure_benchmark() resolves them, so dataset revision without a repository .env stops and names the variables. Before this change tests got them from exported values; .env.example now says so. CI found this through two child-process tests, which 9faa152d gives synthetic accounts.
  • The shared pattern is broader for Browser Use. It also matches a private-looking run inside a longer dotted number and out-of-range octets. That can add false stops, not leaks.
  • The public tree guard keeps its own address parser. It checks ranges with ipaddress and was not part of the finding, which named the two runtime rules.

Not verified

No live WebArena replay ran. The fail-closed gate has not run on a report built from real older evidence.

@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: 9faa152d. CI at this head: all checks pass, including ocr-review.

No P0 or P1 findings. There is one P2 and two P3 findings. The changes since ab260204 do what round 3 asked. Question 1: this is a regression, and I recommend fixing it before merge. Question 2: no, the shared pattern creates no false stop from the repo's examples. Internal values are not quoted.

Findings

P2. Offline evaluator tools that never log in now stop without site accounts. src/harness/environments/webarena/runtime.py:236, src/harness/trajectory_replay/remote_runtime.py:111
Problem: configure_benchmark() and remote_benchmark() resolve passwords only to fill EnvironmentConfig.credentials. Nothing reads that field: the pinned evaluator package only declares it, and the harness logs in through SITE_CREDENTIALS directly. So the tools below stop for a value they never use. On main the same tools work. scripts/build_revised_webarena_dataset.py --task-id 225 succeeds at base and stops at this head, with no .env and with a .env copied from .env.example. Exported values no longer help, so every fresh checkout or linked worktree hits this. The stop is clear and names the variables, and no result is wrong.
Fix: the three-line deletion plus a preflight, set out under "Size of the fix".

P3. The Browser Use guide does not list the accounts its run now requires. examples/browser_use/README.md:11
Problem: the "Prepare the environment" table names .env for CowAgent and the model account, but only lists the WebArena sites. On main the accounts came from topology.json. Now run.sh stops at runner.py:543, before any model call, and the guide gives no next step. The public replay README already has this line from round 2.
Fix: add the WEBARENA_<SITE>_* variables and the upstream ACCOUNTS link to that row, stating they go in the repository .env.

P3. The PR body understates the offline scope. PR body, "Variables" and "What this invalidates"; .env.example:49
Problem: "offline tools that configure the evaluator, such as dataset revision" reads as one maintainer script. The list below includes the catalog report and audits. The rest of the body matches the head, and the picture is still accurate.
Fix: after the P2 fix, reduce this to site login and Browser Use redaction in the body and .env.example. If the P2 fix is declined, list the affected tools instead.

Question 1: what stops with no .env

Evidence is marked ran (run directly from a clean checkout at head and base), suite (the full test suite with the credential file pointed at a missing path) or chain (call chain only).

Stops Entry point Evidence Needs the account?
Yes scripts/build_revised_webarena_dataset.py ran, suite No
Yes scripts/audit_webarena_catalog_acceptance.py suite No
Yes make webarena-catalog-report, which requires SITE_MAP, when the map names a site with a login chain; remote_benchmark ran No
Yes build_webarena_catalog_comparison_inputs.py, reevaluate_webarena_evaluator_transition.py, rescore_saved_retrieval_attempt.py, audit_saved_replay_correction.py chain; remote_benchmark ran No
Yes promote_webarena_trajectories.py, and merge_webarena_replay_results.py when a result uses observed state suite for the shared helpers, chain for the scripts No
Yes make browser-use-report, browser-use-report-check, browser-use-release-check, python -m harness.browser_use package suite Yes, for redaction. Keep this stop
Yes examples/browser_use/run.sh, run_webarena_trajectory_replay.py (also used for qualification), run_webarena_catalog.py, run_remote_three_method_cohort.py, run_remote_mutation_diagnostic.py chain Yes, they log in. Keep this stop
No Docs quickstart commands through python -m harness.web_fetch (validate, run --delay 0), the same two commands make fixture-smoke runs ran
No make report-template, make track-naming-check, scripts/verify_webarena_env_contract.py ran
No Replay report build and check; public WebArena report and evaluator tests; Web Fetch, WCXB, WebMainBench and Web Search reports suite: these tests pass with no accounts
No make ci CI has no .env; tests use synthetic accounts
No examples/web_fetch, examples/web_search, examples/trajectory_replay/run.sh, trajectory-replay-package, trajectory-replay-publish chain finds no path
No Web Fetch dataset compile through lexbench_webfetch, and the public build_webarena_suite.py chain finds no path

Verdict: fix before merge. The first-run paths are unaffected, and a filled .env gets past every stop. But the owner's requirement is that the whole evaluation still works, and these tools now need a password they never read, for a fix this small.

Size of the fix

Lazy resolution at login is the right idea, but deleting the eager read alone is not safe. login_context runs inside each attempt's try (webarena_replay.py:541 with :725, browser_use/runner.py:270 with :323, remote_execution.py:583 with :751). A missing account would become a recorded attempt error after sites and browsers have started, where today it stops before the run. So the fix has two parts:

  1. Delete credentials= at runtime.py:236 and remote_runtime.py:111, and the unused import at remote_runtime.py:27.
  2. Add one require_site_credentials(sites) in topology.py and call it at the run entries: browser_use/runner.py:543, webarena_replay.py:1328, catalog_runner.py:615, remote_execution.py:875 and :1413.

I tried this as an uncommitted prototype and removed it: 7 files, 22 lines added, 3 removed, no test edits.

Check Head Prototype
Full suite with synthetic accounts 18 failed, 19343 passed The same 18 failed, 19343 passed
Extra failed or errored tests with no accounts 271 105, all Browser Use report or run paths, run preflights, redaction and the golden Browser Use reports
Revision output for task 225 Identical bytes (head with synthetic accounts, prototype with none) Identical bytes
configure_benchmark, remote_benchmark, correction bindings with no accounts Stop Pass
sanitize_text with no accounts Stops Stops

Add two tests: a revision with no credential file succeeds, and a run entry stops before any browser starts. I did not run the prototype's preflight against real containers.

Question 2: PRIVATE_IPV4

Verdict: no false stop from the repo's examples, and no change needed.

  • Where it applies. The stop is in Browser Use check_public_privacy, reached by report check and package, not by the build. Public replay's pattern is byte-identical to before, so its behaviour is unchanged. The repo-curated replay report does not use it.
  • Synthetic reports. Across 1,764 text files from the Browser Use report and publication tests, the only 2 files with a match are the tests' own planted addresses. The old rule gives the same result.
  • Frozen inputs. No match in evaluation/, research/, examples/, tests/golden/, the Browser Use renderer data or the pinned evaluator dataset.
  • Leak check. In 400,000 generated strings, the new pattern missed nothing the old rule caught. It added 11,974 matches, which are out-of-range octets or dotted runs such as 3.10.12.1.5.
  • Remaining risk. Real page text can still hold a private-looking number. That is the accepted cost from rounds 2 and 3, and the error says what to do.

Verified, no finding

  • repository_credential. An exported value is ignored, and a symlinked .env is followed. A FIFO or directory raises at once through the shared reader. This also settles round 3's open question about the Python hook subprocess, because it reads the repository .env whatever file was selected.
  • Generic replay wording. With a private gateway in the profile and in WEBARENA_RECORDING_GATEWAYS, a scan of both language builds finds it only in the test's input profile, not in any report file.
  • Optional example setting. The new tests cover a symlinked .env and a FIFO. By reading the code, a dangling link or directory leaves it unset too. A bad version still stops, and no .env shows an empty example.
  • os.devnull. It reads as empty through the real Web Fetch loader, and non-regular files stay rejected.
  • Tests and lint. With PYTHONPATH="$PWD/src:$PWD", offline: 19343 passed, 18 failed, 60 skipped. 15 failures are on the known local list. The other 3 are in tests/test_optional_reports.py and also fail at base 335217ee. Ruff passes on src, tests and scripts. #159 is open.

Not verified

  • No live WebArena replay, and no real Docker run of any example.
  • Entry points marked chain were not run with real inputs.
  • This host has no Browser Use report built from real runs, so the false-stop rate on real page text is unmeasured.
  • I did not reproduce the PR body's "2688 passed" line, because its file set is not exact enough to repeat.
  • I did not read any real .env or private originals.

An exported variable wins, then the selected env file. Importing the topology reads no
file, gateway entries must be bare hosts, and --credential-env-file now supplies site
accounts as well as routing and deployment values.
A FIFO passed to an env file option blocked forever on read. Checking in the shared
parser covers every reader, and a missing file keeps its existing error.
A run and the redaction of its public output now use one value, as AGENTS.md requires.
An exported or selected value cannot override a site account.
…ut accounts

Nothing reads EnvironmentConfig.credentials, so the evaluator no longer resolves site
accounts. Each run entry checks them first, and redaction still stops without them.
@lanyue-llk
lanyue-llk force-pushed the refactor/remove-exposed-internal-data branch from a63ff6c to c060877 Compare November 3, 2026 11:42

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

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

Comment on lines +75 to +76
host.strip()
for host in local_setting(RECORDING_GATEWAYS_ENV).split(",")

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: Normalize configured gateway hostnames for trusted-host matching. WEBARENA_RECORDING_GATEWAYS=Gateway.Example passes this validation and enters TRUSTED_RECORDED_HOSTS unchanged, but rebind_remote_calls() compares against urlsplit(value).hostname, which is lowercase. Consequently, even http://Gateway.Example:7770/... is left on the recorded host instead of being rebound to the shopping site map (the private-IPv4 guard does not apply to hostnames). Use lowercase canonical hostnames for membership comparisons and add a mixed-case hostname rebinding test; preserve any original spelling needed for text redaction separately.

environment_profile = _load_environment_profile(
args.environment_profile, args.engine, credential_env_file
)
require_site_credentials(sites)

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: This credential check runs too late for Kitesurf. main() calls _probe_kitesurf_runtime() at lines 574–576 before reaching this point; that probe constructs PlaywrightReplayTool, connects to the hosted browser over CDP, and navigates its page to about:blank. With valid Kitesurf configuration but missing repository site credentials, the command therefore opens and manipulates a browser session (or fails on that connection) before reporting the missing account variables. This violates the new fail-before-browser-start contract. Load the site map and validate its credentials before invoking the runtime probe; keep the routing/deployment preflight ahead of that probe as well.

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

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 5

Head reviewed: bbc547cb, on main d1c29670. CI at this head: all checks pass, including ocr-review.

No P0, P1 or P2 findings. The round 4 fix does what was asked, and all five checks below pass. There are four small P3 items; none blocks merge. Internal values are not quoted.

Findings

P3. Three of the six preflight calls have no test. src/harness/trajectory_replay/webarena_replay.py:1330, src/harness/trajectory_replay/remote_execution.py:879, :1418
Problem: I replaced each call with pass in turn and ran the eight test files for these entries. All 275 tests still passed for these three. The same change at browser_use/runner.py:547 and catalog_runner.py:578 and :627 fails a test. If one of the three is lost, a missing account becomes a recorded attempt error after sites and browsers have started, which is what round 4 set out to prevent.
Fix: add one test per entry, in the shape of the two existing ones. Point env_file._repository_credentials_file at an absent path, expect WEBARENA_*, and assert no output and no browser activity. _fixture in test_remote_three_method_cohort.py and environment in test_remote_mutation_execution.py already give the inputs. I ran throwaway versions of all three and they pass at this head, at about 30 lines in total.

P3. A listed gateway hostname is redacted only in the exact spelling listed. src/harness/browser_use/publication.py:45, :49
Problem: d1693170 made matching case-insensitive for rebinding and covers the entry as written for redaction, but not other spellings. With the synthetic entry gateway.example, http://Gateway.Example:7770/a rebinds to the site map, yet sanitize_text leaves it and GATEWAY.EXAMPLE unchanged. require_no_private_hosts only recognizes private addresses, so nothing catches a hostname afterwards. The stop message says every listed value is replaced. Real exposure is low, since recorded hosts are normally lowercase and the variable is optional.
Fix: for listed hosts, replace case-insensitively (re.sub(re.escape(host), ..., flags=re.I), also for the origin keys), and extend test_mixed_case_gateway_rebinds_and_is_redacted_as_written with a lowercase entry and mixed-case text.

P3. The Kitesurf comment and test name claim more than the code does. src/harness/trajectory_replay/catalog_runner.py:577, tests/trajectory_replay/test_run_webarena_catalog.py:1392
Problem: "every local preflight runs before it" is not so. By reading the code, the probe at :584 still runs before load_catalog_inputs at :611, the action override check, task selection and the resumed-run check. A bad catalog opens the hosted browser and then stops. Main has the same order, so this is not a regression, and the account check is correctly first.
Fix: name what runs first, for example "accounts, reset receipt and environment profile", and rename the test to match. Moving the remaining checks ahead of the probe is optional and out of scope here.

P3. The PR body cites a commit that is no longer on the branch. PR body, Test plan, "at f85710c3"
Problem: the rebase replaced it with 0ea14414, so f85710c3 is not an ancestor of the head and readers cannot check it there. The other Test plan lines I checked hold, including the bbc547cb line below.
Fix: restate that line at the current head. tests/benchmarks alone at this head gives 11306 passed; the body's 11378 covers a wider file set that I did not repeat.

What I verified

(a) Offline tools with no .env: pass. scripts/build_revised_webarena_dataset.py --task-id 225 succeeds from the worktree with no .env, and from a fresh clone with .env copied from .env.example. The output bytes match. scripts/verify_webarena_env_contract.py and scripts/report_template.py browser-use also run. No WEBARENA_* variable was exported.

(b) Run entries stop first: pass. All stops name the variables, and no output was left behind.

Entry How checked Result
python -m harness.browser_use.runner Real CLI, stub CowAgent checkout Stops at :547, before the model check and Docker; output directory empty
scripts/run_webarena_catalog.py --engine kitesurf Real CLI, synthetic Cloudflare values Stops before the probe
run_webarena_catalog.py, local engine PR test, confirmed by removing :627 Stops before a browser starts
run_replay_suite, used by scripts/run_webarena_trajectory_replay.py My test, stubbed plan Stops before any site work
preflight_cohort, the first step of the cohort run My test over the repo fixture Browser and reset hook not called
Mutation diagnostic My test over the repo fixture No tool created, no trigger, no output

--check-proposal and --emit-proposal return earlier and need no account. login_context has callers only behind these entries. examples/browser_use/run.sh goes straight to the runner.

(c) Redaction with no accounts: pass. sanitize_text and report_check._forbidden_public_text both stop, naming the variables.

(d) Guard: pass. tests/test_public_tree_privacy.py: 35 passed. A planted private address in a tracked file makes test_tracked_text_has_no_private_values fail, so the guard is live. I did not grep for the values directly.

(e) PR body: pass, apart from the item above. Closes #147 is present and GitHub links the issue. #159 is open. The Variables table, the invalidation row for credentials, and the .env.example and examples/browser_use/README.md wording match the code. The golden change is one report-manifest.json hash relative to main, as stated. The picture holds no internal values and is still accurate.

Rebase. git range-diff shows only one changed commit, which dropped its golden hunk; c060877c refreshes that hash. The other pre-rebase commits are unchanged, and the five new commits are the fixes since round 4. Round 4's two P3 documentation items are done.

Tests and lint. With PYTHONPATH="$PWD/src:$PWD", offline: 19389 passed, 20 failed, 60 skipped. 15 failures are on the known local list. 3 in tests/test_optional_reports.py also fail at d1c29670. 2 in tests/test_moli_provider.py failed only in the parallel run; that file passes alone (81 passed). With -o pythonpath="src ." over the body's file list: 2695 passed, 5 skipped, 1 failed, the subprocess test it describes. Ruff passes on src, tests and scripts.

Not verified

  • No live WebArena replay and no real Docker run of any example.
  • The three stops tested through my own tests used stubbed or fixture inputs, not the real CLI with real inputs.
  • The offline tools other than those in (a) were checked only with --help here; round 4's prototype covered their shared helpers.
  • I did not read any real .env or private originals.

@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 · 97b5a77

No findings in this review.

@lanyue-llk
lanyue-llk merged commit 6c97f2c into main Nov 3, 2026
7 checks passed
@lanyue-llk
lanyue-llk deleted the refactor/remove-exposed-internal-data branch November 3, 2026 12:54
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.

Remove internal data from the public repository

1 participant