Skip to content

docs(hermes): explain wrapper Python compatibility - #632

Merged
dplush merged 1 commit into
mnemosyne-oss:mainfrom
dplush:docs/hermes-wrapper-python-compatibility
Aug 5, 2026
Merged

dplush merged 1 commit into
mnemosyne-oss:mainfrom
dplush:docs/hermes-wrapper-python-compatibility

Conversation

@dplush

@dplush dplush commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Documents the runtime-Python compatibility contract introduced by #630 for persistent Hermes wrappers.

  • Requires the wrapper side venv to match the Hermes gateway Python major/minor.
  • Replaces the unsafe unqualified python3 Docker example with a bounded launcher-sibling discovery path that fails rather than guessing.
  • Documents recovery for mismatched or unreadable venv metadata, including safe --force use.
  • Separates Docker/Compose deployment restart from local installed-gateway restart and carries named-profile scope through validation.

Scope

Documentation only: docs/hermes-integration.md and UPDATING.md. No runtime, installer, dependency, schema, or release-version changes.

Verification

  • python3 scripts/generate-docs.py --check
  • python3 scripts/verify-docs.py
  • Shell syntax checks for the changed examples
  • git diff --check
  • Independent documentation review on the final draft

Summary

  • Documents the Python major/minor compatibility contract for persistent Hermes wrapper environments.
  • Adds bounded interpreter discovery, compatibility validation, recovery steps, and deployment-specific restart guidance.
  • Preserves named-profile validation and distinguishes wrapper repairs from intentional symlink migration.
  • Changes only docs/hermes-integration.md and UPDATING.md.
  • Does not change runtime behavior, memory architecture, privacy posture, sync behavior, schemas, dependencies, or release behavior.
  • Hermes remains the only affected integration surface. MCP and CLI behavior remain unchanged.
  • The launcher-sibling discovery guidance is the right call for local-first reliability because it avoids guessing an unqualified python3 executable.
  • The PR does not alter working, episodic, or BEAM memory tiers, retrieval, consolidation, veracity, or benchmark methodology.
  • The documentation improves long-term maintainability by defining safe compatibility repair and restart procedures.

@dplush
dplush requested a review from AxDSan as a code owner August 5, 2026 16:34
@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Hermes documentation adds launcher-based Python discovery, interpreter validation, persistent side-venv setup, wrapper refresh, compatibility recovery, deployment-specific restart guidance, and profile-scoped validation.

Changes

Hermes wrapper setup and recovery

Layer / File(s) Summary
Interpreter discovery and side-venv setup
UPDATING.md, docs/hermes-integration.md
The guides resolve and validate the Hermes interpreter, create the side venv with that interpreter, install the selected profile, and document wrapper-specific setup.
Compatibility repair and wrapper refresh
UPDATING.md, docs/hermes-integration.md
The guides document interpreter checks, guarded venv recreation, profile validation, forced wrapper refresh, and status checks.
Deployment restart and validation
UPDATING.md, docs/hermes-integration.md
The guides distinguish Docker, Compose, and local gateway restarts and clarify that symlink migration is a separate intentional mode change.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: axdsan

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the documentation change for Hermes wrapper Python compatibility.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@UPDATING.md`:
- Around line 53-67: Update both launcher snippets so each required command
fails closed: add explicit exit-on-failure handling after the readlink-based
HERMES_BIN resolution and after the HERMES_PYTHON --version probe, using the
existing HERMES_BIN/HERMES_PYTHON flow as the anchor. In UPDATING.md#L53-L67 and
docs/hermes-integration.md#L53-L67, stop immediately on either failure so
dirname never runs on an unresolved path and later venv creation never uses an
unverified interpreter.
- Around line 96-102: Update the recovery block in the updating workflow so it
explicitly assigns HERMES_HOME and MNEMOSYNE_DATA_DIR before creating the new
venv, instead of only mentioning them in a comment. Keep the existing venv
creation and mnemosyne-hermes install/status steps unchanged, but make sure the
symbols HERMES_HOME, MNEMOSYNE_DATA_DIR, VENV, and the mnemosyne-hermes install
path all operate against the intended deployment/profile in a fresh shell.
- Around line 90-100: Update the installation examples so every pip command uses
the selected memory profile instead of hardcoding mnemosyne-memory[embeddings];
in UPDATING.md#L90-L100 adjust the recovery venv install to match the profile
chosen in the surrounding prose, and in docs/hermes-integration.md#L70-L76 and
docs/hermes-integration.md#L93-L100 make the initial Docker install and
compatibility-repair install commands use the same parameterized profile value.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1a6f6505-dc5f-400e-a33c-6b0fefd1d924

📥 Commits

Reviewing files that changed from the base of the PR and between 2864396 and d7b10c6.

📒 Files selected for processing (2)
  • UPDATING.md
  • docs/hermes-integration.md

Comment thread UPDATING.md Outdated
Comment thread UPDATING.md Outdated
Comment thread UPDATING.md
@dplush
dplush force-pushed the docs/hermes-wrapper-python-compatibility branch from d7b10c6 to 1bde83d Compare August 5, 2026 16:53
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/hermes-integration.md`:
- Around line 104-117: Add explicit exports for HERMES_HOME, MNEMOSYNE_DATA_DIR,
and the selected profile within the recovery command block before creating the
venv or installing packages, using the documented /opt/data deployment paths and
preserving any intended profile override. Ensure the commands using VENV and
mnemosyne-hermes operate against those explicitly configured paths in a fresh
shell.
- Around line 80-87: Update the documented package-selection logic in
docs/hermes-integration.md lines 80-87 and 113-115, and UPDATING.md lines
103-121, so every wrapper installation path maps core to mnemosyne-memory,
embeddings to mnemosyne-memory[embeddings], and all to mnemosyne-memory[all].
Apply the mapping consistently to the initial Docker install, wrapper
compatibility recovery, and updating-guide recovery command without adding an
extra or invalid profile suffix.
- Around line 112-116: The recovery snippets must reject an existing side-venv
directory before creating it. In docs/hermes-integration.md lines 112-116 and
UPDATING.md lines 118-122, add a fail-closed existence check immediately before
the "$HERMES_PYTHON" -m venv "$VENV" command, emit an error describing the
existing path, and exit without overwriting it.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3dca609e-85d1-4bea-bd88-816a7c67e3e0

📥 Commits

Reviewing files that changed from the base of the PR and between 2864396 and 1bde83d.

📒 Files selected for processing (2)
  • UPDATING.md
  • docs/hermes-integration.md

Comment thread docs/hermes-integration.md Outdated
Comment thread docs/hermes-integration.md Outdated
Comment thread docs/hermes-integration.md
@dplush
dplush force-pushed the docs/hermes-wrapper-python-compatibility branch from 1bde83d to a13e186 Compare August 5, 2026 17:13
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/hermes-integration.md`:
- Around line 82-105: Make every documented setup sequence fail closed: in
docs/hermes-integration.md lines 82-105, stop on failures from venv creation,
package installation, or mnemosyne-hermes install before running status or
hermes config set; in docs/hermes-integration.md lines 143-146, stop before
force-replacing the plugin if recovery installation fails; in UPDATING.md lines
84-88, only interpret status as a successful refresh after the preceding command
succeeds; and in UPDATING.md lines 136-139, do not force-register the recovery
environment unless its creation completed successfully.

In `@UPDATING.md`:
- Around line 123-126: Preserve the existing MNEMOSYNE_PROFILE during recovery
before deriving MNEMOSYNE_REQUIREMENT: in UPDATING.md lines 123-126, require or
restore the deployed profile instead of allowing the fresh-shell embeddings
default; apply the same profile restoration before creating the replacement
virtual environment in docs/hermes-integration.md lines 130-133. Ensure
deployments using all retain their local-LLM dependencies.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fedc59ce-7917-43a4-a22a-7b3298ef1374

📥 Commits

Reviewing files that changed from the base of the PR and between 2864396 and a13e186.

📒 Files selected for processing (2)
  • UPDATING.md
  • docs/hermes-integration.md

Comment thread docs/hermes-integration.md
Comment thread UPDATING.md Outdated
@dplush
dplush force-pushed the docs/hermes-wrapper-python-compatibility branch from a13e186 to 13f483e Compare August 5, 2026 17:32
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/hermes-integration.md`:
- Around line 44-46: Update the Docker and launcher installation guidance near
the interpreter-selection instructions to state that Mnemosyne storage,
indexing, and retrieval use in-process SQLite, and that network access occurs
only through explicitly configured services. Keep the statement aligned with the
local-first architecture, or link directly to the authoritative architecture
documentation.
- Around line 175-178: Scope MNEMOSYNE_DATA_DIR to the selected profile’s data
root alongside HERMES_HOME before the profile-local wrapper install and status
commands in docs/hermes-integration.md (lines 175-178). Apply the same
data-directory scoping requirement to the profile-local refresh and status
commands in UPDATING.md (lines 165-169), keeping wrapper setup and memory data
isolated per profile.
- Around line 175-178: Update the profile-local shell example around the
mnemosyne-hermes install and status commands to define VENV as the tested
compatible side virtual environment before use, or add validation that exits
when VENV is unset; ensure both commands cannot silently expand to system paths.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7795083c-07ce-4f48-bdfe-379e9ce9f332

📥 Commits

Reviewing files that changed from the base of the PR and between 2864396 and 13f483e.

📒 Files selected for processing (2)
  • UPDATING.md
  • docs/hermes-integration.md

Comment thread docs/hermes-integration.md
Comment thread docs/hermes-integration.md
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

1 similar comment
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@dplush
dplush merged commit aa3d310 into mnemosyne-oss:main Aug 5, 2026
9 checks passed
ether-btc added a commit to ether-btc/mnemosyne that referenced this pull request Aug 7, 2026
…python-compatibility

docs(hermes): explain wrapper Python compatibility
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.

1 participant