hermes - ✅(Solved) Fix Title: /update should show changelog / release notes before upgrading [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#13588Fetched 2026-04-22 08:05:30
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #13684: feat: add changelog to update

Description (problem / solution / changelog)

What does this PR do?

This PR adds a preview-first update flow for both the Hermes CLI and gateway so users can review incoming changes before applying a self-update.

Previously, hermes update and /update immediately start pulling code and reinstalling dependencies. That gives users no chance to inspect what changed, which is risky for a tool that can restart its own gateway process. This change adds a lightweight changelog preview based on pending commits and release notes, then asks for confirmation before proceeding.

This approach reuses the existing git fetch flow and shared update logic, keeps the current fast path available with --yes, and avoids introducing a separate backend or release metadata format.

Related Issue

Fixes #13588

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Added shared update preview helpers in hermes_cli/update_preview.py
  • Updated hermes update in hermes_cli/main.py to:
    • fetch updates
    • summarize pending commits and release highlights
    • prompt for confirmation in interactive mode
    • support --yes / -y to skip the preview
  • Updated gateway /update flow in gateway/run.py to:
    • show a preview first
    • require /update confirm before applying the update
    • preserve immediate-update behavior via /update --yes
  • Updated the web update trigger in hermes_cli/web_server.py to call hermes update --yes so background/non-interactive updates do not block
  • Added focused CLI preview tests in tests/hermes_cli/test_update_preview.py
  • Updated gateway update tests in:
    • tests/gateway/test_update_command.py
    • tests/gateway/test_update_streaming.py

How to Test

  1. Activate the repo environment and run:
    hermes update

Checklist

<!-- Complete these before requesting review. -->

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Ubuntu 24.04

Documentation & Housekeeping

<!-- Check all that apply. It's OK to check "N/A" if a category doesn't apply to your change. -->
  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

<!-- Only fill this out if you're adding a skill. Delete this section otherwise. -->
  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Changed files

  • gateway/run.py (modified, +98/-42)
  • hermes_cli/main.py (modified, +71/-34)
  • hermes_cli/update_preview.py (added, +300/-0)
  • hermes_cli/web_server.py (modified, +1/-1)
  • tests/gateway/test_update_command.py (modified, +63/-6)
  • tests/gateway/test_update_streaming.py (modified, +3/-1)
  • tests/hermes_cli/test_update_preview.py (added, +115/-0)

Code Example

/update
"⚕ Starting Hermes update… I'll stream progress here."
 (git pull, pip install, gateway restart)

---

/update
Shows a summary of changes since the current version
→ "15 commits since your version (v0.9.0). Key changes:
    - fix(gateway): break compression-exhaustion infinite loop (#9893)
    - feat: add --all flag to gateway start and restart (#10043)
    - fix: detect and strip non-ASCII characters from API keys (#6843)
    ...
   Proceed? Reply /update confirm (or /update --yes)"

---

/changelog          — show what's changed since current version
/update             — preview + confirm
/update --yes       — skip preview, update immediately (current behavior)
RAW_BUFFERClick to expand / collapse

Problem

The /update command (gateway) and hermes update (CLI) immediately begin pulling and installing updates with no preview of what's changed. The user has no opportunity to review what they're about to apply.

The banner's check_for_updates() reports "X commits behind" but provides no content summary. RELEASE_v0.X.0.md files exist on disk but are only readable after an update has already landed them.

Current Behavior

/update
→ "⚕ Starting Hermes update… I'll stream progress here."
→ (git pull, pip install, gateway restart)

Proposed Behavior

/update
→ Shows a summary of changes since the current version
→ "15 commits since your version (v0.9.0). Key changes:
    - fix(gateway): break compression-exhaustion infinite loop (#9893)
    - feat: add --all flag to gateway start and restart (#10043)
    - fix: detect and strip non-ASCII characters from API keys (#6843)
    ...
   Proceed? Reply /update confirm (or /update --yes)"

Alternatively, a separate command:

/changelog          — show what's changed since current version
/update             — preview + confirm
/update --yes       — skip preview, update immediately (current behavior)

Implementation Notes

  • git log --oneline HEAD..origin/main after git fetch provides the commit list — the fetch already happens in cmd_update()
  • For major releases, the RELEASE_v0.X.0.md content could be fetched from origin/main via git show origin/main:RELEASE_v0.X.0.md
  • Gateway handler _handle_update_command() in gateway/run.py would need a two-phase flow: fetch → preview → wait for confirmation → proceed
  • The _gateway_prompt() IPC mechanism (file-based prompt/response) already exists and could be reused for the confirmation step

Motivation

Reviewing changes before applying them is a basic operational hygiene practice. This is especially important for a tool that manages its own gateway process — a bad update can knock out the user's remote control channel.


[Composed by Hermes agent over Signal gateway].

extent analysis

TL;DR

To address the issue, modify the /update command to fetch and display a summary of changes since the current version before proceeding with the update.

Guidance

  • Modify the cmd_update() function to use git log --oneline HEAD..origin/main after git fetch to retrieve the commit list.
  • Implement a two-phase flow in the _handle_update_command() function: fetch updates, preview changes, wait for user confirmation, and then proceed with the update.
  • Reuse the existing _gateway_prompt() IPC mechanism for the confirmation step.
  • Consider adding a separate /changelog command to display the summary of changes since the current version.

Example

# Example of how to fetch and display commit list
import subprocess

def get_commit_list():
    fetch_output = subprocess.check_output(["git", "fetch"])
    commit_list = subprocess.check_output(["git", "log", "--oneline", "HEAD..origin/main"])
    return commit_list.decode("utf-8")

# Example of how to display preview and wait for confirmation
def preview_and_confirm(commit_list):
    print("Summary of changes:")
    print(commit_list)
    response = input("Proceed? (yes/no): ")
    if response.lower() == "yes":
        # Proceed with update
        pass
    else:
        # Cancel update
        pass

Notes

The proposed solution assumes that the git commands are executed in the correct repository and that the origin/main branch is the correct remote branch to fetch from.

Recommendation

Apply the workaround by modifying the /update command to include a preview and confirmation step, as this provides a more secure and user-friendly experience.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Title: /update should show changelog / release notes before upgrading [1 pull requests, 1 participants]