Charlie Marsh
4969675f01
Resolve network approval prompts when their requests end ( #58350 )
...
## Why
A network request can disappear while its approval prompt is still pending. Leaving that prompt active allows a late cancellation to interrupt the turn even though the request no longer needs approval.
## What changed
- Track network prompt lifetimes in core and notify the app server when a prompt is resolved or withdrawn.
- Cancel the corresponding server request, emit `serverRequest/resolved`, and release its permission guard. Resolve outstanding network prompts during thread shutdown as well.
- Claim a live pending approval and validate its originating turn before applying a decision, so stale responses cannot interrupt a turn or persist policy changes.
- Distinguish network approvals that require the originating turn from proxy approvals that can be serviced by a later active turn.
## Testing
Extend regression coverage for disconnected network requests, late cancellation responses, turn completion during review, shutdown cleanup, mismatched turn IDs, and command approvals from background code running during a later turn.
GitOrigin-RevId: 78f656d92607ec21ddd0c5d781ed0947588cb2eb
2026-10-30 14:40:32 +00:00
..
2026-10-27 16:16:17 +00:00
2026-10-29 16:57:12 +00:00
2026-10-19 20:30:44 +00:00
2026-10-06 01:39:50 +00:00
2026-10-15 20:57:39 +00:00
2026-10-29 18:24:34 +00:00
2026-10-27 23:02:27 +00:00
2026-10-23 00:02:29 +00:00
2026-10-20 19:39:43 +00:00
2026-10-23 02:21:49 +00:00
2026-10-06 21:28:13 +00:00
2026-10-06 01:39:50 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 22:39:32 +00:00
2026-10-15 12:01:04 +00:00
2026-10-27 23:53:34 +00:00
2026-10-26 19:28:51 +00:00
2026-10-14 05:36:44 +00:00
2026-10-07 18:32:50 +00:00
2026-10-27 21:50:08 +00:00
2026-10-27 22:26:12 +00:00
2026-10-30 02:28:51 +00:00
2026-10-26 18:33:05 +00:00
2026-10-28 21:22:06 +00:00
2026-10-22 02:15:00 +00:00
2026-10-20 17:15:35 +00:00
2026-10-16 16:28:53 +00:00
2026-10-28 16:46:41 +00:00
2026-10-30 14:40:32 +00:00
2026-10-06 17:11:07 +00:00
2026-10-13 16:57:54 +00:00
2026-10-06 01:39:50 +00:00
2026-10-22 21:01:14 +00:00
2026-10-19 19:24:26 +00:00
2026-10-28 21:22:06 +00:00
2026-10-26 18:31:49 +00:00
2026-10-26 19:19:10 +00:00
2026-10-08 16:27:10 +00:00
2026-10-29 23:24:52 +00:00
2026-10-27 23:53:34 +00:00
2026-10-09 18:58:53 +00:00
2026-10-08 16:19:09 +00:00
2026-10-08 23:34:16 +00:00
2026-10-13 10:21:42 +00:00
2026-10-23 00:02:29 +00:00
2026-10-29 23:56:17 +00:00
2026-10-15 19:51:22 +00:00
2026-10-21 02:41:05 +00:00
2026-10-27 00:08:07 +00:00
2026-10-26 22:13:14 +00:00
2026-10-06 16:56:39 +00:00
2026-10-21 02:41:05 +00:00
2026-10-21 02:41:05 +00:00
2026-10-29 12:54:39 +00:00
2026-10-06 01:39:50 +00:00
2026-10-23 04:01:39 +00:00
2026-10-29 12:37:59 +00:00
2026-10-09 20:14:04 +00:00
2026-10-27 16:16:17 +00:00
2026-10-05 22:17:02 +00:00
2026-10-19 22:01:41 +00:00
2026-10-20 14:43:08 +00:00
2026-10-13 23:29:53 +00:00
2026-10-07 15:47:21 +00:00
2026-10-14 02:01:49 +00:00
2026-10-26 18:13:00 +00:00
2026-10-06 17:11:07 +00:00
2026-10-28 17:04:31 +00:00
2026-10-27 14:28:15 +00:00
2026-10-15 11:24:07 +00:00
2026-10-16 12:37:14 +00:00
2026-10-28 16:00:30 +00:00
2026-10-26 19:21:08 +00:00
2026-10-23 18:39:28 +00:00
2026-10-19 11:40:15 +00:00
2026-10-29 03:14:13 +00:00
2026-10-29 12:54:39 +00:00
2026-10-27 22:59:22 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:11:07 +00:00
2026-10-21 16:43:30 +00:00
2026-10-06 16:56:39 +00:00
2026-10-22 22:33:07 +00:00
2026-10-29 03:14:13 +00:00
2026-10-06 01:39:50 +00:00
2026-10-14 20:00:52 +00:00
2026-10-13 16:23:44 +00:00
2026-10-23 00:02:29 +00:00
2026-10-21 02:41:05 +00:00
2026-10-07 07:57:14 +00:00
2026-10-27 22:01:13 +00:00
2026-10-23 00:02:29 +00:00
2026-10-29 19:34:46 +00:00
2026-10-06 01:39:50 +00:00
2026-10-27 21:50:08 +00:00
2026-10-08 16:19:09 +00:00
2026-10-29 00:03:28 +00:00
2026-10-06 17:11:07 +00:00
2026-10-27 16:16:17 +00:00
2026-10-17 23:22:14 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 00:16:18 +00:00
2026-10-09 18:58:53 +00:00
2026-10-23 18:39:28 +00:00
2026-10-29 22:36:06 +00:00
2026-10-27 00:23:39 +00:00
2026-10-29 10:34:17 +00:00
2026-10-10 01:25:00 +00:00
2026-10-06 17:11:07 +00:00
2026-10-13 12:42:53 +00:00
2026-10-29 00:03:28 +00:00
2026-10-27 22:26:12 +00:00
2026-10-06 17:11:07 +00:00
2026-10-27 16:16:17 +00:00
2026-10-20 14:14:59 +00:00
2026-10-28 16:00:30 +00:00
2026-10-10 01:25:00 +00:00
2026-10-30 02:43:02 +00:00
2026-10-28 20:10:15 +00:00
2026-10-13 22:21:31 +00:00
2026-10-13 22:21:31 +00:00
2026-10-13 22:21:31 +00:00
2026-10-13 22:21:31 +00:00
2026-10-22 12:46:24 +00:00
2026-10-21 02:41:05 +00:00
2026-10-29 00:42:21 +00:00
2026-10-27 16:16:17 +00:00
2026-10-06 17:11:07 +00:00
2026-10-23 00:02:29 +00:00
2026-10-21 18:43:15 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:11:07 +00:00
2026-10-26 21:08:15 +00:00
2026-10-08 02:06:58 +00:00
2026-10-13 13:36:24 +00:00
2026-10-06 17:11:07 +00:00
2026-10-19 20:01:37 +00:00
2026-10-29 19:16:28 +00:00
2026-10-06 22:39:06 +00:00
2026-10-14 18:02:25 +00:00
2026-10-27 13:31:38 +00:00
2026-10-10 01:25:00 +00:00
2026-10-27 16:16:17 +00:00
2026-10-26 18:31:49 +00:00
2026-10-06 17:11:07 +00:00
2026-10-19 20:30:44 +00:00
2026-10-09 13:15:39 +00:00
2026-10-22 10:03:05 +00:00
2026-10-27 22:26:12 +00:00
2026-10-23 00:46:28 +00:00
2026-10-22 23:48:20 +00:00
2026-10-27 19:50:41 +00:00
2026-10-27 16:16:17 +00:00
2026-10-29 11:15:52 +00:00
2026-10-29 09:48:55 +00:00
2026-10-06 19:30:57 +00:00
2026-10-27 13:02:57 +00:00
2026-10-07 19:42:35 +00:00
2026-10-23 18:48:10 +00:00
2026-10-07 15:47:21 +00:00
2026-10-08 22:01:24 +00:00
2026-10-26 22:05:23 +00:00
2026-10-08 03:20:54 +00:00
2026-10-21 19:29:08 +00:00
2026-10-29 11:23:51 +00:00
2026-10-22 02:15:00 +00:00
2026-10-26 19:37:32 +00:00
2026-10-22 22:44:48 +00:00
2026-10-20 11:56:17 +00:00
2026-10-27 23:02:27 +00:00
2026-10-12 18:54:22 +00:00
2026-10-06 01:39:50 +00:00
2026-10-27 16:16:17 +00:00
2026-10-06 01:39:50 +00:00
2026-10-27 19:11:56 +00:00
2026-10-26 21:46:26 +00:00
2026-10-29 16:57:12 +00:00
2026-10-06 17:10:43 +00:00
2026-10-11 15:48:35 +00:00
2026-10-27 22:26:12 +00:00
2026-10-23 00:02:29 +00:00
2026-10-27 23:02:27 +00:00
2026-10-27 16:16:17 +00:00
2026-10-23 04:52:47 +00:00
2026-10-19 19:33:11 +00:00
2026-10-06 22:39:06 +00:00
2026-10-27 22:26:12 +00:00
2026-10-26 18:33:05 +00:00
2026-10-26 18:33:05 +00:00
2026-10-06 01:39:50 +00:00
2026-10-29 17:25:51 +00:00
2026-10-27 16:16:17 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 17:10:43 +00:00
2026-10-27 23:02:27 +00:00
2026-10-20 22:34:40 +00:00
2026-10-27 05:52:01 +00:00
2026-10-06 17:11:07 +00:00
2026-10-14 06:03:02 +00:00
2026-10-28 10:13:29 +00:00
2026-10-26 18:13:00 +00:00
2026-10-26 19:01:45 +00:00
2026-10-28 15:10:52 +00:00
2026-10-23 00:02:29 +00:00
2026-10-28 02:00:30 +00:00
2026-10-06 17:11:07 +00:00
2026-10-06 22:39:32 +00:00
2026-10-28 16:00:30 +00:00
2026-10-06 17:11:07 +00:00
2026-10-19 19:24:26 +00:00
2026-10-23 00:02:29 +00:00