Forward executor network policy decisions for auditing (#38670)

## What changed

- Add a best-effort `network/policyDecision` notification for final domain and non-domain policy decisions made by executor-local proxies.
- Validate notifications against the active process on the controller and emit audit events with controller-trusted session and execution metadata.
- Reserve outbound RPC capacity so audit notifications cannot block control messages, and expose valid `chatgpt-account-id` header values for audit attribution.

## Testing

- Cover notification serialization, proxy decision capture, executor-to-controller delivery, trusted metadata handling, and reserved RPC capacity.

GitOrigin-RevId: a39f96a6b3d9401c03d54eaef5b9a6d3fe0da78b
This commit is contained in:
viyatb-oai authored and copyberry committed 2026-08-14 23:42:40 +00:00
1 parent a186f5484d
commit 15fde8c1f2
15 files changed
+655 -19

No files matched your search

+2 -2
View File
@@ -646,10 +646,10 @@ impl ExecServerClient {
.flatten();
let controller = session
.as_ref()
.and_then(|session| session.network_policy_controller.load_full());
.and_then(|session| session.network_policy.controller.load_full());
let process_cancelled = session
.as_ref()
.map(|session| session.network_policy_cancelled.clone());
.map(|session| session.network_policy.cancelled.clone());
let expected_session = session.as_ref().map(Arc::downgrade);
let policy_request =
(process_id_valid && host_valid).then_some(NetworkPolicyRequest {