feat: add .mempalaceignore support + fix ChromaDB telemetry spam - #144
Closed
Matt-GPT-6 wants to merge 1 commit into
Closed
feat: add .mempalaceignore support + fix ChromaDB telemetry spam#144Matt-GPT-6 wants to merge 1 commit into
Matt-GPT-6 wants to merge 1 commit into
Conversation
Two changes: 1. .mempalaceignore / .mempalace-ignore file support (closes MemPalace#102) Users can now create a .mempalaceignore (or .mempalace-ignore) file in any directory using the same syntax as .gitignore to exclude files from mining without modifying their project's .gitignore. - .mempalaceignore is always applied (even with --no-gitignore) - Supports negation patterns (e.g. !keep-this.py) - Works at any directory level, just like .gitignore - Both filename variants are auto-excluded from mining - Refactored GitignoreMatcher → IgnoreFileMatcher with a backwards-compatible alias 2. Fix ChromaDB/posthog telemetry error on every command ChromaDB 0.6.x bundles posthog for anonymous telemetry, but posthog>=7.0 changed capture() to keyword-only args, causing "Failed to send telemetry event" on every CLI invocation. Neutralize the call early in __init__.py since MemPalace is a local-only tool with no use for upstream telemetry. Includes 5 new tests covering .mempalaceignore behavior. All 25 tests pass. Made-with: Cursor
Contributor
4 tasks
|
@bensig if scans the code as it is, consumes 3 times the tokens compared with GREP. .mempalace-ignore to only scan *.md make it incredibly great, run a test performs much more! we have:
Either there's a test to confirm that performs better for searching code lines, or we whitelist only *md files coz adding this MCP greatly consumes A LOT more on top. |
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.
Summary
Two focused fixes in one PR:
1.
.mempalaceignorefile support (closes #102)Users can now create a
.mempalaceignore(or.mempalace-ignore) file in any project directory to exclude files from mining — using the exact same syntax as.gitignore.Why this matters: Issue #102 reported that
mempalace minescoops up junk files. While.gitignoreis already honored, many files that should be excluded from memory (credentials, drafts, large data files) shouldn't necessarily be in.gitignore. A separate ignore file gives users fine-grained control without modifying their project's git config.How it works:
.mempalaceignoreis always applied — even when--no-gitignoreis passed (so users can skip gitignore but still respect mempalace-specific exclusions).gitignoresyntax: globs, directory-only rules, negation (!keep-this.py), anchored patterns,**wildcards.gitignorefiles.mempalaceignoreand.mempalace-ignorefilenames are acceptedSKIP_FILENAMES)GitignoreMatcher→IgnoreFileMatcherwith a backwards-compatible alias so existing imports and tests don't break2. Fix ChromaDB/posthog telemetry error spam
Every CLI command printed
Failed to send telemetry event ClientStartEvent: capture() takes 1 positional argument but 3 were givento stderr.Root cause: ChromaDB 0.6.x calls
posthog.capture(user_id, event_name, properties)with positional args, but posthog >= 7.0 changedcapture()to keyword-only args. The env varANONYMIZED_TELEMETRY=Falsedoesn't prevent the broken call from firing.Fix: Neutralize
posthog.captureearly in__init__.pybefore ChromaDB initializes. MemPalace is a local-only tool — upstream telemetry is not useful.Test plan
.mempalaceignorebehavior:respect_gitignore=False.mempalace-ignore(hyphenated) variant!keep.csv).gitignorewould allowmempalace status,mempalace searchproduce clean output with no telemetry errorsMade with Cursor