Migrate archive/unarchive to local ThreadStore#17892
Conversation
dc9e0b4 to
0842a24
Compare
|
|
||
| let thread_id_str = thread_id.to_string(); | ||
| match self.archive_thread_common(thread_id, &rollout_path).await { | ||
| let store = LocalThreadStore::new(codex_rollout::RolloutConfig::from_view(&self.config)); |
There was a problem hiding this comment.
let's stash the store on self so we don't have to re-create it every time.
| } | ||
|
|
||
| #[tokio::test] | ||
| async fn archive_thread_moves_rollout_to_archived_collection() { |
There was a problem hiding this comment.
It's very-very good to have tests for these but let's move them out into their own file (or files, per op?) otherwise this mod will get huge.
There was a problem hiding this comment.
split into multiple files, one per ThreadStore method plus some helpers
|
|
||
| impl PreparedLocalThreadArchive { | ||
| /// Move the prepared rollout into the archived collection. | ||
| pub async fn complete(self) -> ThreadStoreResult<()> { |
There was a problem hiding this comment.
this isn't abstractable.
There was a problem hiding this comment.
now replaced by the reworked thread lookup followed by app-server-internal prepare followed by ThreadStore archive call
| } | ||
|
|
||
| /// Prepare to archive a local thread by resolving and validating its active rollout. | ||
| pub async fn prepare_archive_thread( |
There was a problem hiding this comment.
it's a bit strange to have the two stage archive. Can we shutdown the thread first and have a single step archive call?
There was a problem hiding this comment.
now replaced by the reworked thread lookup followed by app-server-internal prepare followed by ThreadStore archive call
874e83c to
6676bbd
Compare
f585746 to
71b0c1b
Compare
a5c5e0c to
d77c2af
Compare
d77c2af to
379acd5
Compare
Summary
Tests