fix(doctor): cronjob always shows 'system dependency not met' - #884
Closed
ygd58 wants to merge 1 commit into
Closed
Conversation
ygd58
force-pushed
the
fix/doctor-cronjob-false-system-dependency
branch
from
March 11, 2026 01:07
ee150de to
8790ba8
Compare
1 task
ygd58
force-pushed
the
fix/doctor-cronjob-false-system-dependency
branch
from
March 11, 2026 09:38
8790ba8 to
78b1b71
Compare
19 tasks
Tools that gate on runtime mode (e.g. cronjob) check for env vars like HERMES_INTERACTIVE that are only set when the CLI is running normally. During 'hermes doctor' these vars are absent, so cronjob always showed '(system dependency not met)' even on fully working installations. Fix: temporarily set HERMES_INTERACTIVE=1 for the duration of the check_tool_availability() call, then restore the original env state. This reflects the actual runtime context under which the tools operate. Fixes NousResearch#878
ygd58
force-pushed
the
fix/doctor-cronjob-false-system-dependency
branch
from
March 12, 2026 13:01
78b1b71 to
c26ab61
Compare
Contributor
Author
|
Both #884 and #895 use the same
Happy to close in favour of #895 if preferred just flagging the test coverage difference. |
Contributor
Author
|
Closing — this fix was independently implemented in upstream main (hermes_cli/doctor.py line 102). The approach is identical: |
1 task
6 tasks
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.
Summary
Fixes #878
hermes doctoralways showed⚠ cronjob (system dependency not met)even on fully working installations.Root Cause
check_cronjob_requirements()gates onHERMES_INTERACTIVE(and two other env vars) that are set by the CLI at startup — buthermes doctornever sets them. So the check always returnsFalse.The env-var gate is correct for runtime: cronjob tools only make sense in an interactive or gateway session. The bug is that the doctor check runs without that context.
Fix
Temporarily set
HERMES_INTERACTIVE=1for the duration ofcheck_tool_availability()in doctor, then restore the original env state. One line of change in the right place — no changes to the tool's own logic.This is safer than modifying
check_cronjob_requirements()itself, which would affect runtime gating behavior.Before: