preserve custom rollout path fallback

This commit is contained in:
anais
2026-06-15 16:00:28 -07:00
parent dbc0839234
commit c5266d7437
+3 -1
View File
@@ -1914,6 +1914,7 @@ async fn find_thread_path_by_id_str_in_any_subdir(
};
let thread_id = ThreadId::from_string(id_str).ok();
let mut preferred_subdir = None;
let mut unverified_db_path = None;
let mut fallback_reason = state_db_ctx.is_none().then_some("db_unavailable");
if let Some(state_db_ctx) = state_db_ctx
&& let Some(thread_id) = thread_id
@@ -1955,6 +1956,7 @@ async fn find_thread_path_by_id_str_in_any_subdir(
"state db returned rollout path for thread {id_str} that could not be verified: {}: {err}",
existing_db_path.display()
);
unverified_db_path = Some(existing_db_path);
fallback_reason = Some("unverified_path");
}
}
@@ -2025,7 +2027,7 @@ async fn find_thread_path_by_id_str_in_any_subdir(
}
}
Ok(None)
Ok(unverified_db_path)
}
pub(crate) async fn find_thread_path_by_id_str_in_subdir_without_db(