mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
## Why Exec-server process and network-policy events need stable attribution to the launching tool call and executor without recording process payloads. ## What changed - Add optional `ExecMetadata` to `ExecParams` and propagate the thread and tool call IDs from unified exec. - Emit bounded OpenTelemetry events for process start, spawn failure, sandbox denial, and exit. Correlate them with the launch trace and registry-issued executor identity while excluding arguments, paths, environment values, output, and error text. - Preserve launch attribution across long-running processes and reconnects, and attach the same metadata to network-policy audit events. - Keep the protocol backward compatible when metadata is omitted, and prevent invalid trace headers from inheriting an unrelated active span. ## Testing Add coverage for metadata serialization and propagation, lifecycle event fields, trace relationships, reconnect behavior, spawn failures, sandbox denials, and network-policy attribution. GitOrigin-RevId: 7aa480a7289c73cb95e2c124c35500bb6f0d5084
18 lines
619 B
Rust
18 lines
619 B
Rust
//! Process attribution captured at launch for network policy logs.
|
|
//! Executor registration identity comes from the executor, never the controller.
|
|
|
|
/// Registry-issued identity of the executor that launched a process.
|
|
#[derive(Clone)]
|
|
pub struct ExecutorLogIdentity {
|
|
pub environment_id: String,
|
|
pub registration_id: String,
|
|
}
|
|
|
|
/// Correlation metadata only; these values do not authorize network requests.
|
|
#[derive(Clone, Default)]
|
|
pub struct NetworkProxyProcessLogMetadata {
|
|
pub thread_id: Option<String>,
|
|
pub tool_call_id: Option<String>,
|
|
pub executor_identity: Option<ExecutorLogIdentity>,
|
|
}
|