Skip to content

fix(cli): non-blocking startup update check, version consistency, and banner deduplication - #1257

Closed
0xNyk wants to merge 2 commits into
NousResearch:mainfrom
0xNyk:fix/update-check-and-banner-dedup
Closed

fix(cli): non-blocking startup update check, version consistency, and banner deduplication#1257
0xNyk wants to merge 2 commits into
NousResearch:mainfrom
0xNyk:fix/update-check-and-banner-dedup

Conversation

@0xNyk

@0xNyk 0xNyk commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix version string inconsistency: __version__ changed from "v1.0.0" to "0.1.0" to match pyproject.toml; v prefix added at display time so hermes version shows Hermes Agent v0.1.0 instead of Hermes Agent vv1.0.0
  • Make update check non-blocking: check_for_updates() (which calls git fetch) now runs in a background daemon thread via prefetch_update_check(), started early in cmd_chat() so it overlaps with skill sync and agent init
  • Fix repo path fallback: check_for_updates() now falls back to Path(__file__).parent.parent for dev installs where ~/.hermes/hermes-agent/.git doesn't exist
  • Remove duplicate build_welcome_banner: Deleted ~195 lines of duplicated code from cli.py (local build_welcome_banner, _format_context_length, _get_available_skills) that shadowed the banner.py imports — the shadowing meant the update check and MCP servers section never ran during hermes chat
  • Port skin features: banner_hero, banner_logo support and terminal width check (≥95 cols for large logo) moved from the deleted cli.py version into banner.py
  • Enhance hermes version: Now shows update status (Update available: N commits behind — run 'hermes update' or Up to date)

Priority: #4 (Performance and robustness) per CONTRIBUTING.md
Net change: ~-30 lines (removal of duplication outweighs additions)

Test plan

  • pytest tests/hermes_cli/test_update_check.py — 7 new tests all pass (version string, cache behavior, expired cache, no-git-dir, dev fallback, prefetch non-blocking, timeout)
  • hermes version — shows Hermes Agent v0.1.0, update status
  • hermes chat -q "hello" — banner renders with update notification, tools, skills, MCP servers, startup not blocked
  • Full test suite — 2927 passed, no new regressions

0xNyk added 2 commits March 14, 2026 14:02
- Change __version__ from "v1.0.0" to "0.1.0" to match pyproject.toml
- Add v prefix at display time in banner title so version shows correctly
  as "Hermes Agent v0.1.0" instead of "Hermes Agent vv1.0.0"
- Add background thread mechanism (prefetch_update_check/get_update_result)
  so git fetch runs in parallel with skill sync and agent init
- Fix repo path fallback in check_for_updates() for dev installs
- Remove duplicate build_welcome_banner (~180 lines) and
  _format_context_length from cli.py — the banner.py version is
  now the single source of truth
- Port skin banner_hero/banner_logo support and terminal width check
  from cli.py's version into banner.py
- Add update status output to hermes version command
- Add unit tests for update check, prefetch, and version string
@0xNyk 0xNyk closed this Mar 14, 2026
@0xNyk
0xNyk deleted the fix/update-check-and-banner-dedup branch March 14, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant