From a527dc7172223dff67dc44b7998341a14bf0426d Mon Sep 17 00:00:00 2001 From: Bryan Johnson Date: Wed, 27 May 2026 08:55:03 -0700 Subject: [PATCH] =?UTF-8?q?v0.5.0:=20visible=20"=E2=9C=93=20LARRY=20UPDATE?= =?UTF-8?q?D"=20banner=20at=20startup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When self_update() actually did something (phase A synced files, or phase B self-replaced + relaunched), print a green/bold box at REPL startup with the from→to versions and file count. Stays silent when nothing happened. Phase B now also passes LARRY_PREV_VERSION across the exec relaunch so the new script can report the prior version, not just "updated to 0.5.0". Verified locally against file:// base URL: first launch shows ═══════════════════════════════════════════════════════════════ ✓ LARRY UPDATED first-run sync at v0.5.0 (34 files synced from manifest) ═══════════════════════════════════════════════════════════════ Second launch is silent (.last-sync-version matches running LARRY_VERSION). Co-Authored-By: Claude Opus 4.7 --- larry.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/larry.sh b/larry.sh index eacb76f..c323ad6 100755 --- a/larry.sh +++ b/larry.sh @@ -286,6 +286,8 @@ sync_from_manifest() { if [ "$updated" -gt 0 ] || [ "$failed" -gt 0 ]; then log "manifest sync: $updated updated, $failed failed, $count total (from $base)" fi + LARRY_SYNC_UPDATED_COUNT="$updated" + LARRY_SYNC_FAILED_COUNT="$failed" return 0 } @@ -303,8 +305,20 @@ self_update() { [ -f "$LARRY_HOME/.last-sync-version" ] \ && last_sync=$(tr -d '[:space:]' < "$LARRY_HOME/.last-sync-version" 2>/dev/null) if [ "$last_sync" != "$LARRY_VERSION" ]; then + LARRY_SYNC_UPDATED_COUNT=0 + LARRY_SYNC_FAILED_COUNT=0 if sync_from_manifest "$LARRY_BASE_URL"; then printf '%s\n' "$LARRY_VERSION" > "$LARRY_HOME/.last-sync-version" 2>/dev/null || true + if [ "${LARRY_JUST_UPDATED:-0}" = "1" ] && [ -n "${LARRY_PREV_VERSION:-}" ]; then + # We came in via a phase-B self-replace; phase A then synced the rest. + LARRY_UPDATE_NOTICE="updated v${LARRY_PREV_VERSION} → v${LARRY_VERSION} (${LARRY_SYNC_UPDATED_COUNT} files synced from manifest)" + elif [ "$LARRY_SYNC_UPDATED_COUNT" -gt 0 ]; then + if [ -n "$last_sync" ]; then + LARRY_UPDATE_NOTICE="manifest sync v${last_sync} → v${LARRY_VERSION} (${LARRY_SYNC_UPDATED_COUNT} files updated)" + else + LARRY_UPDATE_NOTICE="first-run sync at v${LARRY_VERSION} (${LARRY_SYNC_UPDATED_COUNT} files synced from manifest)" + fi + fi fi fi @@ -334,7 +348,7 @@ self_update() { rm -f "$tmp" # Force phase A on the next launch by invalidating the sync stamp. rm -f "$LARRY_HOME/.last-sync-version" 2>/dev/null || true - exec env LARRY_JUST_UPDATED=1 "$self" ${ARG_DIR:+"$ARG_DIR"} + exec env LARRY_JUST_UPDATED=1 LARRY_PREV_VERSION="$LARRY_VERSION" "$self" ${ARG_DIR:+"$ARG_DIR"} } self_update @@ -1081,7 +1095,18 @@ main_loop() { fi fi - larry_say "Larry-Anywhere v$LARRY_VERSION ready. Model: $LARRY_MODEL." + # ── Startup banner ───────────────────────────────────────────────────────── + # Always print the version; print a prominent "JUST UPDATED" badge when the + # current launch came from a self-update so Bryan can verify the chain fired. + if [ -n "${LARRY_UPDATE_NOTICE:-}" ]; then + echo "" + printf '%s%s═══════════════════════════════════════════════════════════════%s\n' "$C_GREEN" "$C_BOLD" "$C_RESET" + printf '%s%s ✓ LARRY UPDATED%s\n' "$C_GREEN" "$C_BOLD" "$C_RESET" + printf '%s%s %s%s\n' "$C_GREEN" "$C_BOLD" "$LARRY_UPDATE_NOTICE" "$C_RESET" + printf '%s%s═══════════════════════════════════════════════════════════════%s\n' "$C_GREEN" "$C_BOLD" "$C_RESET" + echo "" + fi + larry_say "${C_BOLD}Larry-Anywhere v$LARRY_VERSION${C_RESET} ready. Model: $LARRY_MODEL." larry_say "Type your message and press Enter. Use '<<' alone on a line to start multi-line (end with 'EOF'). /help for commands." echo ""