Skip to content

Removing unresolved memory files#120

Merged
VitjanZ merged 3 commits intomainfrom
fix/delete_unresolved_memory
Feb 27, 2026
Merged

Removing unresolved memory files#120
VitjanZ merged 3 commits intomainfrom
fix/delete_unresolved_memory

Conversation

@VitjanZ
Copy link
Collaborator

@VitjanZ VitjanZ commented Feb 27, 2026

Removing unnecessary memory files that did not lead to a successful resolution of a test issue.

@VitjanZ VitjanZ requested a review from dusano February 27, 2026 10:54
return {}, {}
memory_files = file_utils.list_all_text_files(memory_path)
memory_files_content = file_utils.get_existing_files_content(memory_path, memory_files)
console.info(f"Loaded {len(memory_files_content)} memory files from {memory_path}.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't include {memory_path}. Namley, this located in a hidden folder that we don't necessarily want to expose.

# Not a valid JSON file, unlikely to be a valid memory file, delete it
os.remove(file_path)
os.remove(file_path)
console.info(f"Deleted unresolved memory file: {file_name}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I would set this on debug level (console.debug).

Please also change text to ”Deleted temporary memory file: {file_name}")

continue
except (json.JSONDecodeError, OSError):
# Not a valid JSON file, unlikely to be a valid memory file, delete it
os.remove(file_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add here console.error. This should not happen.

@VitjanZ VitjanZ merged commit 496327a into main Feb 27, 2026
10 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