doctor: probe devagentic graph when skills/memory graph mode is on#18
Merged
Conversation
When DEVAGENTIC_SKILLS_GRAPH=1 or DEVAGENTIC_MEMORY_GRAPH=1, the
adapters silently fall back to file lookups on auth / network / DNS
failures (their loss-tolerant contract is correct). Operators who
opted into graph mode had no diagnostic surface to learn why
lookups weren't being consulted — `hermes doctor` made zero
DEVAGENTIC-related checks.
Add a `Devagentic Graph` section to run_doctor that sends a one-shot
`{ __typename }` probe when either flag is set, and surfaces the
specific failure kind:
auth failed → set DEVAGENTIC_API_KEY
not found → check DEVAGENTIC_BASE_URL points at graph-enabled instance
unreachable → details from URLError/OSError
USER_ID unresolved → set env or run inside a profile
reachable → 200 OK with auth + user_id
Silent when both flags are False (preserves byte-stable default for
users who never wired devagentic).
Closes #17.
This was referenced May 22, 2026
PowerCreek
added a commit
that referenced
this pull request
May 22, 2026
Auditing the gateway/cron/batch_runner surfaces for diagnostic gaps analogous to the devagentic-graph probe (#17/#18). `hermes doctor` made zero cron-related checks even when ~/.hermes/cron/ jobs.json is populated. Two signals are now surfaced (same shape as cron_status, but in the canonical "tell me what's wrong" surface): 1. Gateway PID — cron only fires when the gateway runs. When PIDs are absent and jobs are configured, doctor now fails with a pointer to `hermes gateway install`. 2. Recent failures — every job tracks last_status / last_error. Doctor warns on any job whose last_status is not in {ok, skipped, pending, ""}, and lists up to the first 5 with the failing job's name + last_run_at + truncated error. Inert when jobs.json doesn't exist or contains no jobs — the byte-stable default for users who never wired cron. Closes #26.
This was referenced May 23, 2026
PowerCreek
added a commit
that referenced
this pull request
May 23, 2026
…#39) The same urllib HTTPError + URLError + OSError + TimeoutError dispatch repeats in three sites after #15/#18/#20: plugins/devagentic-canvas/client.py:_request plugins/devagentic-docs/client.py:_post_graphql hermes_cli/doctor.py:_check_devagentic_graph Each site has the same if-401/403-elif-404-else branches over the exception and the same urllib network-error fallback. Only the message text differs per site. Add `utils.classify_http_error(exc) -> str` returning one of: HTTP_ERROR_AUTH — 401 / 403 HTTP_ERROR_NOT_FOUND — 404 HTTP_ERROR_HTTP — other HTTPError status HTTP_ERROR_UNREACHABLE — URLError / OSError / TimeoutError HTTP_ERROR_UNKNOWN — anything else Refactor the three callsites onto a single `except (URLError, OSError, TimeoutError)` (HTTPError is a URLError subclass) followed by a dispatch on the classifier output. Each site still owns its own message text — the user-facing strings are unchanged. Behavior change: none. Net diff is roughly even (helper + dispatch replaces three near-identical if/elif/else blocks). Tests: - 11 new tests in tests/test_utils_classify_http_error.py covering 401, 403, 404, generic statuses (400/422/429/500/502/503/504), URLError, OSError, TimeoutError, socket.timeout, unrelated exceptions, and the HTTPError-is-URLError subclass quirk. - All three refactored callsites' existing test suites still pass: canvas (47), docs (47), doctor devagentic-graph (6) — 112 total. Closes #38.
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
Closes #17. Audited the skills + memory adapters for the same failure-loudness gap fixed in #15. The slash-command-style loudness fix doesn't translate — their
_post_graphqlcorrectly returns silent None because callers MUST keep file fallback (per docstring contract). The right diagnostic surface ishermes doctor, which previously made zeroDEVAGENTIC-related checks.Changes
hermes_cli/doctor.py: new_check_devagentic_graph()invoked fromrun_doctor. Sends one{ __typename }probe and surfaces the specific failure kind.graph_enabled()flags are False (the byte-stable default).Output examples
Graph mode off (default):
Graph mode on, no API key set:
Graph mode on, working:
Test plan
tests/hermes_cli/test_doctor_devagentic_graph.py:pytest tests/hermes_cli/test_doctor_devagentic_graph.py→ 6 passedpytest tests/hermes_cli/test_doctor*.py→ 73 passed (no regression in existing 67 + 6 new)Filed by hermes-maintainer (PowerCreek).