mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## Why Command Center retains tasks across backend switches. Opening a retained task must use its owning backend, and restoring its draft must account for history or settings that changed while another backend was displayed. ## What changed - Track each thread's first observed backend, reject conflicting ownership, and switch to the owning backend when opening a retained task. Require users to open tasks on other backends before running task actions. - Keep discovery cursors, initialization, and pins per backend. Scope refreshes and usage requests to their owner, and handle background archive and delete notifications without consuming the displayed backend's pagination budget. - Verify cached blank sessions are still idle and have no turns before reusing them, with a history-read fallback for older servers. Otherwise, resume saved history and preserve current server collaboration settings when restoring drafts. - Use only interactive task-list pages for cloud discovery, which does not support the additional source filters. ## Testing Add regression coverage for ownership conflicts, action routing, pins across backends, background removals, usage isolation, cloud discovery, and draft restoration with blank or populated history, including older-server fallbacks. GitOrigin-RevId: 0d0913ec38dc16a839823008a4a84aa46ad8e6c6
13 lines
465 B
Rust
13 lines
465 B
Rust
//! Logical backend identity, independent of a transport connection or native thread ID.
|
|
//! Reconnecting and auxiliary picker connections reuse the launch owner; a different
|
|
//! backend gets a fresh identity. These process-local IDs never appear on the wire.
|
|
|
|
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
|
pub(crate) struct BackendId(uuid::Uuid);
|
|
|
|
impl BackendId {
|
|
pub(crate) fn new() -> Self {
|
|
Self(uuid::Uuid::new_v4())
|
|
}
|
|
}
|