feat(gateway): real FreeBSD rc.d detection in get_gateway_runtime_snapshot #7

Merged
clawdie merged 1 commit from feat/gateway-freebsd-rcd-detection into main 2026-06-21 11:44:21 +02:00
Owner

Deeper fix behind PR #6. get_gateway_runtime_snapshot() only had systemd/launchd branches, so on FreeBSD it fell through to manager="manual process"hermes status couldn't report the real gateway state.

  • is_freebsd() helper.
  • _probe_freebsd_service_running() — probes the hermes_daemon rc.d service via service hermes_daemon onestatus (reports running regardless of rcvar enable; works without root; fail-safe), mirroring the launchd probe.
  • snapshot branch: manager="rc.d (hermes_daemon)", service_installed (rc.d file present), service_running (onestatus), service_scope="rc.d".

Now hermes status reports installed/running on FreeBSD via the primary path (line 484), not just the fallback string.

Not in scope: get_managed_gateway_pids() restart-drain (systemd/launchd only) — liveness already works via find_gateway_pids(); rc.d restart-drain is a separate follow-up.

py_compile clean; wiring + branch ordering verified. (Runtime-verify on a FreeBSD host.)

🤖 Generated with Claude Code

Deeper fix behind PR #6. `get_gateway_runtime_snapshot()` only had systemd/launchd branches, so on FreeBSD it fell through to `manager="manual process"` — `hermes status` couldn't report the real gateway state. - **`is_freebsd()`** helper. - **`_probe_freebsd_service_running()`** — probes the `hermes_daemon` rc.d service via `service hermes_daemon onestatus` (reports running regardless of rcvar enable; works without root; fail-safe), mirroring the launchd probe. - **snapshot branch:** `manager="rc.d (hermes_daemon)"`, `service_installed` (rc.d file present), `service_running` (onestatus), `service_scope="rc.d"`. Now `hermes status` reports installed/running on FreeBSD via the primary path (line 484), not just the fallback string. Not in scope: `get_managed_gateway_pids()` restart-drain (systemd/launchd only) — liveness already works via `find_gateway_pids()`; rc.d restart-drain is a separate follow-up. `py_compile` clean; wiring + branch ordering verified. (Runtime-verify on a FreeBSD host.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
clawdie added 1 commit 2026-06-21 11:06:19 +02:00
feat(gateway): real FreeBSD rc.d detection in get_gateway_runtime_snapshot
Some checks failed
Docker Build and Publish / build-amd64 (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Docker Build and Publish / build-arm64 (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Docker Build and Publish / merge (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
4e7a55704d
`hermes status` reported the gateway as "manual process" on FreeBSD because
get_gateway_runtime_snapshot() only had systemd/launchd branches and fell
through. Add a proper FreeBSD rc.d path so status reports real state:

- is_freebsd() helper (sys.platform.startswith("freebsd")).
- _freebsd_rcd_service_path() + _probe_freebsd_service_running() — probes the
  hermes_daemon rc.d service via `service hermes_daemon onestatus` (reports
  running regardless of the rcvar enable flag; works without root; fail-safe on
  timeout/missing binary), mirroring the launchd probe.
- snapshot branch: manager="rc.d (hermes_daemon)", service_installed (rc.d file
  present), service_running (onestatus), service_scope="rc.d".

This is the deeper fix behind the status.py fallback message (PR #6). Not changed:
get_managed_gateway_pids() restart-drain path (systemd/launchd only) — gateway
liveness already works via find_gateway_pids(); rc.d restart-drain is a separate
follow-up.

py_compile clean; wiring + branch-ordering verified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
clawdie merged commit 83830b6dcc into main 2026-06-21 11:44:21 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: clawdie/hermes-bsd#7
No description provided.