mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-08 13:12:08 +00:00
test(e2e): stub reset-notice session info to deflake test_new_resets_session (#60175)
/new's handler calls _reset_notice_session_info, which resolves live provider credentials and can probe model context length over HTTP. In CI there are no credentials, so resolution walks the entire fallback chain (the failed run's log shows 'Primary provider auth failed ... trying fallback' captured inside the test) and on a slow runner the first parametrization can blow past send_and_capture's 2s poll window, making adapter.send appear never-called. Stub it to return an empty info block in the e2e runner fixture — these tests exercise gateway command dispatch, not provider resolution, and no other network-touching path exists in the /new flow. Flaked in run 28856659216 (telegram param only); tests/e2e now 57/57 locally.
This commit is contained in:
parent
9420f1acb6
commit
b899ffd1ea
1 changed files with 7 additions and 0 deletions
|
|
@ -228,6 +228,13 @@ def make_runner(platform: Platform, session_entry: SessionEntry = None) -> "Gate
|
|||
# Disable destructive slash confirm gate so /new executes immediately
|
||||
runner._read_user_config = lambda: {"approvals": {"destructive_slash_confirm": False}}
|
||||
|
||||
# Keep /new hermetic: the real _reset_notice_session_info resolves provider
|
||||
# credentials and may probe model context length over the network. CI has no
|
||||
# credentials, so resolution walks the whole fallback chain and can exceed
|
||||
# send_and_capture's poll window on slow runners (flaked in run 28856659216,
|
||||
# telegram param only — first parametrization pays the cold-resolution cost).
|
||||
runner._reset_notice_session_info = lambda source: ""
|
||||
|
||||
runner.pairing_store = MagicMock()
|
||||
runner.pairing_store._is_rate_limited = MagicMock(return_value=False)
|
||||
runner.pairing_store.generate_code = MagicMock(return_value="ABC123")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue