fix(serve): emit both HERMES_DASHBOARD_READY and HERMES_BACKEND_READY for backward compatibility - #60763
Open
liuhao1024 wants to merge 1 commit into
Open
fix(serve): emit both HERMES_DASHBOARD_READY and HERMES_BACKEND_READY for backward compatibility#60763liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
… for backward compatibility After PR NousResearch#55923, `hermes serve --headless` (used by desktop app spawn) emits `HERMES_BACKEND_READY port=N` instead of the legacy `HERMES_DASHBOARD_READY port=N`. The desktop regex was updated in the same PR to match either sentinel, but this only takes effect when the Electron app is rebuilt and reinstalled. Users who run `hermes update` (CLI-only) get the new sentinel emission without the updated regex consumer, causing port discovery to timeout and the desktop to fail to connect. Fix: Emit both sentinels during the transition period. This ensures: - Pre-NousResearch#55923 desktop builds match `HERMES_DASHBOARD_READY` - Post-NousResearch#55923 desktop builds match `HERMES_BACKEND_READY` - The ready-file side channel (HERMES_DESKTOP_READY_FILE) remains as fallback No test changes needed — the desktop regex already matches either sentinel since NousResearch#55923, and the ready-file path is unaffected.
Contributor
|
Thanks for addressing the independently deployed desktop/CLI compatibility path. The premise is confirmed on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
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.
What does this PR do?
After PR #55923,
hermes serve --headless(used by desktop app spawn) emitsHERMES_BACKEND_READY port=Ninstead of the legacyHERMES_DASHBOARD_READY port=N. The desktop regex was updated in the same PR to match either sentinel, but this only takes effect when the Electron app is rebuilt and reinstalled.Users who run
hermes update(CLI-only) get the new sentinel emission without the updated regex consumer, causing port discovery to timeout and the desktop to fail to connect.This PR ensures backward compatibility by emitting both sentinels during the transition period.
Related Issue
Fixes #60412
Type of Change
Changes Made
hermes_cli/web_server.py: Emit bothHERMES_DASHBOARD_READY port=N(always) andHERMES_BACKEND_READY port=N(headless-only) to ensure pre-feat(cli): make hermes serve a real headless backend (no web UI build/mount, neutral ready sentinel) #55923 desktop builds can still match the legacy sentinel while post-feat(cli): make hermes serve a real headless backend (no web UI build/mount, neutral ready sentinel) #55923 builds use the neutral oneHow to Test
hermes serve --headless --port 0const _READY_RE = /^HERMES_(?:BACKEND|DASHBOARD)_READY port=(\d+)/m(added in feat(cli): make hermes serve a real headless backend (no web UI build/mount, neutral ready sentinel) #55923) already matches either sentinel, so post-feat(cli): make hermes serve a real headless backend (no web UI build/mount, neutral ready sentinel) #55923 desktop builds will correctly parse port=54321 from either line/^HERMES_DASHBOARD_READY port=(\d+)/mwill correctly parse from the first line, avoiding the timeout issueChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A