Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store the file edit backup file in /tmp #3958

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

xingyaoww
Copy link
Contributor

Short description of the problem this fixes or functionality that this introduces. This may be used for the CHANGELOG

Existing agentskills' editing store backup file in the same directory, which sometimes messes up the git patch produced for SWE-Bench evaluation (not in terms of accuracy, but in terms of size).


Give a summary of what the PR does, explaining any non-trivial design decisions

This PR stores those tmp file under /tmp instead of the same directory.


Link of any specific issues this addresses

@@ -512,9 +512,11 @@ def _edit_file_impl(
if enable_auto_lint:
# BACKUP the original file
original_file_backup_path = os.path.join(
'/tmp',
Copy link
Collaborator

Choose a reason for hiding this comment

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

If going temp, why not use tempfile.TemporaryDirectory() instead of /tmp+dirname?

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