kshitijk4poor
4fc64b6730
refactor(terminal): probe NOPASSWD only when a prompt would fire; drop the host-only probe
...
With BaseEnvironment supplying a backend-scoped probe to every production
caller, the module-level host-only `_sudo_nopasswd_works` (and its
TERMINAL_ENV gate) had no callers left; the `or` fallback and the outer
try/except around a callback that already fails closed were dead too.
Move the probe under `should_prompt_for_sudo`: headless callers (gateway,
cron, delegated children) reach `(command, None)` whether or not the probe
runs, so the extra backend round trip — an ssh exec on the SSH backend —
was pure waste on every headless sudo command.
test_subagent_sudo_prompt no longer needs to patch the host probe out:
bare `_transform_sudo_command(cmd)` calls have no probe by construction.
2026-09-11 11:19:53 +05:30
..
2026-09-08 17:03:01 -07:00
2026-09-11 11:19:53 +05:30
2026-09-10 02:21:16 +05:30
2026-09-07 12:50:29 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:49:57 -07:00
2026-09-07 14:30:41 -07:00
2026-09-07 14:30:41 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 13:49:57 -07:00
2026-09-07 08:13:38 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 14:16:57 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 10:27:07 -07:00
2026-09-10 10:27:07 -07:00
2026-09-06 13:08:31 -07:00
2026-09-10 10:27:07 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:49:57 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 14:16:54 -07:00
2026-09-03 14:25:33 -07:00
2026-09-03 14:16:54 -07:00
2026-09-03 14:16:54 -07:00
2026-09-06 23:31:05 +05:30
2026-09-03 14:16:54 -07:00
2026-09-03 14:16:54 -07:00
2026-09-06 23:31:05 +05:30
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 14:16:54 -07:00
2026-09-10 10:35:07 -07:00
2026-09-10 10:35:07 -07:00
2026-09-10 11:48:01 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 06:00:46 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-07 07:10:28 -07:00
2026-09-07 06:12:24 -07:00
2026-09-05 18:46:53 +05:30
2026-09-10 10:35:07 -07:00
2026-09-10 02:21:16 +05:30
2026-09-10 02:21:16 +05:30
2026-09-03 09:44:26 -07:00
2026-09-07 08:18:56 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 15:32:47 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 00:10:18 -07:00
2026-09-09 12:17:57 +05:30
2026-09-08 02:26:05 +05:30
2026-09-10 05:02:41 -07:00
2026-09-06 05:03:20 -07:00
2026-09-10 10:23:12 -07:00
2026-09-06 12:02:43 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 05:02:41 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 00:10:18 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:24:04 -07:00
2026-09-03 17:13:22 -07:00
2026-09-09 11:46:36 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 13:33:47 -07:00
2026-09-07 00:28:46 +05:30
2026-09-07 00:28:46 +05:30
2026-09-03 13:28:22 -07:00
2026-09-03 13:10:52 -07:00
2026-09-03 13:30:27 -07:00
2026-09-03 13:30:27 -07:00
2026-09-06 12:05:53 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:53:03 -07:00
2026-09-08 14:57:15 -07:00
2026-09-09 11:46:36 -07:00
2026-09-03 13:24:04 -07:00
2026-09-05 13:51:06 -07:00
2026-09-07 04:46:54 -07:00
2026-09-09 12:18:58 -07:00
2026-09-07 06:35:14 -07:00
2026-09-10 02:21:16 +05:30
2026-09-11 03:45:33 +05:30
2026-09-03 00:11:01 -07:00
2026-09-07 08:22:35 -07:00
2026-09-03 09:44:26 -07:00
2026-09-08 17:44:51 -07:00
2026-09-07 08:22:35 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 02:21:16 +05:30
2026-09-02 23:56:55 -07:00
2026-09-10 18:12:39 -07:00
2026-09-03 13:28:47 -07:00
2026-09-09 12:20:21 +05:30
2026-09-06 13:18:19 -07:00
2026-09-09 11:27:29 -07:00
2026-09-09 12:20:21 +05:30
2026-09-09 12:20:21 +05:30
2026-09-03 13:28:47 -07:00
2026-09-09 12:20:21 +05:30
2026-09-07 22:47:33 +05:30
2026-09-03 09:44:26 -07:00
2026-09-09 12:20:21 +05:30
2026-09-03 13:28:47 -07:00
2026-09-09 12:20:21 +05:30
2026-09-06 14:53:13 +05:30
2026-09-09 12:19:13 +05:30
2026-09-03 01:43:42 -07:00
2026-09-04 00:15:16 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 22:47:33 +05:30
2026-09-04 00:15:16 -07:00
2026-09-02 23:56:07 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 08:25:33 -07:00
2026-09-07 12:50:29 -07:00
2026-09-07 08:25:33 -07:00
2026-09-09 10:56:37 +05:30
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 08:14:51 -07:00
2026-09-03 13:49:57 -07:00
2026-09-10 18:17:22 -07:00
2026-09-03 01:36:04 -07:00
2026-09-08 17:51:35 +10:00
2026-09-10 03:04:51 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 01:41:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 08:15:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:33:47 -07:00
2026-09-04 08:15:22 -07:00
2026-09-09 12:19:13 +05:30
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 00:55:09 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 07:05:59 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 05:59:43 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:22:48 -07:00
2026-09-03 13:22:48 -07:00
2026-09-04 00:15:16 -07:00
2026-09-06 07:17:03 -07:00
2026-09-03 00:05:14 -07:00
2026-09-02 23:53:08 -07:00
2026-09-04 00:15:16 -07:00
2026-09-06 07:17:03 -07:00
2026-09-06 07:17:03 -07:00
2026-09-03 01:09:55 -07:00
2026-09-03 13:27:01 -07:00
2026-09-03 01:09:55 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 01:09:12 -07:00
2026-09-03 09:44:26 -07:00
2026-09-05 18:04:00 +05:30
2026-09-06 13:32:51 +05:30
2026-09-07 12:50:29 -07:00
2026-09-05 19:01:22 +05:30
2026-09-07 06:05:51 -07:00
2026-09-03 13:24:04 -07:00
2026-09-03 13:24:04 -07:00
2026-09-11 11:19:53 +05:30
2026-09-06 12:06:04 -07:00
2026-09-10 11:48:01 -07:00
2026-09-07 08:09:20 -07:00
2026-09-03 01:13:51 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 03:45:33 +05:30
2026-09-03 01:13:51 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 02:21:15 +05:30
2026-09-10 02:21:16 +05:30
2026-09-10 02:21:16 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:30:31 -07:00
2026-09-03 13:17:25 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 01:23:19 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 01:17:43 -07:00
2026-09-03 13:20:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:20:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 23:28:33 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:17:25 -07:00
2026-09-03 13:30:31 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:24:36 -07:00
2026-09-03 13:24:36 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 13:08:53 -07:00
2026-09-05 18:46:16 +05:30
2026-09-04 07:17:00 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 00:10:38 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 00:27:38 -07:00
2026-09-03 17:13:22 -07:00