From 88dd3a5f61226addda7a0676646ab8a8241978b5 Mon Sep 17 00:00:00 2001 From: ZhenYi <434836402@qq.com> Date: Mon, 27 Apr 2026 14:01:25 +0800 Subject: [PATCH] fix: log silently dropped errors in compaction and SSH path handling - Add tracing::warn! when conversation compaction fails (was let _ = e) - Add tracing::debug! when SSH path canonicalize fails (was let _ = e) --- libs/agent/chat/service.rs | 2 +- libs/git/ssh/handle.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/agent/chat/service.rs b/libs/agent/chat/service.rs index 16eb352..4983bf2 100644 --- a/libs/agent/chat/service.rs +++ b/libs/agent/chat/service.rs @@ -587,7 +587,7 @@ impl ChatService { processed_history = compact_summary.retained; } Err(e) => { - let _ = e; + tracing::warn!(error = %e, "conversation compaction failed, using full history"); } } } diff --git a/libs/git/ssh/handle.rs b/libs/git/ssh/handle.rs index 5a5c5a9..ec2fcbe 100644 --- a/libs/git/ssh/handle.rs +++ b/libs/git/ssh/handle.rs @@ -756,9 +756,7 @@ fn build_git_command(service: GitService, path: PathBuf) -> tokio::process::Comm let cwd = match path.canonicalize() { Ok(p) => p, Err(e) => { - // Log and continue with the raw path — the git process will fail - // with a clear "repository not found" message rather than panicking here. - let _ = e; + tracing::debug!(error = %e, "path canonicalize failed, falling back to raw path"); path.clone() } };