[Hermes][Browser tests][1/n] Prevent real Chrome launch in retry test - #266
Merged
Conversation
This was referenced Jul 12, 2026
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.
Why
test_browser_manage_connect_default_local_retries_after_launchstill mocked the retired booleantry_launch_chrome_debughelper after the gateway switched to the structuredlaunch_chrome_debugAPI. Running the test therefore launched a real detached Google Chrome with a pytest-temporary profile; repeated test runs opened windows, stole focus, and surfaced the fixture textpartial answer completeon the live desktop.What changed
hermes_cli.browser_connect.launch_chrome_debug, the symbol the gateway actually imports.ChromeDebugLaunch(launched=True)so the test exercises the production structured result contract without starting an OS process.How to review
Read the single hunk in
tests/test_tui_gateway_server.pyand compare it withtui_gateway/server.pywhere_browser_connectimports and callslaunch_chrome_debug. Confirm the replacement mock matches that call and preserves the existing retry assertions.Evidence
Before the fix, the machine accumulated eight detached Chrome roots with command lines containing
pytest-of-obaradei/.../test_browser_manage_connect_de2/hermes_test/chrome-debug; another unfixed run created PID 14501 at 2026-07-12 13:40:05 PDT and a later run created another orphan five minutes later. After the fix, both the exact test and the adjacent browser-connect slice completed withtest_chrome_before=noneandtest_chrome_after=none.Verification
scripts/run_tests.sh tests/test_tui_gateway_server.py -k test_browser_manage_connect_default_local_retries_after_launch-> 1 passed, 0 failed.scripts/run_tests.sh tests/test_tui_gateway_server.py -k browser_manage_connect-> 16 passed, 0 failed.test_browser_manage_connect_deprofile was created.git diff --check-> passed.Risks / gaps
hermes-browser-connect-test-no-real-chrome-20260712.NousResearch/hermes-agent:mainbecause the fork and upstream currently have no merge base; this fork PR intentionally contains only the fork-main version of the same one-hunk repair.Collaborators
Participants:
ko-macProcess:
Task context:
hermes-browser-connect-test-no-real-chrome-20260712Related work:
hermes-browser-connect-test-no-real-chrome-20260712-review