feat(gateway): add YAML-only user-systemd scope - #76786
Closed
kortylokai-web wants to merge 1 commit into
Closed
Conversation
Contributor
|
Thanks for the careful lifecycle and ownership analysis. This automated hermes-sweeper review found that current
As a result, independent roots with the same profile name already avoid the reported unit collision on current main. Closing as implemented on main. |
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?
Adds a YAML-only
gateway.systemd_scopesetting for Linux deployments that run independent Hermes roots with the same profile names.The scope is validated and composed into the existing deterministic unit name as
hermes-gateway-<scope>[-<profile>]. Missing ornullpreserves the current service names. Scoped services are user-systemd only, and existing units must persist a canonicalHERMES_HOMEmatching the active root before Hermes may replace, control, or remove them.Full uninstall also keeps its standalone-process cleanup without terminating service-managed gateway PIDs, including a service PID that changes during discovery. Inconclusive service-manager discovery fails closed before the standalone termination sweep. A configured scope is rejected before the direct full-uninstall path can mutate a system-scoped unit.
Related Issue
Type of Change
Changes Made
gateway.systemd_scopeconfig key and conservative validation inhermes_cli/config_defaults.pyandhermes_cli/gateway.py.HERMES_HOMEownership checks before scoped unit replacement, control, and deletion.cli-config.yaml.exampleandwebsite/docs/user-guide/messaging/index.md.How to Test
Run the focused systemd-scope tests:
Expected: 35 tests pass.
Run the affected gateway, profile, and uninstall suites:
Expected: 137 tests pass.
Run lint and cross-platform guards:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass209730507vs.0a62610f1):23,951 passed / 65 failedvs.23,915 passed / 66 failed; both had the same 11 collection/import/timeout files, and the only failure delta was one unrelated test that passed on the candidate retry. The remaining 35-pass delta is the new scope suite.Documentation & Housekeeping
docs/, docstrings) —cli-config.yaml.exampleand the messaging guidecli-config.yaml.exampleif I added/changed config keysCONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A; no architecture or workflow changesScreenshots / Logs
N/A — no UI changes.