From 86bc5107229026eafdef11f1e5c4c2bc869be1eb Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 2 Apr 2026 14:50:23 +0900 Subject: [PATCH] fix(runtime): use path extension matching for rotated logs Resolves clippy::case_sensitive_file_extension_comparisons in session.rs. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- rust/crates/runtime/src/session.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rust/crates/runtime/src/session.rs b/rust/crates/runtime/src/session.rs index 5a70572..a2281aa 100644 --- a/rust/crates/runtime/src/session.rs +++ b/rust/crates/runtime/src/session.rs @@ -879,7 +879,12 @@ fn cleanup_rotated_logs(path: &Path) -> Result<(), SessionError> { entry_path .file_name() .and_then(|value| value.to_str()) - .is_some_and(|name| name.starts_with(&prefix) && name.ends_with(".jsonl")) + .is_some_and(|name| { + name.starts_with(&prefix) + && Path::new(name) + .extension() + .is_some_and(|ext| ext.eq_ignore_ascii_case("jsonl")) + }) }) .collect::>();