Skip to content

[BUG] No Command to Clean Up Stale Index Entries #225

@olddev94

Description

@olddev94

Project

vgrep

Description

There's no command to clean up index entries for files that no longer exist. If files are deleted outside the watcher, their entries remain in the database forever, causing:

  • Wasted storage
  • Stale search results
  • Confusing "file not found" when opening results

Error Message

None - missing feature.

Debug Logs

System Information

- Bounty Version: 0.1.0
- OS: Ubuntu 24.04 LTS
- Rust: 1.75+

Screenshots

No response

Steps to Reproduce

# Index a directory
vgrep index

# Delete some files outside vgrep (watcher not running)
rm some_file.rs

# Search
vgrep "function in deleted file"
# Returns results for deleted files!

# No way to clean up
vgrep clean  # Command doesn't exist
vgrep gc     # Command doesn't exist

Expected Behavior

  1. vgrep index --clean removes stale entries
  2. Or separate vgrep clean command
  3. Watcher should verify files on startup
  4. Periodic cleanup in long-running server

Actual Behavior

  1. Stale entries persist forever
  2. No cleanup command
  3. Search returns non-existent files
  4. Manual database editing required

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvalidValid issuevgrep

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions