Skip to content

fix(gateway): show startup progress in foreground mode - #7441

Open
dlkakbs wants to merge 1 commit into
NousResearch:mainfrom
dlkakbs:fix/gateway-foreground-progress
Open

fix(gateway): show startup progress in foreground mode#7441
dlkakbs wants to merge 1 commit into
NousResearch:mainfrom
dlkakbs:fix/gateway-foreground-progress

Conversation

@dlkakbs

@dlkakbs dlkakbs commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Fix #4709

Summary

Fix foreground gateway runs so startup progress is visible by default.

Previously, hermes gateway and the manual fallback path in hermes gateway restart could appear to hang after the startup banner. The gateway was still running, but most connection and startup
milestone messages were logged at INFO level and only written to ~/.hermes/logs/gateway.log.

What changed

  • updated foreground run_gateway() to enable INFO-level stderr logging by default
  • preserved --quiet behavior so fully silent runs still remain silent
  • preserved higher verbosity levels so -vv and above still behave as expected
  • added regression tests covering:
    • default foreground progress output
    • higher explicit verbosity
    • quiet mode disabling stderr logging

Why

Foreground runs should show visible progress during startup, especially while connecting to messaging platforms.

Without that output, users only see the startup banner and then a silent terminal, which looks like a hang even when the gateway is working correctly.

Result

In foreground/manual mode:

  • startup progress is now visible by default
  • users can see connection milestones as the gateway starts
  • --quiet still suppresses stderr logging
  • higher verbosity flags still work normally

Tests

Verified locally with:

  • python3 -m pytest tests/hermes_cli/test_gateway.py -q
  • python3 -m pytest tests/hermes_cli/test_gateway_service.py -q

@dlkakbs
dlkakbs force-pushed the fix/gateway-foreground-progress branch from c47b864 to d08d9d4 Compare April 10, 2026 23:21
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 29, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for targeting a real foreground-gateway usability gap: current main still passes 0 from run_gateway() at hermes_cli/gateway.py:4790, while start_gateway() maps 0 to WARNING at gateway/run.py:20448-20460.

Problems

  • Current tests still assert default verbosity 0 at tests/hermes_cli/test_gateway.py:59, :170, :190, :214, :253, :343, :373. Porting the proposed max(verbose, 1) change without updating those assertions will fail the current suite.
  • The added tests need current main's _install_fake_gateway_run() isolation helper. Its comments at tests/hermes_cli/test_gateway.py:17-31 explain that it prevents run_gateway() from refreshing a real user systemd unit during tests.
  • hermes_cli/subcommands/gateway.py:55 still advertises -v=INFO; after this change, INFO is already the default.

Suggested changes

  • Salvage the one-line behavior change into current run_gateway(), update the existing default-verbosity expectations, use the isolation helper, and revise the -v help text.

Automated hermes-sweeper review.

Comment thread hermes_cli/gateway.py
verbosity = None if quiet else verbose
# Foreground runs should surface startup progress by default so the user
# can see connection milestones instead of a silent terminal.
verbosity = None if quiet else max(verbose, 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When salvaging this change onto current main, also update the existing default-verbosity assertions in tests/hermes_cli/test_gateway.py (for example lines 59, 170, 190, 214, 253, 343, and 373). They currently expect 0, so this otherwise correct change will fail the evolved suite.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants