fix(gateway): show startup progress in foreground mode - #7441
Open
dlkakbs wants to merge 1 commit into
Open
Conversation
dlkakbs
force-pushed
the
fix/gateway-foreground-progress
branch
from
April 10, 2026 23:21
c47b864 to
d08d9d4
Compare
teknium1
reviewed
Jul 12, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
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
0attests/hermes_cli/test_gateway.py:59, :170, :190, :214, :253, :343, :373. Porting the proposedmax(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 attests/hermes_cli/test_gateway.py:17-31explain that it preventsrun_gateway()from refreshing a real user systemd unit during tests. hermes_cli/subcommands/gateway.py:55still 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-vhelp text.
Automated hermes-sweeper review.
| 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) |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #4709
Summary
Fix foreground gateway runs so startup progress is visible by default.
Previously,
hermes gatewayand the manual fallback path inhermes gateway restartcould appear to hang after the startup banner. The gateway was still running, but most connection and startupmilestone messages were logged at
INFOlevel and only written to~/.hermes/logs/gateway.log.What changed
run_gateway()to enableINFO-level stderr logging by default--quietbehavior so fully silent runs still remain silent-vvand above still behave as expectedWhy
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:
--quietstill suppresses stderr loggingTests
Verified locally with:
python3 -m pytest tests/hermes_cli/test_gateway.py -qpython3 -m pytest tests/hermes_cli/test_gateway_service.py -q