{"record":{"id":"88261b928b377318","repo":"MemPalace/mempalace","slug":"abort-extracted-exactly-chromadb-default-get","errorCode":null,"errorMessage":"\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  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  the palace really contains exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, re-run with\n  --confirm-truncation-ok.\n","messagePattern":"\n  ABORT: extracted exactly (.+?) 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  palace genuinely holds (.+?) 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  the palace really contains exactly (.+?) drawers, re-run with\n  --confirm-truncation-ok\\.\n","errorType":"exception","errorClass":"TruncationDetected","httpStatus":null,"severity":"error","filePath":"mempalace/repair.py","lineNumber":688,"sourceCode":"            \"       rebuild the palace from source files.\\n\"\n            \"    3. If you have independently confirmed the palace really contains only\\n\"\n            f\"       {extracted:,} drawers, re-run with --confirm-truncation-ok.\\n\"\n        )\n        raise TruncationDetected(message, sqlite_count, extracted)\n\n    if cap_signal and sqlite_count is None:\n        message = (\n            f\"\\n  ABORT: extracted exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, which matches\\n\"\n            \"  ChromaDB's internal default get() limit. The on-disk SQLite count couldn't\\n\"\n            \"  be cross-checked from this Python context, so we can't tell whether the\\n\"\n            f\"  palace genuinely holds {CHROMADB_DEFAULT_GET_LIMIT:,} rows or whether extraction was\\n\"\n            \"  silently capped. Refusing to overwrite the palace.\\n\"\n            \"\\n\"\n            \"  If you have independently confirmed (e.g. via direct sqlite3 query) that\\n\"\n            f\"  the palace really contains exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, re-run with\\n\"\n            \"  --confirm-truncation-ok.\\n\"\n        )\n        raise TruncationDetected(message, sqlite_count, extracted)\n\n\ndef sqlite_drawer_count(palace_path: str, collection_name: Optional[str] = None) -> \"int | None\":\n    \"\"\"Count rows in ``chroma.sqlite3.embeddings`` for the drawers collection.\n\n    Used as an independent ground-truth check against the chromadb\n    collection-layer ``count()`` / ``get()``: when the on-disk SQLite\n    row count exceeds the extraction count, the segment metadata is\n    stale and repair would destroy the difference.\n\n    Returns ``None`` when the schema isn't readable (chromadb version\n    drift, missing tables, locked file). Callers treat ``None`` as\n    \"unknown\" and fall back to the cap-detection check.\n    \"\"\"\n    collection_name = collection_name or _drawers_collection_name()\n    sqlite_path = os.path.join(palace_path, \"chroma.sqlite3\")\n    if not os.path.exists(sqlite_path):\n        return None","sourceCodeStart":670,"sourceCodeEnd":706,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/repair.py#L670-L706","documentation":"Error \"\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  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  the palace really contains exactly {CHROMADB_DEFAULT_GET_LIMIT:,} drawers, re-run with\n  --confirm-truncation-ok.\n\" thrown in MemPalace/mempalace.","triggerScenarios":"Thrown at mempalace/repair.py:688 when the library encounters an invalid state.","commonSituations":"Extraction hit ChromaDB's internal default get() limit exactly, so silent capping could not be ruled out.","solutions":["Verify the true row count via direct sqlite3 query, then re-run with --confirm-truncation-ok if confirmed"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}