fix(cli): retire the 0.0 monotonic sentinel in the remaining input-mode throttles
Review follow-up on #91651: _recover_terminal_input_modes and the termios drift check used the same `now - 0.0 < interval` idiom as the repaint throttles. Their windows (0.5s / 1.0s) are unreachable in practice, but converting them to the None sentinel retires the bug class instead of the instance, so nobody "simplifies" a None back to 0.0 later. Also adds the missing regression test for _invalidate, the throttle the PR title is about.
This commit is contained in:
@@ -2635,7 +2635,7 @@ class HermesCLI(CLIProcessNotificationsMixin, CLIAgentSetupMixin, CLICommandsMix
|
||||
self._stream_table_buf: list[str] = []
|
||||
self._in_stream_table = False
|
||||
self._pending_edit_snapshots = {}
|
||||
self._last_input_mode_recovery = self._last_termios_drift_check = 0.0
|
||||
self._last_input_mode_recovery = self._last_termios_drift_check = None # None = never; monotonic epoch is arbitrary
|
||||
self._input_mode_recovery_notice_shown = self._termios_drift_notice_shown = False
|
||||
|
||||
def _init_model_routing(self, model, toolsets, provider, reasoning, api_key, base_url, max_turns, run_budget, checkpoints, pass_session_id, ignore_rules):
|
||||
|
||||
Reference in New Issue
Block a user