Skip to content

Index does not respect the config. Room removal does not remove already indexed files, and mining should respect project .gitignore #209

@hungpvdev

Description

@hungpvdev

What happened?
I removed a room from the MemPalace config, but the files that had already been indexed for that room were still present in the palace after running init again.

I also noticed that MemPalace still mines files ignored by the project’s .gitignore, which causes over-indexing. In my case, files under storage/ and the fallback general room were still counted even though they were no longer in the room list.

What did you expect?

  • A way to re-index a project after config changes.
  • Re-indexing should re-read the current config and apply room additions/removals.
  • Files excluded by the project’s .gitignore should not be mined.
  • If a room is removed, stale indexed content for that room should be removed or rebuilt.

How to reproduce:

  1. Create a project and run mempalace init <project>.
  2. Remove a room from the generated config.
    • Screenshot: Removed room
  3. Run mempalace mine <project>.
    • Screenshot: Mine output
  4. Observe that storage/ and general/ are not in the room list, but the scan still counts files from those folders.
    • Screenshot: Room list mismatch
  5. Run mempalace init <project> again.
  6. Observe that the previously indexed content from the removed room is still present.

Suggested improvement

  • Add a re-index command or flag that reloads the current config.
  • Re-indexing should remove stale drawers from deleted rooms/files.
  • Re-indexing should optionally rebuild the palace from scratch.
  • Mining should respect the project’s .gitignore to avoid indexing ignored files and folders.

Environment:

  • OS: Ubuntu 22.04.1 LTS on WSL2
  • Kernel: Linux 6.6.87.2-microsoft-standard-WSL2
  • Python version: 3.10.12
  • MemPal version: 3.0.0
  • Shell: fish 3.6.0
  • Install location: /home/hungpv/.local/lib/python3.10/site-packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions