@@ -295,6 +295,8 @@ process_tool() {
295295 # Re-audit with fresh collection for this specific tool
296296 CLI_AUDIT_JSON=1 CLI_AUDIT_COLLECT=1 CLI_AUDIT_MERGE=1 " $CLI " audit.py " $tool " > /dev/null 2>&1 || true
297297 reload_audit_json
298+ # Clean up any already-current marker left by installer
299+ rm -f " /tmp/.cli-audit/${catalog_tool} .already-current"
298300 return 0
299301 fi
300302
@@ -407,10 +409,20 @@ process_tool() {
407409
408410 # Check if upgrade succeeded by comparing versions
409411 local new_installed=" $( json_field " $tool " installed) "
412+ # Check if installer flagged binary as already at target (hash match)
413+ local already_current_marker=" /tmp/.cli-audit/${catalog_tool} .already-current"
414+ local binary_already_current=" "
415+ if [ -f " $already_current_marker " ]; then
416+ binary_already_current=" true"
417+ rm -f " $already_current_marker "
418+ fi
410419 if [ " $upgrade_success " = " 0" ]; then
411420 # Install script failed
412421 printf " \n ⚠️ Upgrade failed (install script error)\n"
413422 prompt_pin_version " $tool " " $installed "
423+ elif [ -n " $binary_already_current " ]; then
424+ # Binary hash matches target release - upgrade succeeded despite version string
425+ printf " \n ✓ Binary already matches target release (upstream version string may be stale)\n"
414426 elif [ " $new_installed " = " $installed " ] && [ " $new_installed " != " $latest " ]; then
415427 # Version didn't change and not at target
416428 # BUT: if installed is a prefix of latest (e.g., 3.13 vs 3.13.11), consider it success
@@ -456,9 +468,18 @@ process_tool() {
456468
457469 # Check if upgrade succeeded
458470 local new_installed_a=" $( json_field " $tool " installed) "
471+ # Check if installer flagged binary as already at target (hash match)
472+ local already_current_marker_a=" /tmp/.cli-audit/${catalog_tool} .already-current"
473+ local binary_already_current_a=" "
474+ if [ -f " $already_current_marker_a " ]; then
475+ binary_already_current_a=" true"
476+ rm -f " $already_current_marker_a "
477+ fi
459478 if [ " $upgrade_success_a " = " 0" ]; then
460479 printf " \n ⚠️ Upgrade failed (install script error)\n"
461480 printf " Auto-update is still enabled - will try again next time.\n"
481+ elif [ -n " $binary_already_current_a " ]; then
482+ printf " ✓ Auto-update enabled. Binary already matches target release.\n"
462483 elif [ " $new_installed_a " = " $installed " ] && [ " $new_installed_a " != " $latest " ]; then
463484 # Version didn't change - but check for prefix match (e.g., 3.13 vs 3.13.11)
464485 if [[ " $latest " == " $new_installed_a " * ]] || [[ " $new_installed_a " == " $latest " * ]]; then
0 commit comments