fix(gateway): read-only liveness probe + non-root-workspace root guard - #50047
Draft
arminanton wants to merge 2 commits into
Draft
fix(gateway): read-only liveness probe + non-root-workspace root guard#50047arminanton wants to merge 2 commits into
arminanton wants to merge 2 commits into
Conversation
Two robustness fixes: (1) the passive liveness probe opens the gateway lock read-only so it can't crash the gateway with PermissionError on an alien/root-owned lock file; (2) a root-ownership guard refuses to launch the gateway as root when $HERMES_HOME is owned by a non-root user (the bindfs dual-systemd trap), overridable via HERMES_ALLOW_ROOT_GATEWAY.
… guard The two-case root guard checked the general workspace-owner case (Case 2) before the specific official-Docker case (Case 1), so inside the official image the workspace-owner message pre-empted the Docker-specific guidance and broke test_run_gateway_refuses_root_in_official_docker. Reorder so the more specific Docker case wins first; both behaviors preserved, all gateway tests pass.
arminanton
added a commit
to arminanton/hermes-agent
that referenced
this pull request
Jun 22, 2026
…aught+fixed 2 real defects (NousResearch#50047 root-guard order, NousResearch#50048 force_plain test sig); xhigh test is overlay-only; clean-only failures are upstream bugs our PRs fix
Contributor
|
Thanks for addressing the foreign-lock and root-workspace failure modes. The first issue is reproducible from the current implementation: 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.
Two robustness fixes: (1) the passive liveness probe opens the gateway lock read-only so it can't crash the gateway with PermissionError on an alien/root-owned lock file; (2) a root-ownership guard refuses to launch the gateway as root when $HERMES_HOME is owned by a non-root user (the bindfs dual-systemd trap), overridable via HERMES_ALLOW_ROOT_GATEWAY.