Repository navigation
refactor: remove dead code and duplicated example files - #121
Merged
Merged
Conversation
Delete definitions and modules with no supported caller: unused Browser Use report helpers, the AstraResponsesModel compatibility alias, an unused model method, the trajectory template transfer module, the Web Fetch admission module and its only test, the unused visible-attribute translator, a line repeated three times in methods.py, and example copies that are byte-identical to their public_webarena versions. Move an orphaned comment to the readiness timeout it explains. Refs #92. Co-Authored-By: Claude Opus 5.5 <[email protected]>
lanyue-llk
commented
Oct 30, 2026
lanyue-llk
left a comment
Contributor
Author
There was a problem hiding this comment.
No defects found. It's ready to merge once #119 is green and has merged first.
Verified on the head (8b6a621) against main (b220d07):
git grepfinds no reference left to any removed name: thebrowser_use/report.pyhelpers,RESEARCH_ROOT,AstraResponsesModel,_normalized_reasoning_effort,template_transfer,web_fetch.admission,_translate_visible_attributes/_VISIBLE_ATTRIBUTE,build_public_suite,tasks.v2,tasks.v3. That includes docs and CI.- The three
examples/trajectory_replay/files have the same git blob IDs as theirpublic_webarena/counterparts onmain, so nothing unique is lost. browser_use/report.pyremoves only the listed helpers plus therepository_rootimport that onlyRESEARCH_ROOTused. Lint confirms nothing else became unused.- The relocated readiness comment now sits on
ENV_CTRL_READY_TIMEOUT_SECONDS, the constant it explains. Dropping the duplicatereport_method_catalogassignments is behaviour-neutral. - Removing the compatibility alias and the retired admission module follows AGENTS.md, which says to remove superseded code and its exclusive tests in the same change.
- CI is green.
Merge order: the "golden snapshots unchanged" claim relies on #119, which this branch doesn't contain, so CI here doesn't exercise the snapshots. #119 currently fails on Linux because of a platform-dependent WCXB digest (see my review there). After #119 is fixed and merged, please rebase this PR so CI runs the snapshots against it before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
Summary
First part of #92: deletes code with no supported caller, as AGENTS.md requires. No behaviour changes. Every removed name was checked with
git grepacrosssrc,scripts,tests,examples, the Makefile and CI; each was referenced only by its own definition (or, foradmission.py, only by its own test)._finding_text,_probability,_wilson_interval,_task_family_summary,_task_family_table,_clean_subset_table,_group_rows,_english_page,RESEARCH_ROOT(and therepository_rootimport it alone used)src/harness/browser_use/report.pyAstraResponsesModelcompatibility alias, unused_normalized_reasoning_effortmethodsrc/harness/browser_use/model.pysrc/harness/trajectory_replay/template_transfer.pysrc/harness/web_fetch/admission.py,tests/test_case_admission.py_translate_visible_attributesand the_VISIBLE_ATTRIBUTEregex only it usedsrc/harness/web_fetch/report_i18n.pymessages = report_method_catalog(...)repeated three times → oncesrc/harness/web_fetch/methods.pybuild_public_suite.py,tasks.v2.json,tasks.v3.json: byte-identical copies of thepublic_webarena/files, referenced nowhereexamples/trajectory_replay/The orphaned comment in
browser_use/runner.py, explaining why the shopping image needs a longer readiness ceiling, now sits onENV_CTRL_READY_TIMEOUT_SECONDSinenvironments/webarena/runtime.py, the constant it describes.Left for follow-ups in #92
BROWSER_USE_EVAL_*variables andlex-browser-use-eval-*image names inexamples/trajectory_replay/run.shand its README: renaming changes user-facing configuration, so it gets its own PR.src/harness/environments/webarena/config.py:53compares the lock against the literal"1.2.3"instead of theWEBARENA_VERIFIED_VERSIONconstant defined on line 19.public_webarena/build_public_suite.pygenerator that still writestasks.v4.jsonis tracked in Follow-ups from the #81 review: generator, reproduction command, make target, track branches #117.Test plan
make lint-checkpasses.make test-python(-n 4 --dist loadfile, as in CI): 18,780 passed. The 14 failures are the same set that fails on unmodifiedmainin this macOS setup (Node-based Markdown converter, CI-gate and local-data tests).🤖 Generated with Claude Code