hermes - ✅(Solved) Fix [Bug]: False positive: tinker-atropos reported as not installed by hermes doctor when using editable install in venv [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#16365Fetched 2026-04-28 06:53:49
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #16381: fix(doctor): use importlib.util.find_spec for editable-install detection

Description (problem / solution / changelog)

Closes #16365.

Problem

hermes doctor reports ⚠ tinker-atropos found but not installed even when the package is installed editably (uv pip install -e ./tinker-atropos) and importable from the same interpreter — exactly the case @rbrowning85 hit.

$ python -c "import tinker_atropos; print('OK')"
OK
$ uv pip list | grep tinker
tinker-atropos 0.1.0 (editable install)
$ hermes doctor
◆ Submodules
⚠ tinker-atropos found but not installed (run: uv pip install -e ./tinker-atropos)

Root cause: the doctor check uses __import__("tinker_atropos") inside a try/except ImportError. That probe can fail in launcher contexts (e.g. ~/.local/bin/hermes) whose sys.path or import-machinery state differs from the active shell — particularly for editable installs hooked through .pth shims — even though the spec is locatable via importlib.

Fix

Adopt the issue's preferred approach (option 2) and centralize it in a _module_available() helper:

def _module_available(module: str) -> bool:
    import importlib.util
    try:
        return importlib.util.find_spec(module) is not None
    except (ImportError, ValueError):
        return False

find_spec only checks importability — never executes the module body — so it's:

  • Reliable for editable installs across launcher contexts.
  • Side-effect free.
  • Robust to a transitive dep failing to import (we only care whether tinker_atropos itself is locatable).
  • Defensive against ValueError from malformed spec strings and ImportError from a parent package failing to load.

Then swap the __import__ probe in the tinker-atropos branch (hermes_cli/doctor.py) for _module_available("tinker_atropos").

I deliberately scoped this to the tinker-atropos check rather than the general required_packages / optional_packages loops, since those check user-facing third-party libs where the existing import-with-side-effects probe is fine and the install-cmd advice is the goal anyway. Happy to broaden if maintainers prefer.

Tests

tests/hermes_cli/test_doctor.py::TestModuleAvailable — 5 new tests:

  • test_returns_true_for_stdlib_module — sanity check (json).
  • test_returns_false_for_missing_module — non-existent module returns False.
  • test_returns_false_on_value_error — malformed spec swallowed.
  • test_returns_false_when_parent_package_fails — parent-package ImportError swallowed.
  • test_does_not_execute_module_body — confirms find_spec path doesn't import the body, the property that fixes the editable-install case.
pytest tests/hermes_cli/test_doctor.py -q
28 passed (23 pre-existing + 5 new)

Changed files

  • hermes_cli/doctor.py (modified, +27/-3)
  • tests/hermes_cli/test_doctor.py (modified, +48/-0)

Code Example

Relevant doctor output:

Submodules
⚠ tinker-atropos found but not installed (run: uv pip install -e ./tinker-atropos)

Verification that package is installed:

python -c "import tinker_atropos; print('tinker OK')"
# Output: tinker OK

uv pip list | grep tinker
# tinker-atropos 0.1.0 (editable install)

---

N/A — no runtime errors, only incorrect diagnostic output
RAW_BUFFERClick to expand / collapse

Bug Description

When tinker-atropos is installed in editable mode (uv pip install -e ./tinker-atropos) inside a Python virtual environment, hermes doctor incorrectly reports:

⚠ tinker-atropos found but not installed

This occurs even though:

The package is installed It is importable from Python Hermes itself is functioning normally

This appears to be a false-positive detection issue in the doctor check

Steps to Reproduce

Create and activate a Python virtual environment:

python3 -m venv ~/hermes-venv source ~/hermes-venv/bin/activate

Clone and set up Hermes:

git clone https://github.com/nousresearch/hermes-agent ~/.hermes/hermes-agent cd ~/.hermes/hermes-agent git submodule update --init --recursive

Install Hermes and tinker-atropos:

pip install -e . uv pip install -e ./tinker-atropos

Verify installation:

python -c "import tinker_atropos; print('OK')" uv pip list | grep tinker

Run doctor:

hermes doctor

Expected Behavior

hermes doctor should report:

✓ tinker-atropos (RL training backend)

Actual Behavior

hermes doctor reports:

⚠ tinker-atropos found but not installed (run: uv pip install -e ./tinker-atropos)

Despite the package being installed and importable.

Affected Component

Other

Messaging Platform (if gateway-related)

No response

Debug Report

Relevant doctor output:

◆ Submodules
⚠ tinker-atropos found but not installed (run: uv pip install -e ./tinker-atropos)

Verification that package is installed:

python -c "import tinker_atropos; print('tinker OK')"
# Output: tinker OK

uv pip list | grep tinker
# tinker-atropos 0.1.0 (editable install)

Operating System

WSL2 (Ubuntu 24.04)

Python Version

Python 3.11.15 (virtual environment)

Hermes Version

Latest (installed from main branch via editable install)

Additional Logs / Traceback (optional)

N/A — no runtime errors, only incorrect diagnostic output

Root Cause Analysis (optional)

The doctor check uses:

import("tinker_atropos")

Possible causes of mismatch:

Editable installs (-e) not consistently detected CLI entrypoint (~/.local/bin/hermes) using a different interpreter context than active shell Subtle sys.path differences between shell and CLI execution

This results in a false ImportError condition during doctor execution, even though the module is available.

Proposed Fix (optional)

Replace import check with a more robust detection method:

Option 1 (preferred):

from importlib.metadata import version, PackageNotFoundError

try: version("tinker-atropos") check_ok(...) except PackageNotFoundError: check_warn(...)

Option 2:

import importlib.util

if importlib.util.find_spec("tinker_atropos") is not None: check_ok(...) else: check_warn(...)

This would properly support:

Editable installs (-e) Different execution contexts Standard Python packaging behavior

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The issue can be resolved by replacing the import check in the doctor script with a more robust detection method that supports editable installs and different execution contexts.

Guidance

  • Verify that the tinker-atropos package is correctly installed and importable in the Python virtual environment using python -c "import tinker_atropos; print('OK')" and uv pip list | grep tinker.
  • Consider replacing the import check with a more robust detection method, such as using importlib.metadata.version or importlib.util.find_spec, to properly support editable installs and different execution contexts.
  • Test the proposed fix by running hermes doctor after implementing the new detection method to ensure it correctly reports the installation status of tinker-atropos.
  • If unsure about implementing the fix, consider seeking guidance from the Hermes development team or waiting for an official patch.

Example

from importlib.metadata import version, PackageNotFoundError

try:
    version("tinker-atropos")
    print("tinker-atropos is installed")
except PackageNotFoundError:
    print("tinker-atropos is not installed")

Notes

The proposed fix assumes that the issue is caused by the import check in the doctor script not correctly handling editable installs. If the issue persists after implementing the new detection method, further debugging may be necessary to identify the root cause.

Recommendation

Apply workaround: Replace the import check with a more robust detection method, such as using importlib.metadata.version or importlib.util.find_spec, to properly support editable installs and different execution contexts. This should resolve the false-positive detection issue and provide a more accurate report of the tinker-atropos installation status.

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 [Bug]: False positive: tinker-atropos reported as not installed by hermes doctor when using editable install in venv [1 pull requests, 1 participants]