Skip to content

fix(mem0): preserve compatible installed releases - #99557

Closed
nateEc wants to merge 1 commit into
NousResearch:mainfrom
nateEc:codex/fix-mem0-lazy-downgrade
Closed

nateEc wants to merge 1 commit into
NousResearch:mainfrom
nateEc:codex/fix-mem0-lazy-downgrade

Conversation

@nateEc

@nateEc nateEc commented Aug 31, 2026

Copy link
Copy Markdown

Fixes #99317.

Summary:

  • Align the Mem0 extra and lazy installer with the plugin's supported mem0ai>=2.0.10,<3 range.
  • Prevent startup from reinstalling a compatible newer Mem0 release as 2.0.10.
  • Add regression coverage for a newer installed release and metadata alignment.

Tests:

  • scripts/run_tests.sh tests/tools/test_lazy_deps.py tests/plugins/memory/test_memory_lazy_install.py tests/test_project_metadata.py -q
  • uv lock --check

@nateEc
nateEc requested a review from a team August 31, 2026 16:22
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers labels Aug 31, 2026
@Enough1122

Copy link
Copy Markdown

AI code review — automated review for reference; please use your judgment.

Clean relaxation of the mem0 pin: pyproject.toml optional extra and the LAZY_DEPS entry move in lockstep to mem0ai>=2.0.10,<3 (tools/lazy_deps.py:67), and a dedicated enforcement test (tests/test_project_metadata.py:156-159) replaces the exact-pin expectation for mem0, so the two specs can't drift. The new test_mem0_compatible_newer_release_is_satisfied confirms an installed 2.0.19 satisfies the range and won't be downgraded by a redundant lazy reinstall.

Non-blocking: the <3 cap trusts that mem0 keeps semver discipline within the 2.x line; given mem0ai's history of breaking minor releases, a narrower <2.1 ceiling might be safer, but <3 matches the stated policy intent and is easily tightened.

Verdict: LGTM

@nateEc
nateEc force-pushed the codex/fix-mem0-lazy-downgrade branch from c8051de to c14b664 Compare September 4, 2026 02:32
Use the declared Mem0 compatibility range in the lazy installer and optional extra.

Keep a compatible newer mem0ai release from triggering a downgrade during provider startup.

Refresh uv.lock so the optional dependency metadata matches pyproject.toml.

Tests: python -m pytest tests/tools/test_lazy_deps.py tests/plugins/memory/test_memory_lazy_install.py tests/test_project_metadata.py tests/test_packaging_metadata.py -q; uv lock --check.
@nateEc
nateEc force-pushed the codex/fix-mem0-lazy-downgrade branch from c14b664 to b763deb Compare September 7, 2026 03:56
teknium1 added a commit that referenced this pull request Sep 22, 2026
…mes list-typed files and reads hooks:

- hindsight-client==0.6.1 / mem0ai==2.0.10 exact pins made _is_satisfied() reject every newer
  compatible release, so hermes update kept downgrading a working client and broke embedded
  daemons whose DB a newer client had migrated (#86992, #39424, #98407, #99317). The lazy entries
  now mirror the plugin manifests (>=0.6.1,<1 and >=2.0.10,<3); pyproject extras stay the floor
  install. Slim redo of #99557 (nateEc) / #98416 / #98527 (ttomiczek) / #39754.
- A list-typed plugin.yaml is refused with "top level must be a mapping" instead of an
  AttributeError swallowed as "Failed to parse" (#14066, discovery side).
- ``hooks:`` (the spelling bundled manifests carried) still populates provides_hooks (#108371).
teknium1 added a commit that referenced this pull request Sep 22, 2026
…mes list-typed files and reads hooks:

- hindsight-client==0.6.1 / mem0ai==2.0.10 exact pins made _is_satisfied() reject every newer
  compatible release, so hermes update kept downgrading a working client and broke embedded
  daemons whose DB a newer client had migrated (#86992, #39424, #98407, #99317). The lazy entries
  now mirror the plugin manifests (>=0.6.1,<1 and >=2.0.10,<3); pyproject extras stay the floor
  install. Slim redo of #99557 (nateEc) / #98416 / #98527 (ttomiczek) / #39754.
- A list-typed plugin.yaml is refused with "top level must be a mapping" instead of an
  AttributeError swallowed as "Failed to parse" (#14066, discovery side).
- ``hooks:`` (the spelling bundled manifests carried) still populates provides_hooks (#108371).
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks @nateEc — the range-pin direction (mem0ai>=2.0.10,<3) landed as a slim redo in tools/lazy_deps.py; pyproject extras stay the floor install so the exact-pin cross-check keeps its meaning.

Superseded by #118841 (merge 74f726c), which credits this PR. Closing.

@teknium1 teknium1 closed this Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Mem0 lazy installer downgrades newer compatible mem0ai releases

4 participants