Repository navigation
Conversation
Align Hermes _bm_config_path with bm resolve_data_dir, and prefer
which("bm") before ~/.local/bin/bm so stale uv-tool binaries lose.
Fixes basicmachines-co#1783
Signed-off-by: MbappeWU <MbappeWU@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
Author
|
@CLAassistant check |
|
|
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
Hermes
_bm_config_path()always read~/.basic-memory/config.json, ignoringBASIC_MEMORY_CONFIG_DIRandXDG_CONFIG_HOMEthatbmitself honors viaresolve_data_dir(). When a leftover legacy file existed without the Hermes project, the provider refused to initialize even though the XDG registry was correct.Also,
_bm_binary_path()preferred~/.local/bin/bmoverwhich("bm"), so a stale uv-tool binary could win.Fixes #1783
Changes
_bm_config_path()mirrorsresolve_data_dir()order:BASIC_MEMORY_CONFIG_DIR→$XDG_CONFIG_HOME/basic-memory→~/.basic-memory. Missing file stays missing._bm_binary_path()trieswhich("bm")first, then Homebrew /usr/local, then~/.local/bin/bmlast.integrations/hermes/tests/test_bm_paths.pycovering precedence, XDG-vs-legacy regression, and binary order.Test plan
uv run pytest tests/test_bm_paths.py -q(fromintegrations/hermes) → 7 passed (was 5 failed before the edit)just package-check-hermes→ 300 passed, 13 skipped (skips areBM_INTEGRATION=1)Notes
Logic is intentionally duplicated in the Hermes plugin module because it loads standalone and cannot import
resolve_data_dirfrom the installed package path reliably.