Report network disconnects during approval (#39284)

## Why

When a local proxy request disconnects before network approval completes, the
owning tool call needs a model-visible explanation instead of remaining tied to
the abandoned request.

## What changed

- Track disconnect timing while plain HTTP and CONNECT requests await policy
  decisions.
- Cancel the owning execution and report how long the request waited when it
  disconnects before approval completes.
- Preserve an explicit approval outcome when disconnect cleanup runs afterward.

## Testing

Added unit coverage for disconnect tracking and outcome precedence, plus
end-to-end coverage for plain HTTP and CONNECT requests.

GitOrigin-RevId: b354b29bbe86f38e252fcaf529541f177480136b
This commit is contained in:
Dylan Hurd
2026-08-18 21:11:53 +00:00
committed by copyberry
parent 2fe4e06cc2
commit ba37d0c45b
9 changed files with 353 additions and 68 deletions

View File

@@ -704,6 +704,7 @@ impl ExecServerClient {
command: None,
exec_policy_hint: None,
execution_id: None,
disconnect: None,
});
let inner = Arc::downgrade(&inner);
let rpc_client = Arc::downgrade(&rpc_client);