mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## Why Events from another backend must not mutate the current backend's thread or connection state, even when native thread IDs collide. ## What changed Attach the session's `BackendId` to incoming app-server events and check it before dispatching to thread caches or UI handlers. Apply the same check when waiting for a thread revert notification. ## Testing Add regression tests covering ignored foreign notifications, approval requests, lag and disconnect events, accepted events from the current backend, and preservation of backend identity on transport events. GitOrigin-RevId: 2577ab78e0592726f5f05e3426772899e6cb7c7e
11 lines
370 B
Rust
11 lines
370 B
Rust
//! Retains the logical backend that produced a session event before UI dispatch.
|
|
//! Backend identity survives reconnects; it is not a transport generation or wire ID.
|
|
|
|
use crate::backend_id::BackendId;
|
|
use codex_app_server_client::AppServerEvent;
|
|
|
|
pub(crate) struct AppServerSessionEvent {
|
|
pub(crate) backend_id: BackendId,
|
|
pub(crate) event: AppServerEvent,
|
|
}
|