Skip to content

fix: remove chromadb <0.7 upper bound — blocks 1.x installs#690

Merged
igorls merged 2 commits into
MemPalace:mainfrom
AlyciaBHZ:fix/chromadb-version-constraint
Apr 13, 2026
Merged

fix: remove chromadb <0.7 upper bound — blocks 1.x installs#690
igorls merged 2 commits into
MemPalace:mainfrom
AlyciaBHZ:fix/chromadb-version-constraint

Conversation

@AlyciaBHZ

Copy link
Copy Markdown
Contributor

Problem

pyproject.toml pins chromadb>=0.5.0,<0.7, so pip install mempalace resolves to chromadb 0.6.x. However, palaces created with chromadb 1.x (which uv.lock in this repo actually uses — 1.5.7) have an incompatible SQLite schema. chromadb 0.6.x fails with KeyError: '_type' inside CollectionConfigurationInternal.from_json_str when trying to open a 1.x collection.

This means a fresh pip install mempalace gives users a chromadb that cannot read palaces created in the maintainer's own dev environment.

Reproduction

python3 -m venv .venv && source .venv/bin/activate
pip install mempalace          # installs chromadb 0.6.3 (highest allowed by <0.7)
export MEMPALACE_PALACE_PATH=/path/to/palace-created-with-chromadb-1.x
python -c "from mempalace.mcp_server import tool_status; print(tool_status())"
# -> {"error": "No palace found", "hint": "Run: mempalace init <dir> && mempalace mine <dir>"}

pip install --force-reinstall chromadb==1.5.7
python -c "from mempalace.mcp_server import tool_status; print(tool_status())"
# -> {"total_drawers": 26524, "wings": {"omega": 10000}, ...}  (real data)

Tested on macOS 14, Python 3.12.13 and 3.14.0a6, mempalace 3.1.0.

Fix

Remove the <0.7 upper bound so pip can install chromadb 1.x. One-line change in pyproject.toml.

I considered pinning >=1.0.0 instead (since 0.6.x schemas are incompatible with 1.x anyway), but that would break users who have working 0.5/0.6 palaces. Removing only the upper bound is the least disruptive fix — users with 0.6.x palaces keep working, and users with 1.x palaces stop getting a broken install.

The current constraint `chromadb>=0.5.0,<0.7` forces pip to install
chromadb 0.6.x, but palaces created with chromadb 1.x (which is what
the mempalace dev environment actually uses — 1.5.7 per uv.lock) have
an incompatible SQLite schema. Specifically, chromadb 0.6.x fails with
`KeyError: '_type'` when opening a collection written by 1.x.

This means a fresh `pip install mempalace` gives users a chromadb
version that cannot read palaces created in the maintainer's own
environment. The fix removes the upper bound so pip can resolve to the
current stable chromadb release.

Reproduction:
  python3 -m venv .venv && source .venv/bin/activate
  pip install mempalace          # installs chromadb 0.6.3
  # Try opening a palace created with chromadb 1.x:
  # -> _get_collection() returns None, tool_status() returns "No palace found"
  pip install chromadb==1.5.7    # force upgrade
  # -> tool_status() returns real data (26k drawers in our case)

@bensig bensig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review + security audit clean.

@igorls igorls merged commit e9a706a into MemPalace:main Apr 13, 2026
6 checks passed
igorls added a commit that referenced this pull request Apr 13, 2026
PR #761 bumped pyproject.toml to 3.2.0 but missed three other version strings,
causing test_version_consistency to fail on develop CI (macos, linux 3.11, windows).

- mempalace/version.py: 3.1.0 → 3.2.0 (unblocks test_version_consistency)
- README.md: version badge shield 3.1.0 → 3.2.0
- integrations/openclaw/SKILL.md: 3.1.0 → 3.2.0
- CHANGELOG.md: rename [Unreleased] → [3.2.0] — 2026-04-13, add entries
  for #685, #690, #707, #716, #734, #755, #757, #761

Verified locally: 689/689 tests pass, ruff clean.
@igorls igorls mentioned this pull request Apr 13, 2026
4 tasks
igorls added a commit that referenced this pull request Apr 13, 2026
igorls added a commit that referenced this pull request Apr 13, 2026
igorls added a commit that referenced this pull request Apr 13, 2026
Post-release back-merge bringing:
- v3.2.0 version bumps (pyproject.toml, version.py, README badge, SKILL.md)
- #690 unbounded chromadb pin
- #666 hook block reasons
- CHANGELOG: [Unreleased] → [3.2.0] — 2026-04-13
- CONTRIBUTING.md: fork-first flow + correct MemPalace upstream URL
sha2fiddy pushed a commit to sha2fiddy/mempalace that referenced this pull request Apr 13, 2026
PR MemPalace#761 bumped pyproject.toml to 3.2.0 but missed three other version strings,
causing test_version_consistency to fail on develop CI (macos, linux 3.11, windows).

- mempalace/version.py: 3.1.0 → 3.2.0 (unblocks test_version_consistency)
- README.md: version badge shield 3.1.0 → 3.2.0
- integrations/openclaw/SKILL.md: 3.1.0 → 3.2.0
- CHANGELOG.md: rename [Unreleased] → [3.2.0] — 2026-04-13, add entries
  for MemPalace#685, MemPalace#690, MemPalace#707, MemPalace#716, MemPalace#734, MemPalace#755, MemPalace#757, MemPalace#761

Verified locally: 689/689 tests pass, ruff clean.
sha2fiddy pushed a commit to sha2fiddy/mempalace that referenced this pull request Apr 14, 2026
PR MemPalace#761 bumped pyproject.toml to 3.2.0 but missed three other version strings,
causing test_version_consistency to fail on develop CI (macos, linux 3.11, windows).

- mempalace/version.py: 3.1.0 → 3.2.0 (unblocks test_version_consistency)
- README.md: version badge shield 3.1.0 → 3.2.0
- integrations/openclaw/SKILL.md: 3.1.0 → 3.2.0
- CHANGELOG.md: rename [Unreleased] → [3.2.0] — 2026-04-13, add entries
  for MemPalace#685, MemPalace#690, MemPalace#707, MemPalace#716, MemPalace#734, MemPalace#755, MemPalace#757, MemPalace#761

Verified locally: 689/689 tests pass, ruff clean.
igorls added a commit that referenced this pull request Apr 14, 2026
Main had 9 commits that never back-merged into develop after the v3.2.0
release cycle. Resolving conflicts as follows:

- mempalace/version.py: keep develop (3.3.0 release target)
- README.md: keep develop (Milla's #835 audit is authoritative — main
  had stale 19 tools / 170 tokens / "30x lossless" / v3.0.0 label)
- hooks/mempal_{save,precompact}_hook.sh: keep develop (#786 reversed
  the #666 "decision=block" behavior intentionally to stop hooks from
  making agents write in chat)
- pyproject.toml: auto-merged — keeps develop's 3.3.0 and picks up
  main's chromadb upper-bound removal (#690)
- CONTRIBUTING.md, mempalace/hooks_cli.py: auto-merged cleanly —
  picks up main's improvements (fork-first clone, more detailed
  block reason strings that name MemPalace and specific tools)
- integrations/openclaw/SKILL.md: bumped 3.2.0 → 3.3.0 (version
  tracks the package per #761 convention)
- CHANGELOG.md: manual merge — kept develop's preamble + Unreleased
  v3.3.0 section + footer links; folded main's richer v3.2.0 entries
  (Packaging section for #690/#761; Bug Fixes #685/#677/#716/#707/
  #755/#757; Documentation #734/#733) into the v3.2.0 section;
  deduped the split Documentation sections that auto-merge produced
igorls added a commit that referenced this pull request Apr 14, 2026
Bring back the main-only content that develop has been missing:
- pyproject.toml chromadb upper-bound removal (#690)
- CHANGELOG [3.2.0] Packaging subsection (#690, #761)
- CONTRIBUTING.md fork-first clone instructions
- mempalace/hooks_cli.py richer block-reason strings (from #666,
  still used by the Python hook invocation path)
- integrations/openclaw/SKILL.md version bump to 3.3.0

Plus the v3.3.0 release commit itself (4aa7e1e) and the legacy
main-only commits (#666, #690, v3.2.0 finalization) for history.

Resolves the main → develop drift that caused PR #838's conflicts.
Going forward, back-merging main to develop after each release
will prevent the same pattern.

Single conflict in CHANGELOG.md resolved by taking main's version
(the Packaging subsection under [3.2.0]).
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.

3 participants