Skip to content

fix: report cronjob tool as available in hermes doctor - #895

Closed
stablegenius49 wants to merge 1 commit into
NousResearch:mainfrom
stablegenius49:pr-factory/issue-878-doctor-cronjob
Closed

fix: report cronjob tool as available in hermes doctor#895
stablegenius49 wants to merge 1 commit into
NousResearch:mainfrom
stablegenius49:pr-factory/issue-878-doctor-cronjob

Conversation

@stablegenius49

Copy link
Copy Markdown
Contributor

Summary

  • set HERMES_INTERACTIVE=1 when running hermes doctor so CLI-gated tool checks run in the same context as the interactive CLI
  • keep cronjob tool availability from being misreported as a missing system dependency
  • add a regression test for doctor's tool-availability path

Testing

  • pytest -q tests/hermes_cli/test_doctor.py

Fixes #878

teknium1 pushed a commit that referenced this pull request Mar 13, 2026
Set HERMES_INTERACTIVE=1 when running hermes doctor so CLI-gated
tool checks (like cronjob management) see the same context as the
interactive CLI. Uses setdefault to avoid overriding existing values.

Cherry-picked from PR #895 by stablegenius49, rebased onto current
main with conflict resolution.

Fixes #878

Co-authored-by: stablegenius49 <stablegenius49@users.noreply.github.com>
teknium1 added a commit that referenced this pull request Mar 13, 2026
Set HERMES_INTERACTIVE=1 via setdefault in run_doctor() so CLI-gated
tool checks (like cronjob) see the same context as the interactive CLI.

Cherry-picked from PR #895 by @stablegenius49.

Fixes #878

Co-authored-by: stablegenius49 <stablegenius49@users.noreply.github.com>
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #1180! Your fix was cherry-picked with authorship preserved onto current main (PR was 233 commits behind, required conflict resolution in the test file due to new honcho tests added since).

The approach is clean — setdefault is the right call, and the test properly validates the env var is set before tool checks run. Thanks for the contribution! 🎉

@teknium1 teknium1 closed this Mar 13, 2026
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
Set HERMES_INTERACTIVE=1 via setdefault in run_doctor() so CLI-gated
tool checks (like cronjob) see the same context as the interactive CLI.

Cherry-picked from PR NousResearch#895 by @stablegenius49.

Fixes NousResearch#878

Co-authored-by: stablegenius49 <stablegenius49@users.noreply.github.com>
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 28, 2026
Set HERMES_INTERACTIVE=1 when running hermes doctor so CLI-gated
tool checks (like cronjob management) see the same context as the
interactive CLI. Uses setdefault to avoid overriding existing values.

Cherry-picked from PR NousResearch#895 by stablegenius49, rebased onto current
main with conflict resolution.

Fixes NousResearch#878

Co-authored-by: stablegenius49 <stablegenius49@users.noreply.github.com>
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
Set HERMES_INTERACTIVE=1 via setdefault in run_doctor() so CLI-gated
tool checks (like cronjob) see the same context as the interactive CLI.

Cherry-picked from PR NousResearch#895 by @stablegenius49.

Fixes NousResearch#878

Co-authored-by: stablegenius49 <stablegenius49@users.noreply.github.com>
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
Set HERMES_INTERACTIVE=1 via setdefault in run_doctor() so CLI-gated
tool checks (like cronjob) see the same context as the interactive CLI.

Cherry-picked from PR NousResearch#895 by @stablegenius49.

Fixes NousResearch#878

Co-authored-by: stablegenius49 <stablegenius49@users.noreply.github.com>
SSC-ENG added a commit to SSC-Engineering/hermes-agent that referenced this pull request Aug 7, 2026
…only (t_edd7abd5) (#29)

check_respawn_guard() step 4 previously froze a task's respawn for
_RESPAWN_GUARD_PR_WINDOW seconds on the mere PRESENCE of any GitHub PR
URL in a recent comment, regardless of whether that PR was still open.
Observed live: t_771d2af9 (/overwatch dashboard work) was guarded
'active_pr' on three consecutive dispatch ticks even though every
overwatch PR (NousResearch#888/NousResearch#889/NousResearch#890/NousResearch#895/NousResearch#898) was already MERGED — the URLs
were merely cited as context in orchestrator comments. This converted
"someone mentioned a PR link" into an involuntary dispatch freeze that
got worse the more productive a lane was.

Fix: resolve each cited PR's live state via `gh api
repos/<owner>/<repo>/pulls/<n> --jq .state` (reusing existing gh
auth), cached in-process for 5 minutes. state=open holds the guard;
state=closed (covers both closed and merged) clears it immediately.
Unresolvable state (gh missing/unauthenticated/network error/malformed
response) fails CLOSED exactly as the old text-only guard did -- this
makes the guard smarter about clearing, never more permissive about
holding when nothing can be verified. Citation identity (worker vs.
orchestrator vs. reviewer) is irrelevant; only live PR state decides.

Layers on top of the fork's existing 1h window + code-task scoping
(HAA 2026-07-29 option B) without reverting either.

Tests: merged/closed PR URL does not guard; open PR URL does guard;
PR URL cited by a non-worker author does not guard once merged;
unresolvable state fails closed; gh api output parsing
(open/closed/unparseable); in-process cache TTL behavior; full
existing respawn-guard suite (comment-ordering, requeue-bypass,
code-task scoping) re-verified green with the new state check patched
to a fixed value. 262 tests passed via scripts/run_tests.sh
(per-file isolated runner matching CI). ruff clean.

Same defect class as the dependency-block cooldown defect (t_360d58da):
a respawn guard recomputing a hold from stale/derived signals instead
of the live, authoritative state of the thing it's guarding against.

Co-authored-by: SSC-ENG <225143396+SSC-ENG@users.noreply.github.com>
nepenth pushed a commit to nepenth/hermes-agent that referenced this pull request Aug 7, 2026
Set HERMES_INTERACTIVE=1 when running hermes doctor so CLI-gated
tool checks (like cronjob management) see the same context as the
interactive CLI. Uses setdefault to avoid overriding existing values.

Cherry-picked from PR NousResearch#895 by stablegenius49, rebased onto current
main with conflict resolution.

Fixes NousResearch#878

Co-authored-by: stablegenius49 <stablegenius49@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: hermes doctor always reports the cronjob tool as "(system dependency not met)"

3 participants