Skip to content

fix: align profile gateway status with runtime snapshot - #51285

Closed
chenojay95-prog wants to merge 1 commit into
NousResearch:mainfrom
chenojay95-prog:fix/profile-gateway-status-surface
Closed

fix: align profile gateway status with runtime snapshot#51285
chenojay95-prog wants to merge 1 commit into
NousResearch:mainfrom
chenojay95-prog:fix/profile-gateway-status-surface

Conversation

@chenojay95-prog

Copy link
Copy Markdown

Summary

  • keep the existing <profile>/gateway.pid check for hermes profile list/show
  • fall back to the unified gateway runtime snapshot when no PID file is present
  • scope the fallback with Hermes' context-local HERMES_HOME override so each profile checks its own supervisor/process lane without mutating global environment

Why

A launchd-supervised gateway can be live without a compatibility gateway.pid file. In that state hermes gateway status and hermes status --all correctly report the gateway as running, while hermes profile list/show reports it as stopped.

Tests

  • pytest tests/hermes_cli/test_profiles.py -q → 139 passed
  • git diff --check → clean
  • Live macOS check: hermes profile list and hermes profile show default now report Gateway: running while hermes status --all reports launchd running.

Full-suite note

Attempted python -m pytest tests/ -o 'addopts=' -q; local run timed out after 600s around 28% with many unrelated failures/logging errors before completion. Targeted profile tests pass on fresh origin/main base.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jun 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #20488 — same profile gateway-status fix: fall back to the unified gateway runtime snapshot (scoped with the context-local HERMES_HOME override) when no <profile>/gateway.pid file is present, so hermes profile list/show agrees with hermes gateway status for service/launchd-supervised gateways. #20488 is the earlier open PR with the same mechanism; flagging so a maintainer can pick one.

@chenojay95-prog

Copy link
Copy Markdown
Author

Follow-up after the duplicate marker: #20488 covers the same bug class, but it currently has requested changes and a failing test check. This PR is rebased on current main, uses Hermes' context-local home override instead of mutating os.environ, and the targeted profile test file passes locally (139 passed). Happy for maintainers to pick either lane; leaving this open as the current-main clean version unless you'd prefer it closed.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused profile-status fix.

Automated hermes-sweeper review found this behavior already implemented on current main by 31bced160 (fix(profiles): detect a separate-process gateway in profile status), shipped in v2026.7.1.

  • hermes_cli/profiles.py:699-729 preserves the gateway.pid fast path and falls back to validating that profile's gateway_state.json against the live process table.
  • gateway/status.py:917-958 rejects stopped, dead, PID-reused, and wrong-profile processes via expected_home=profile_dir.
  • tests/hermes_cli/test_profiles.py:1669-1810 covers the no-PID fallback and named-profile isolation cases.

This supersedes the same bug class discussed in #20488 without requiring a context-local home override.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants