Skip to content

forget(): processed_files cleanup misses custom-imported project paths #26

Description

@krishpinto

Found by CodeRabbit on PR #25 (Major).

Problem

Grasp::forget() rebuilds the processed_files deletion prefix from config.claude_projects_dir.join(slug). But transcripts can be imported from a custom location (grasp import --path <dir>), and processed_files.file_path stores the actual imported path (file.to_string_lossy()), which then lives under the custom dir — not under claude_projects_dir.

Effect: forgetting a custom-imported project leaves stale processed_files rows behind, so re-importing those same files is incorrectly skipped (they look already-processed).

Fix

The projects table already stores the real import directory in projects.path (set by upsert_project during import). Query that path before deleting the project row and use it as the LIKE prefix base, falling back to claude_projects_dir.join(slug) when absent. Keep the existing anchored-prefix + escape_like approach.

Addressed in PR #25.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions