{"record":{"id":"7b1da2c1ab246760","repo":"MemPalace/mempalace","slug":"source-adapter-adapter-name-r-requires-increment","errorCode":null,"errorMessage":"source adapter {adapter_name!r} requires incremental ingestion, which mempalace mine does not support yet","messagePattern":"source adapter (.+?) requires incremental ingestion, which mempalace mine does not support yet","errorType":"exception","errorClass":"UnsupportedSourceAdapterProtocolError","httpStatus":null,"severity":"error","filePath":"mempalace/cli.py","lineNumber":955,"sourceCode":"        DrawerRecord,\n        PalaceContext,\n        SourceRef,\n        SourceItemMetadata,\n        get_adapter,\n        resolve_adapter_for_source,\n    )\n\n    adapter_name = resolve_adapter_for_source(explicit=source_name)\n    try:\n        adapter = get_adapter(adapter_name)\n    except KeyError as exc:\n        raise UnknownSourceAdapterError(\n            f\"unknown source adapter {adapter_name!r}; install its adapter package or \"\n            \"check the adapter name with `mempalace mine --help`\"\n        ) from exc\n\n    if \"supports_incremental\" in adapter.capabilities:\n        raise UnsupportedSourceAdapterProtocolError(\n            f\"source adapter {adapter_name!r} requires incremental ingestion, which \"\n            \"mempalace mine does not support yet\"\n        )\n\n    # A dry run must never open a collection: backend opens can create or\n    # repair storage even when requested as read-only.  Non-dry runs hold one\n    # writer lease from handle creation through adapter iteration, including\n    # direct KG mutations by adapters.\n    lock = mine_palace_lock(palace_path) if not dry_run else contextlib.nullcontext()\n    with lock:\n        knowledge_graph = None\n        try:\n            if dry_run:\n                drawer_collection = _DryRunCollectionProxy()\n                knowledge_graph = _DryRunKnowledgeGraphProxy()\n            else:\n                drawer_collection = get_collection(palace_path)\n                knowledge_graph = KnowledgeGraph(","sourceCodeStart":937,"sourceCodeEnd":973,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/cli.py#L937-L973","documentation":"Raised by `mempalace mine` when the resolved source adapter declares the `supports_incremental` capability. The `mine` command implements only snapshot/batch ingestion; adapters that require incremental (stateful, cursor-based) ingestion are explicitly refused rather than run incorrectly, which would silently skip or duplicate content.","triggerScenarios":"Running `mempalace mine --source <name>` where the adapter's `capabilities` set contains `\"supports_incremental\"` — e.g. mailbox or chat-history adapters that track cursors. Any mine invocation against such an adapter fails before a collection is opened.","commonSituations":"Pointing the generic mine command at an incremental-only source; writing/selecting a custom adapter and adding `supports_incremental` to its capabilities; upgrading to a version where an adapter switched to the incremental protocol.","solutions":["Use the command/entrypoint designed for that source (its incremental ingest path) instead of `mempalace mine`.","If you control the adapter and it can do a full snapshot, remove `supports_incremental` from its capabilities so mine accepts it.","Check `mempalace --help` / docs for the incremental ingestion command for your source.","If you need this now, file/track the feature — mine gaining incremental support removes the guard."],"exampleFix":"# before: custom adapter\nclass MyAdapter:\n    capabilities = {\"supports_incremental\"}   # mine refuses it\n\n# after: adapter supports full snapshot mining\nclass MyAdapter:\n    capabilities = set()   # `mempalace mine --source mysource` now works","handlingStrategy":"validation","validationCode":"from mempalace.adapters import get_adapter\n\ndef adapter_mineable(name) -> bool:\n    adapter = get_adapter(name)  # raises KeyError if unknown\n    return \"supports_incremental\" not in adapter.capabilities","typeGuard":null,"tryCatchPattern":"try:\n    run_mine(source=name, ...)\nexcept UnsupportedSourceAdapterProtocolError as e:\n    raise SystemExit(f\"{e}. Use this source's incremental ingestion command instead of `mempalace mine`.\") from e","preventionTips":["Check the adapter's capabilities before scripting `mine` against it.","For custom adapters, only declare supports_incremental if you truly need cursors.","Track mempalace release notes for incremental-ingest support in `mine`."],"tags":["cli","mine","adapter","incremental","unsupported"],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}