hermes - ✅(Solved) Fix Add CLI-level regression coverage for shared-lock cron status [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#18631Fetched 2026-05-03 04:55:20
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Error Message

  • Assert the output does not warn that jobs will not fire when a shared runtime lock owner is active.

Fix Action

Fixed

PR fix notes

PR #18634: fix(cron): report shared gateway runtime owner

Description (problem / solution / changelog)

Summary

  • Adds container-aware gateway owner detection via gateway.status.get_gateway_owner_status().
  • Updates hermes cron status / hermes cron list so an active shared runtime lock is treated as a scheduler owner even when the gateway PID is not visible from the current namespace/container.
  • Preserves gateway PID/lock metadata when a shared runtime lock is active but local PID inspection fails.
  • Adds regression tests, troubleshooting docs, an ADR, implementation plan, and devlog.

Test plan

  • RED: python -m pytest tests/hermes_cli/test_cron.py tests/hermes_cli/test_gateway_runtime_health.py -q failed before production changes because get_gateway_owner_status did not exist. Evidence: /work/.hermes-data/tdd-evidence/2026-05-01-cron-health-red.txt
  • GREEN/relevant regression: python -m pytest tests/hermes_cli/test_cron.py tests/hermes_cli/test_gateway_runtime_health.py tests/hermes_cli/test_gateway.py -q — 34 passed. Evidence: /work/.hermes-data/tdd-evidence/2026-05-01-cron-health-green-regression-final2.txt
  • python -m py_compile gateway/status.py hermes_cli/cron.py
  • python /work/.hermes-data/skills/software-development/requesting-code-review/scripts/static_scan_diff.py --unstagedSTATIC_SCAN_PASS True
  • Final guard passed with HERMES_TDD_EVIDENCE populated.

Review

  • Independent delegate review passed with no security concerns or logic errors.
  • Reviewer suggestions for metadata preservation and branch coverage were addressed with additional tests.

Follow-ups filed

Notes

A broader adjacent regression including tests/hermes_cli/test_gateway_service.py had 130 passing tests and 7 failures in environment-sensitive systemd/root paths outside this branch's touched code. Those failures are tracked in #18630.

Changed files

  • .devlogs/2026-05-01-cron-container-health.md (added, +85/-0)
  • .hermes/plans/2026-05-01-cron-container-health.md (added, +79/-0)
  • docs/adr/2026-05-01-container-aware-cron-health.md (added, +46/-0)
  • gateway/status.py (modified, +79/-4)
  • hermes_cli/cron.py (modified, +43/-19)
  • tests/hermes_cli/test_cron.py (modified, +35/-0)
  • tests/hermes_cli/test_gateway_runtime_health.py (modified, +103/-0)
  • website/docs/guides/cron-troubleshooting.md (modified, +23/-0)
RAW_BUFFERClick to expand / collapse

Problem / Opportunity

The container-aware cron health change adds unit-level coverage for cron status / cron list behavior under a shared gateway runtime lock. A subprocess-style CLI regression would better lock the operator-facing UX and catch future drift in command wiring, import paths, argument parsing, or terminal output formatting.

Goal

Add end-to-end CLI coverage for shared-lock cron diagnostics so the user-visible hermes cron status output remains accurate in container/shared-HERMES_HOME deployments.

Proposed Scope

  • Add a subprocess or existing CLI-harness test for hermes cron status with a temporary HERMES_HOME / cron state and simulated active gateway runtime lock.
  • Assert the output does not warn that jobs will not fire when a shared runtime lock owner is active.
  • Assert the output explains that the gateway owner may be in another namespace/container.
  • If the repo has a preferred CLI test harness, use that instead of inventing a new harness.

Acceptance Criteria

  • A CLI-level test fails if hermes cron status regresses to local-PID-only detection.
  • The test is isolated from the developer's real HERMES_HOME and does not start a real gateway or messaging platform poller.
  • The test complements, not replaces, the existing unit-level status tests.

extent analysis

TL;DR

Add a subprocess-style CLI test for hermes cron status to ensure accurate output under a shared gateway runtime lock.

Guidance

  • Identify the preferred CLI test harness in the repository to use for the new test.
  • Create a test that simulates a shared runtime lock owner in another namespace/container and verifies the output of hermes cron status does not warn about jobs not firing.
  • Ensure the test is isolated from the developer's real HERMES_HOME and does not start a real gateway or messaging platform poller.
  • Review existing unit-level status tests to ensure the new CLI test complements them without replacing their functionality.

Example

No code example is provided due to the lack of specific technical details in the issue.

Notes

The solution requires knowledge of the repository's existing test infrastructure and CLI harness. The test should be designed to catch regressions in command wiring, import paths, argument parsing, or terminal output formatting.

Recommendation

Apply workaround: Add a subprocess-style CLI test for hermes cron status as described, to ensure the user-visible output remains accurate in container/shared-HERMES_HOME deployments.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Add CLI-level regression coverage for shared-lock cron status [1 pull requests, 1 participants]