mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Remove the app-server's test-only thread summary helper (#63408)
Delete `summary_from_thread_metadata` and the unit test that checks its second-precision timestamp formatting. GitOrigin-RevId: 917c0d28bb486c69baba8142ac84cc9057c6d5ee
This commit is contained in:
@@ -7070,32 +7070,6 @@ fn summary_from_state_db_metadata(
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn summary_from_thread_metadata(metadata: &ThreadMetadata) -> ConversationSummary {
|
||||
summary_from_state_db_metadata(
|
||||
metadata.id,
|
||||
metadata.rollout_path.clone(),
|
||||
metadata.first_user_message.clone(),
|
||||
metadata.preview.clone(),
|
||||
metadata
|
||||
.created_at
|
||||
.to_rfc3339_opts(SecondsFormat::Secs, true),
|
||||
metadata
|
||||
.updated_at
|
||||
.to_rfc3339_opts(SecondsFormat::Secs, true),
|
||||
metadata.model_provider.clone(),
|
||||
metadata.cwd.clone(),
|
||||
metadata.cli_version.clone(),
|
||||
metadata.source.clone(),
|
||||
metadata.thread_source.clone(),
|
||||
metadata.agent_nickname.clone(),
|
||||
metadata.agent_role.clone(),
|
||||
metadata.git_sha.clone(),
|
||||
metadata.git_branch.clone(),
|
||||
metadata.git_origin_url.clone().map(String::from),
|
||||
)
|
||||
}
|
||||
|
||||
fn preview_from_rollout_items(items: &[RolloutItem]) -> String {
|
||||
items
|
||||
.iter()
|
||||
|
||||
@@ -955,22 +955,6 @@ mod thread_processor_behavior_tests {
|
||||
Ok(metadata)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn summary_from_thread_metadata_formats_protocol_timestamps_as_seconds() -> Result<()> {
|
||||
let mut metadata =
|
||||
test_thread_metadata(/*model*/ None, /*reasoning_effort*/ None)?;
|
||||
metadata.created_at =
|
||||
DateTime::parse_from_rfc3339("2025-09-05T16:53:11.123Z")?.with_timezone(&Utc);
|
||||
metadata.updated_at =
|
||||
DateTime::parse_from_rfc3339("2025-09-05T16:53:12.456Z")?.with_timezone(&Utc);
|
||||
|
||||
let summary = summary_from_thread_metadata(&metadata);
|
||||
|
||||
assert_eq!(summary.timestamp, Some("2025-09-05T16:53:11Z".to_string()));
|
||||
assert_eq!(summary.updated_at, Some("2025-09-05T16:53:12Z".to_string()));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn merge_persisted_resume_metadata_prefers_persisted_model_and_reasoning_effort() -> Result<()>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user