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)
This commit is contained in:
ZhenYi 2026-04-27 14:01:25 +08:00
parent 6a123170a1
commit 88dd3a5f61
2 changed files with 2 additions and 4 deletions

View File

@ -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");
}
}
}

View File

@ -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()
}
};