Skip to content

Python: give each file memory its own description sidecar - #9872

Closed
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
microsoft:mainfrom
ManoharPaturi:fix/file-memory-description-sidecar-collision
Closed

Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
microsoft:mainfrom
ManoharPaturi:fix/file-memory-description-sidecar-collision

Conversation

@ManoharPaturi

Copy link
Copy Markdown
Contributor

Motivation & Context

The description sidecar name stripped a file's extension before appending the suffix, so notes.md and notes shared one sidecar. Writing either file's description overwrote the other's, rewriting one without a description deleted the other's description, and deleting either file removed both. The mapping from memory files to their sidecars needs to be injective.

Description & Review Guide

  • What are the major changes? The suffix now appends to the full file name, so notes.md gets notes.md_description.md while extension-less names keep their existing name_description.md sidecar. Reads fall back to the legacy stripped name so descriptions written by earlier versions keep feeding the index, and writes and deletes retire both spellings so a legacy sidecar can never resurrect stale text.
  • What is the impact of these changes? Each memory file owns exactly one description sidecar, existing stores keep their extension-less sidecars unchanged, and extension-bearing files upgrade to the injective name on their next write while their legacy description stays visible until then.
  • What do you want reviewers to focus on? The fallback being read-only until a write retires the legacy sidecar, and the internal-file detection still hiding both spellings from listings.

Related Issue

Fixes #9871

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

The sidecar name stripped the file extension, so notes.md and notes shared one sidecar and one file's description overwrote or deleted the other's. The suffix now appends to the full name, sidecars written under the previous name are still read through a fallback, and writes and deletes retire both spellings.

Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
@ManoharPaturi

Copy link
Copy Markdown
Contributor Author

Sorry for skipping the review step. #9871 now uses the bug report template with the sidecar reproduction, and this stays closed until the team agrees.

This branch was previously deployed

1 inactive deployment
github-app-auth — 3aa94f8b Deployed Oct 30, 2026 by ManoharPaturi via team_check #8073
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: file memory description sidecars collide for names differing by extension

2 participants