fix(cli): add source-scoped unmine command - #2289
Open
MichaelWave369 wants to merge 1 commit into
Open
Conversation
MichaelWave369
force-pushed
the
fix/unmine-source-2213
branch
2 times, most recently
from
August 20, 2026 17:02
982d3e5 to
41a68d5
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.
Addresses the recovery half of #2213.
#2213 reports two separate problems:
This PR intentionally fixes only (2). It does not define a project-miner content-dedup policy.
Adds:
mempalace unmine <source-file>with dry-run by default;--applyrequired to actually remove data;--wingscope for a source intentionally filed into multiple wings;source_filematching only — no fuzzy/similarity deletion;unmine_source.Why this slice:
Current conversation mining already has
(wing, content_hash)dedupe for re-exported conversations (commit54397a5), but #2213's concrete case used--mode projects. Applying chunk/content dedupe to project mode needs a separate semantics decision because identical text in two project files can be legitimate. A precise recovery command is useful independently and does not pre-commit that policy.Example:
mempalace unmine /path/to/duplicate-export.mdreports what would be removed.mempalace unmine /path/to/duplicate-export.md --applyremoves exactly that source.--wing demonarrows it further.Validation against current
develop(639c69a):python -m pytest -q tests/test_sync.py— 43 passedpython -m mempalace.cli unmine --helpunmineruff check mempalace/sync.py mempalace/cli.py tests/test_sync.pyruff format --check mempalace/sync.py mempalace/cli.py tests/test_sync.pypython -m compileall -q mempalace/sync.py mempalace/cli.py tests/test_sync.pyOne clean commit, only:
mempalace/cli.pymempalace/sync.pytests/test_sync.pyI am deliberately leaving #2213 open for the project-mode ingest-dedupe half.