Remove stale rollout TODO tests (#25106)

## Summary

Remove a stale `TODO(jif)` block of commented-out rollout listing tests
that still referenced an older listing API.

The current rollout listing behavior is covered by the active state DB
and filesystem fallback tests, so keeping the dead commented tests just
adds noise.

## Validation

- `just fmt`
- `just test -p codex-rollout`
This commit is contained in:
jif-oai
2026-05-29 17:09:00 +02:00
committed by GitHub
parent 27e256bc40
commit b40ad0d84d

View File

@@ -94,133 +94,6 @@ async fn insert_state_db_thread(
runtime
}
// TODO(jif) fix
// #[tokio::test]
// async fn list_threads_prefers_state_db_when_available() {
// let temp = TempDir::new().unwrap();
// let home = temp.path();
// let fs_uuid = Uuid::from_u128(101);
// write_session_file(
// home,
// "2025-01-03T13-00-00",
// fs_uuid,
// 1,
// Some(SessionSource::Cli),
// )
// .unwrap();
//
// let db_uuid = Uuid::from_u128(102);
// let db_thread_id = ThreadId::from_string(&db_uuid.to_string()).expect("valid thread id");
// let db_rollout_path = home.join(format!(
// "sessions/2025/01/03/rollout-2025-01-03T12-00-00-{db_uuid}.jsonl"
// ));
// insert_state_db_thread(home, db_thread_id, db_rollout_path.as_path(), false).await;
//
// let page = RolloutRecorder::list_threads(
// home,
// 10,
// None,
// ThreadSortKey::CreatedAt,
// NO_SOURCE_FILTER,
// None,
// TEST_PROVIDER,
// )
// .await
// .expect("thread listing should succeed");
//
// assert_eq!(page.items.len(), 1);
// assert_eq!(page.items[0].path, db_rollout_path);
// assert_eq!(page.items[0].thread_id, Some(db_thread_id));
// assert_eq!(page.items[0].cwd, Some(home.to_path_buf()));
// assert_eq!(
// page.items[0].first_user_message.as_deref(),
// Some("Hello from user")
// );
// }
// #[tokio::test]
// async fn list_threads_db_excludes_archived_entries() {
// let temp = TempDir::new().unwrap();
// let home = temp.path();
// let sessions_root = home.join("sessions/2025/01/03");
// let archived_root = home.join("archived_sessions");
// fs::create_dir_all(&sessions_root).unwrap();
// fs::create_dir_all(&archived_root).unwrap();
//
// let active_uuid = Uuid::from_u128(211);
// let active_thread_id =
// ThreadId::from_string(&active_uuid.to_string()).expect("valid active thread id");
// let active_rollout_path =
// sessions_root.join(format!("rollout-2025-01-03T12-00-00-{active_uuid}.jsonl"));
// insert_state_db_thread(home, active_thread_id, active_rollout_path.as_path(), false).await;
//
// let archived_uuid = Uuid::from_u128(212);
// let archived_thread_id =
// ThreadId::from_string(&archived_uuid.to_string()).expect("valid archived thread id");
// let archived_rollout_path =
// archived_root.join(format!("rollout-2025-01-03T11-00-00-{archived_uuid}.jsonl"));
// insert_state_db_thread(
// home,
// archived_thread_id,
// archived_rollout_path.as_path(),
// true,
// )
// .await;
//
// let page = RolloutRecorder::list_threads(
// home,
// 10,
// None,
// ThreadSortKey::CreatedAt,
// NO_SOURCE_FILTER,
// None,
// TEST_PROVIDER,
// )
// .await
// .expect("thread listing should succeed");
//
// assert_eq!(page.items.len(), 1);
// assert_eq!(page.items[0].path, active_rollout_path);
// }
// #[tokio::test]
// async fn list_threads_falls_back_to_files_when_state_db_is_unavailable() {
// let temp = TempDir::new().unwrap();
// let home = temp.path();
// let fs_uuid = Uuid::from_u128(301);
// write_session_file(
// home,
// "2025-01-03T13-00-00",
// fs_uuid,
// 1,
// Some(SessionSource::Cli),
// )
// .unwrap();
//
// let page = RolloutRecorder::list_threads(
// home,
// 10,
// None,
// ThreadSortKey::CreatedAt,
// NO_SOURCE_FILTER,
// None,
// TEST_PROVIDER,
// )
// .await
// .expect("thread listing should succeed");
//
// assert_eq!(page.items.len(), 1);
// let file_name = page.items[0]
// .path
// .file_name()
// .and_then(|value| value.to_str())
// .expect("rollout file name should be utf8");
// assert!(
// file_name.contains(&fs_uuid.to_string()),
// "expected file path from filesystem listing, got: {file_name}"
// );
// }
#[tokio::test]
async fn find_thread_path_falls_back_when_db_path_is_stale() {
let temp = TempDir::new().unwrap();