Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 22, 2025

Description

This PR attempts to address Issue #7310. Feedback and guidance are welcome.

Problem

Users reported that checkpoint functionality (diff/restore) was disabled for .sql files. When they changed the file extension to .py, checkpoints worked correctly.

Solution

Removed *.sql from the database file exclusion patterns in the checkpoint service. SQL script files that users are actively working on should be eligible for checkpoint operations.

Changes

  • Removed *.sql from getDatabaseFilePatterns() in src/services/checkpoints/excludes.ts
  • Added test coverage to verify SQL files are no longer excluded from checkpoints

Testing

  • ✅ All existing tests pass
  • ✅ Added specific test assertions to verify SQL files are not excluded
  • ✅ Ran checkpoint service tests successfully

Impact

Users will now be able to:

  • Use checkpoint diff functionality with .sql files
  • Restore checkpoints for SQL files
  • Have the same checkpoint experience with SQL files as with other code files

Fixes #7310


Important

Enables checkpoint functionality for .sql files by removing them from exclusion patterns, fixing issue #7310.

  • Behavior:
    • Enables checkpoint functionality for .sql files by removing *.sql from exclusion patterns in getDatabaseFilePatterns() in excludes.ts.
    • Users can now use checkpoint diff and restore functionalities with .sql files.
  • Testing:
    • Updated excludes.spec.ts to verify .sql files are not excluded from checkpoints.
    • Added assertions to ensure .sql files are included in checkpoint operations.
  • Impact:

This description was created by Ellipsis for 71e93f3. You can customize this summary. It will automatically update as commits are pushed.

Removes *.sql from the excluded file patterns to allow checkpoint functionality
for SQL script files. This fixes an issue where users could not use diff or
restore features with .sql files.

Fixes #7310
@roomote roomote bot requested review from cte, jr and mrubens as code owners August 22, 2025 08:15
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Aug 22, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 22, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing my own code is like debugging in production - technically possible but morally questionable.

"*.pdb",
"*.rdb",
"*.sql",
"*.sqlite",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix! Removing SQL files from exclusions makes sense since they're text-based scripts users actively edit. However, two considerations:

  1. Large SQL dumps: Some SQL files can be multi-gigabyte database dumps. Users should add these to .gitignore if needed.

  2. CSV consistency: I noticed CSV files (*.csv) are still excluded in this list, but they're also text files users might edit. Should we consider removing CSV from exclusions for consistency?

  3. Documentation: Consider adding a comment above getDatabaseFilePatterns() explaining it excludes binary database files but not SQL scripts.

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Aug 22, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Aug 22, 2025
@daniel-lxs
Copy link
Member

After reviewing this change, I need to reject it. SQL files were excluded from checkpoints for good reason - they can become extremely large (database dumps, migration scripts with seed data, etc.) and would significantly impact checkpoint performance. The exclusion pattern exists to protect the checkpoint system from these potentially massive files.

The current behavior is intentional and should be maintained. I'll close this PR and provide more context on the issue.

@daniel-lxs
Copy link
Member

Closing this PR as SQL files should remain excluded from checkpoints due to performance considerations.

@daniel-lxs daniel-lxs closed this Aug 22, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 22, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working PR - Needs Preliminary Review size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

checkpoint is disabled with .sql

4 participants