mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
Shut down resumed descendants when archiving thread trees (#40179)
## Why Collaboration can resume an archived descendant without unarchiving its rollout. Archiving the parent again previously skipped shutdown for that descendant because only rollouts newly marked as archived were prepared. ## What changed Prepare every loaded thread in the spawn subtree for archival, including descendants whose rollouts are already archived, before updating archive state. ## Testing Add an app-server integration test that resumes an archived child through its parent and verifies that archiving the parent unloads the entire subtree. GitOrigin-RevId: aca8c0d6ddb8900aad16becbeb594426cea1e3a6
This commit is contained in:
@@ -1644,8 +1644,10 @@ impl ThreadRequestProcessor {
|
||||
}
|
||||
|
||||
archive_thread_ids[1..].reverse();
|
||||
for &thread_id_to_archive in &archive_thread_ids {
|
||||
self.prepare_thread_for_archive(thread_id_to_archive).await;
|
||||
// Collaboration may resume an archived descendant without unarchiving it.
|
||||
self.prepare_thread_for_archive(thread_id).await;
|
||||
for &descendant_thread_id in subtree_thread_ids.iter().skip(1).rev() {
|
||||
self.prepare_thread_for_archive(descendant_thread_id).await;
|
||||
}
|
||||
|
||||
let archived_thread_ids = self
|
||||
|
||||
Reference in New Issue
Block a user