Skip to content

Commit 2942a0b

Browse files
codeprakhar25claude
andcommitted
fix: address Greptile review bugs in archive and status
- keys.rs: remove redundant pub_path.exists() guard after private key rename — public key existence is already ensured before the rename, so re-checking creates a silent partial-archive path that leaves old traces unverifiable after rotation - status.rs: fix misleading ok() prefix in Gemini (true,true) arm when tools.enableHooks is not set; consolidate into a single warn() line Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7e98913 commit 2942a0b

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

‎src/commands/status.rs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,7 @@ fn print_agent_hook_status() {
307307
);
308308
} else {
309309
println!(
310-
" {} agent hook gemini-cli registered; antigravity rule set",
311-
prefix(ok())
312-
);
313-
println!(
314-
" {} agent hook gemini tools.enableHooks not set — re-run 'agentdiff configure'",
310+
" {} agent hook gemini-cli registered; antigravity rule set but tools.enableHooks not set — re-run 'agentdiff configure'",
315311
prefix(warn())
316312
);
317313
any_missing = true;

‎src/keys.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,8 @@ pub fn archive_current_keypair() -> Result<Option<PathBuf>> {
6464
let dest_pub = dest.join("public.key");
6565
std::fs::rename(&priv_path, &dest_priv)
6666
.with_context(|| format!("archiving private key to {}", dest_priv.display()))?;
67-
if pub_path.exists() {
68-
std::fs::rename(&pub_path, &dest_pub)
69-
.with_context(|| format!("archiving public key to {}", dest_pub.display()))?;
70-
}
67+
std::fs::rename(&pub_path, &dest_pub)
68+
.with_context(|| format!("archiving public key to {}", dest_pub.display()))?;
7169

7270
let meta = ArchivedKeyMeta {
7371
key_id: kid,

0 commit comments

Comments
 (0)