mirror of
https://github.com/openai/codex.git
synced 2026-05-28 15:00:16 +00:00
codex: fix cleared git metadata reads
This commit is contained in:
@@ -3208,6 +3208,9 @@ impl CodexMessageProcessor {
|
||||
Some(None) => Some(None),
|
||||
None => None,
|
||||
};
|
||||
let clears_git_info = matches!(git_sha, Some(None))
|
||||
|| matches!(git_branch, Some(None))
|
||||
|| matches!(git_origin_url, Some(None));
|
||||
|
||||
let updated = match state_db_ctx
|
||||
.update_thread_git_info(
|
||||
@@ -3236,6 +3239,18 @@ impl CodexMessageProcessor {
|
||||
.await;
|
||||
return;
|
||||
}
|
||||
if clears_git_info
|
||||
&& let Err(err) = state_db_ctx
|
||||
.touch_thread_updated_at(thread_uuid, Utc::now())
|
||||
.await
|
||||
{
|
||||
self.send_internal_error(
|
||||
request_id,
|
||||
format!("failed to touch thread metadata for {thread_uuid}: {err}"),
|
||||
)
|
||||
.await;
|
||||
return;
|
||||
}
|
||||
|
||||
let Some(summary) =
|
||||
read_summary_from_state_db_context_by_thread_id(Some(&state_db_ctx), thread_uuid).await
|
||||
|
||||
@@ -114,6 +114,8 @@ async fn read_thread_from_rollout_path(
|
||||
}
|
||||
if let Some(git_info) = git_info_from_metadata(&metadata) {
|
||||
thread.git_info = Some(git_info);
|
||||
} else if metadata.updated_at > thread.updated_at {
|
||||
thread.git_info = None;
|
||||
}
|
||||
}
|
||||
if !found_sqlite_title
|
||||
|
||||
Reference in New Issue
Block a user