Skip to content

Conversation

IvanM9
Copy link

@IvanM9 IvanM9 commented Sep 18, 2025

This pull request improves the reliability and consistency of codebase status and information retrieval in the SnapshotManager class by reading from the persisted JSON snapshot file instead of relying solely on in-memory data. The changes also add compatibility for both v1 and v2 snapshot formats and introduce robust error handling.

Persistence and consistency improvements:

  • Updated getCodebaseStatus to read codebase status from the JSON snapshot file, ensuring results reflect the persisted state and supporting both v1 and v2 formats. If file reading fails, it falls back to in-memory data.
  • Updated getCodebaseInfo to retrieve complete codebase information from the JSON snapshot file, constructing results for v1 format and supporting v2 format directly. Falls back to in-memory data on error.

Backward compatibility and error handling:

  • Added logic to handle both v1 and v2 formats for indexed and indexing codebases, including handling array and object formats for indexing codebases.
  • Added error handling and logging to warn if reading from the snapshot file fails, ensuring graceful fallback to in-memory data.

…om file

- add file-based persistence for codebase status and information
- support both v1 and v2 snapshot formats for backward compatibility
- fallback to memory if file reading fails
- improve error handling and logging for snapshot operations
ayaka209 added a commit to ayaka209/claude-context that referenced this pull request Sep 27, 2025
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.

1 participant