feat(mine): route explicit source adapters through the RFC 002 registry - #2173
Open
joshuafontany wants to merge 1 commit into
Open
feat(mine): route explicit source adapters through the RFC 002 registry#2173joshuafontany wants to merge 1 commit into
joshuafontany wants to merge 1 commit into
Conversation
This was referenced Aug 6, 2026
Adds `--source <adapter-name>` to `mempalace mine`. When supplied, the adapter resolves through resolve_adapter_for_source(), runs against the existing PalaceContext, and files its DrawerRecords through the standard write path. Omitting it leaves the legacy --mode dispatch untouched. --mode and --source select the ingest path and cannot both apply, so they sit in a mutually exclusive group. --mode carries no argparse default: argparse counts an option as seen for exclusivity only when its value differs from its default, so a default of "projects" would admit `--source X --mode projects` while rejecting `--source X --mode convos`. cmd_mine restores "projects" when --mode goes unsupplied, so `mempalace mine <dir>` behaves as before. Tests cover registry resolution, PalaceContext construction, adapter metadata landing verbatim, unknown-adapter failure, dry-run, the exclusivity across all three mode spellings, and help documenting --source as the RFC 002 extension path. Closes MemPalace#2062 tests/test_mine_source_registry.py: 5 passed. mine/cli selection: 752 passed, 3 skipped.
joshuafontany
force-pushed
the
feat/2062-source-adapter-registry
branch
from
August 8, 2026 19:43
473383a to
2fb17c6
Compare
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.
Closes #2062.
mempalace mine --source <adapter-name>resolves the adapter throughresolve_adapter_for_source(), constructs the existingPalaceContext, and runs the adapter ingestion path. Adapter-authored metadata lands verbatim;PalaceContextstampsadapter_nameandadapter_version. Omitting--sourceleaves the legacy--modedispatch untouched, somempalace mine <dir>and--mode projects|convos|extractbehave exactly as before.The exclusivity criterion.
--modeand--sourceselect the ingest path and cannot both apply, so they sit in a mutually exclusive group with--modecarrying no argparse default. argparse counts an option as "seen" for exclusivity only when its value differs from its default, which makes the default load-bearing here:cmd_minerestores"projects"when--modegoes unsupplied, so the parser holds the group and the dispatch site holds the default. If you would rather keep the default in argparse and accept the--mode projectsspelling passing, say so and I will drop that part.Tests cover registry resolution,
PalaceContextconstruction, verbatim adapter metadata, unknown-adapter failure, dry-run filing nothing, exclusivity across all three mode spellings, and--helpdocumenting--sourceas the RFC 002 extension path.Suite: 3607 passed, 31 skipped. The five
test_initleaked-PYTHONPATHresults reproduce identically on an untoucheddevelopcheckout, so this branch leaves them where it found them.