MemPalace/mempalace · error · TruncationDetected

ABORT: extracted exactly {CHROMADB_DEFAULT_GET_LIMIT:,} d

Error message

  ABORT: extracted exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, which matches
  ChromaDB's internal default get() limit. The on-disk SQLite count couldn't
  be cross-checked from this Python context, so we can't tell whether the
  palace genuinely holds {CHROMADB_DEFAULT_GET_LIMIT:,} rows or whether extraction was
  silently capped. Refusing to overwrite the palace.

  If you have independently confirmed (e.g. via direct sqlite3 query) that
  the palace really contains exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, re-run with
  --confirm-truncation-ok.

What it means

Error " ABORT: extracted exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, which matches ChromaDB's internal default get() limit. The on-disk SQLite count couldn't be cross-checked from this Python context, so we can't tell whether the palace genuinely holds {CHROMADB_DEFAULT_GET_LIMIT:,} rows or whether extraction was silently capped. Refusing to overwrite the palace. If you have independently confirmed (e.g. via direct sqlite3 query) that the palace really contains exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, re-run with --confirm-truncation-ok. " thrown in MemPalace/mempalace.

Source

Thrown at mempalace/repair.py:688

            "       rebuild the palace from source files.\n"
            "    3. If you have independently confirmed the palace really contains only\n"
            f"       {extracted:,} drawers, re-run with --confirm-truncation-ok.\n"
        )
        raise TruncationDetected(message, sqlite_count, extracted)

    if cap_signal and sqlite_count is None:
        message = (
            f"\n  ABORT: extracted exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, which matches\n"
            "  ChromaDB's internal default get() limit. The on-disk SQLite count couldn't\n"
            "  be cross-checked from this Python context, so we can't tell whether the\n"
            f"  palace genuinely holds {CHROMADB_DEFAULT_GET_LIMIT:,} rows or whether extraction was\n"
            "  silently capped. Refusing to overwrite the palace.\n"
            "\n"
            "  If you have independently confirmed (e.g. via direct sqlite3 query) that\n"
            f"  the palace really contains exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, re-run with\n"
            "  --confirm-truncation-ok.\n"
        )
        raise TruncationDetected(message, sqlite_count, extracted)


def sqlite_drawer_count(palace_path: str, collection_name: Optional[str] = None) -> "int | None":
    """Count rows in ``chroma.sqlite3.embeddings`` for the drawers collection.

    Used as an independent ground-truth check against the chromadb
    collection-layer ``count()`` / ``get()``: when the on-disk SQLite
    row count exceeds the extraction count, the segment metadata is
    stale and repair would destroy the difference.

    Returns ``None`` when the schema isn't readable (chromadb version
    drift, missing tables, locked file). Callers treat ``None`` as
    "unknown" and fall back to the cap-detection check.
    """
    collection_name = collection_name or _drawers_collection_name()
    sqlite_path = os.path.join(palace_path, "chroma.sqlite3")
    if not os.path.exists(sqlite_path):
        return None

View on GitHub (pinned to 06cb6987f0)

Solutions

  1. Verify the true row count via direct sqlite3 query, then re-run with --confirm-truncation-ok if confirmed

When it happens

Trigger: Thrown at mempalace/repair.py:688 when the library encounters an invalid state.

Common situations: Extraction hit ChromaDB's internal default get() limit exactly, so silent capping could not be ruled out.


AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15). Data as JSON: /api/errors/88261b928b377318. Report an issue: GitHub.