You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use full Windows venv-holder command lines for internal gateway identity matching
preserve argv boundaries for Windows paths containing spaces
redact and cap command lines at 120 characters only when emitting human-facing blocker diagnostics
require a real Hermes gateway entrypoint and first subcommand position, so unrelated venv processes remain blockers
preserve the existing default truncated detector behavior and fail-closed update guard
Why
The Windows blocker detector shortened every process command line to 120 characters before gateway classification. With the managed install path and --profile quality-manager, the real command is 137 characters and was truncated before gateway run:
... -m hermes_cli.main --profile quality-ma
The Desktop preflight therefore reported the managed gateway as an unknown venv holder (pausable_gateways: 0) and aborted the update.
Using full command lines for identity checks also required tightening the shared matcher: gateway entrypoint text in ordinary script arguments must not exempt an unrelated process, and argv arrays must retain quoting around paths with spaces.
Safety
full command lines stay internal to process classification
diagnostics are redacted before being capped at 120 characters
unknown/non-gateway venv holders still block the update
matcher requires a real Hermes entrypoint and gateway as the first subcommand after profile selectors
valid hermes, python -m hermes_cli.main, direct script, environment-prefix, versioned Python, and space-path launch forms remain supported
Thanks for isolating the Desktop handoff from the canonical updater lifecycle.
I verified the reported ordering defect against current remote main (9accf79d): apps/desktop/electron/main.ts performs the all-venv-holder scan after releasing Desktop-owned backends and returns before spawnUpdaterProcess(). Current hermes_cli/update_cmd.py pauses only registry-discovered gateway PIDs before its venv-holder guard.
This patch removes the duplicate Electron preflight, routes Command Center updates through the existing local/remote-aware requestActiveUpdate() path (apps/desktop/src/app/command-center/index.tsx:270), and extends the CLI pause flow with the existing strict gateway command matcher (hermes_cli/update_cmd.py:2723-2734). The added tests cover both a registry-missed gateway run --replace process and rejection of gateway status.
No blocking source-level issue found. This is an 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
area/install-updateInstaller, updater, packaging, wheels, doctorcomp/cliCLI entry point, hermes_cli/, setup wizardcomp/desktopElectron desktop app (apps/desktop/*)P2Medium — degraded but workaround existsplatform/windowsNative Windows-specific behavior or breakagesweeper:blast-moderateSweeper blast radius: moderate — a subsystem or single platformsweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradessweeper:risk-platform-windowsSweeper risk: may break or behave differently on native Windowstype/bugSomething isn't working
3 participants
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.
Summary
Why
The Windows blocker detector shortened every process command line to 120 characters before gateway classification. With the managed install path and
--profile quality-manager, the real command is 137 characters and was truncated beforegateway run:The Desktop preflight therefore reported the managed gateway as an unknown venv holder (
pausable_gateways: 0) and aborted the update.Using full command lines for identity checks also required tightening the shared matcher: gateway entrypoint text in ordinary script arguments must not exempt an unrelated process, and argv arrays must retain quoting around paths with spaces.
Safety
gatewayas the first subcommand after profile selectorshermes,python -m hermes_cli.main, direct script, environment-prefix, versioned Python, and space-path launch forms remain supportedValidation
uv run --with pytest --with pytest-xdist pytest -q -n auto tests/hermes_cli/test_scan_venv_blockers.py tests/hermes_cli/test_update_venv_health.py tests/hermes_cli/test_update_concurrent_quarantine.py tests/hermes_cli/test_gateway_external_supervisor.py tests/gateway/test_gateway_command_line_matcher.py tests/gateway/test_status.py tests/hermes_cli/test_gateway_proc_fallback.py tests/hermes_cli/test_gateway_service.py— 145 passed, 1 skippeduv run --with ruff ruff check ...on all ten changed Python files — passedpython -m py_compileon all ten changed Python files — passed--profile quality-manager gateway runprocess:C:\Program Files\...gateway path classified correctly: truegateway restartremains runtime-only and is not classified asrun: trueFollow-up to #74326.