fix(status): wire CLI status() to get_all_metadata() fast path (#2153) - #2154
Open
javapacr wants to merge 2 commits into
Open
fix(status): wire CLI status() to get_all_metadata() fast path (#2153)#2154javapacr wants to merge 2 commits into
javapacr wants to merge 2 commits into
Conversation
javapacr
force-pushed
the
fix/2152-cli-status-qdrant-get-all-metadata
branch
2 times, most recently
from
August 4, 2026 16:16
8973b42 to
c4ef4f0
Compare
…lace#2153) CLI `mempalace status` (`miner.py:status()`) still used an O(n²) offset-paginated loop even after the MCP server path was fixed in MemPalace#1796/MemPalace#1836. For Qdrant, each `col.get(offset=N)` call materializes the entire collection via `_scroll_all()` then slices — so ~32 full re-fetches for a 159k-drawer palace. Fix: after the chroma sqlite fast path returns None and the collection is opened, check `getattr(col, "get_all_metadata", None)`. If callable, fetch all metadata in one pass, tally wing/room counts, and return. The existing offset loop remains as fallback for backends that don't expose the contract method. This mirrors the delegation pattern already used by `mcp_server._fetch_all_metadata()` (MemPalace#1796). Before: 1m46s on 159,601-drawer Qdrant palace After: 3.4s (31x speedup) Test: `tests/test_cli_status_fast_path.py` asserts status() uses get_all_metadata() when available and does NOT call the offset loop, plus fallback coverage for legacy collections.
javapacr
force-pushed
the
fix/2152-cli-status-qdrant-get-all-metadata
branch
from
August 4, 2026 16:17
c4ef4f0 to
b86982d
Compare
Unblocks the lint check in MemPalace#2154 (ruff format --check was the only failing CI job). No functional changes.
Author
|
Pushed |
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.
Fixes #2153.
miner.status()now delegates toget_all_metadata()when the collection exposes it (same pattern asmcp_server._fetch_all_metadata(), #1796), before falling back to the existing offset loop.Before: 1m46s (O(n²) — 32 full-collection re-fetches on Qdrant)
After: 3.4s (single
_scroll_all()pass)Palace: 159,601 drawers, Qdrant backend