Skip to content

fix: add HERMES_SKIP_PROFILE_OVERRIDE escape hatch for launcher sandboxes - #35076

Closed
OmarB97 wants to merge 1 commit into
NousResearch:mainfrom
OmarB97:fix/hermes-stream-tap-profile-override-v2
Closed

fix: add HERMES_SKIP_PROFILE_OVERRIDE escape hatch for launcher sandboxes#35076
OmarB97 wants to merge 1 commit into
NousResearch:mainfrom
OmarB97:fix/hermes-stream-tap-profile-override-v2

Conversation

@OmarB97

@OmarB97 OmarB97 commented May 30, 2026

Copy link
Copy Markdown
Contributor

What

Why

How

Scope

This PR is intentionally narrowed to the profile-override escape hatch only:

  • hermes_cli/main.py
  • tests/hermes_cli/test_apply_profile_override.py

The broader HERMES_LLM_BASE_URL runtime-provider work remains separate in #34332.

Testing

python -m pytest tests/hermes_cli/test_apply_profile_override.py -q

Result: 5 passed in 0.23s.

Risks / gaps

  • Low risk: this only affects dispatches that explicitly set HERMES_SKIP_PROFILE_OVERRIDE=1.
  • Standard Hermes usage is unchanged.

Relation to #22502

Main now trusts HERMES_HOME when its parent directory is literally named profiles (_apply_profile_override step 1.5). That heuristic does not cover launcher sandboxes whose scratch homes are not profile-shaped (e.g. .../hermes-scratch/<run-id>/), so the unconditional override still clobbers them; this escape hatch remains necessary for that case.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels May 30, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related: This appears to be a v2 resubmission of #33986 (same author/title, reduced from 19 files to 7 — scope creep removed). Also overlaps with #34332 which is a superset including HERMES_LLM_BASE_URL. Includes additional fixes: chat() KeyError resilience in run_agent.py, skin banner refresh in cli.py.

@OmarB97

OmarB97 commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

Consolidation update: closed duplicate #35590 and older v1 #33986, leaving this PR as the canonical HERMES_SKIP_PROFILE_OVERRIDE review target per the maintainer request. #34332 remains the broader HERMES_LLM_BASE_URL follow-up and is separate from this narrower profile-override escape hatch.

@OmarB97
OmarB97 force-pushed the fix/hermes-stream-tap-profile-override-v2 branch from 0ca392e to af9c2cf Compare May 31, 2026 06:07

OmarB97 commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

Scope update: force-pushed this branch to current main with only the profile-override escape hatch and its regression test. The PR is now one commit / two files (hermes_cli/main.py, tests/hermes_cli/test_apply_profile_override.py).

Local verification: python -m pytest tests/hermes_cli/test_apply_profile_override.py -q -> 5 passed in 0.23s.

The broader HERMES_LLM_BASE_URL runtime-provider work remains in #34332.

@OmarB97

OmarB97 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Rebased and refreshed this upstream mirror at head 8032e5a0647ba9986c15f0996c2bff5a3a6965b9.

Current state:

  • GitHub reports the PR CLEAN / MERGEABLE.
  • Required checks are green: tests 1-6, e2e, typechecks, lint, Nix, Docker amd64/arm64, attribution, common ancestor, and supply-chain checks.
  • The PR remains intentionally narrow: only hermes_cli/main.py and tests/hermes_cli/test_apply_profile_override.py are changed.
  • Local focused verification passed before push: py_compile, git diff --check, and scripts/run_tests.sh tests/hermes_cli/test_apply_profile_override.py -- -q with 9 passed.
  • meshctl pr merge --dry-run accepted the PR with a fresh base and no stale overlap.

I attempted the actual merge through meshctl pr merge, but GitHub rejected it because OmarB97 does not have MergePullRequest permission on NousResearch/hermes-agent. This PR is ready for an upstream maintainer to merge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for narrowing this to a focused profile-resolution change and adding a regression test.

This automated hermes-sweeper review is closing it under the standing env-var-for-config policy:

  • The PR adds HERMES_SKIP_PROFILE_OVERRIDE, a new non-secret HERMES_* flag that changes profile-selection behavior before startup (hermes_cli/main.py, PR head 0de74e33e58e).
  • AGENTS.md:102-107 requires behavioral configuration to use config.yaml, rather than a new user-facing environment-variable control.
  • The current non-profile-shaped HERMES_HOME behavior is deliberate: hermes_cli/main.py:461-473 only trusts paths under profiles/<name>, preserving the active_profile behavior introduced by a33c63b9f880 for systemd/root-home deployments.
  • A launcher that needs an inherited home without active-profile redirection can use the existing profile-shaped .../profiles/<name> HERMES_HOME contract. Any broader launcher integration should be proposed as a focused configuration/launcher design rather than a new public HERMES_* switch.

This is a design-direction decision, not a judgment on the test coverage or implementation quality.


Closed as not-planned per standing maintainer policy (env-var-for-config). This is a design-direction decision, not a code-quality judgment — see the Contribution Rubric in AGENTS.md for what the project is looking for. If you believe this policy was misapplied to your change, comment here and a maintainer will take a look.

@teknium1 teknium1 closed this Jul 13, 2026
@teknium1 teknium1 added the sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants