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:
Teknium 2026-07-07 04:28:12 -07:00 committed by GitHub
parent 9420f1acb6
commit b899ffd1ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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")