Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Implemented the file system cleanup logic in CleanupProcessor.
Instead of a TODO and sleep, the processor now iterates through configured temporary directories (uploads/temp and tmp), checks file modification times, and deletes files older than the specified retention period.
It includes safety checks to ensure directories exist and handles errors on a per-file basis.
Verified using a standalone script to confirm deletion behavior.
Note: Pre-existing build failures in mcp-core were observed but are unrelated to these changes.


PR created automatically by Jules for task 11213588373411896113 started by @whodaniel

- Implements `cleanupTempFiles` using `fs/promises`.
- Targets `uploads/temp` and `tmp` directories relative to CWD.
- Avoids `os.tmpdir()` to prevent accidental deletion of system files.
- Respects `batchSize` and `olderThanDays` parameters.
- Handles directory and file access errors gracefully.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

PR Description Missing Sections ⚠️

Your PR description is missing the following sections:

  • Summary

  • Changes

  • Testing

    Please update your PR description to include these sections.

Copy link
Owner

@whodaniel whodaniel left a comment

Choose a reason for hiding this comment

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

File System Cleanup Implementation Review

This PR implements actual file system cleanup:

✅ Replaces TODO with real fs/promises implementation
✅ Targets specific directories: uploads/temp and tmp
✅ Checks file modification times for age-based deletion
✅ Includes safety checks for directory existence
✅ Handles errors gracefully on per-file basis
✅ Avoids os.tmpdir() to prevent system file deletion

Safety Features:

  • Respects batchSize and olderThanDays parameters
  • Only operates on configured directories
  • Error handling prevents batch failure

Recommendation: Approve and merge.

@whodaniel whodaniel marked this pull request as ready for review January 11, 2026 05:13
@whodaniel whodaniel merged commit 2a09839 into main Jan 11, 2026
37 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants