Fix repo-memory folder path to use branch name and update glob pattern matching #8252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
push_repo_memory.cjsscript was constructing the destination path using the memory ID instead of the branch name, causing all repo-memory branches to store files atmemory/default/regardless of their actual branch name. Additionally, file-glob patterns were being validated against artifact-relative paths instead of branch-relative paths.Changes:
Updated
push_repo_memory.cjsline 248 to usebranchNameinstead ofmemoryId:Updated glob pattern matching in
push_repo_memory.cjsto test against the full branch-relative path:Updated file-glob patterns in 21 workflow files to include the full branch path structure:
*.json→memory/code-metrics/*.jsonmetrics/**→memory/meta-orchestrators/metrics/**Updated
docs/src/content/docs/reference/memory.mdto document that file-glob patterns must include the full branch pathImpact:
memory/code-metricsmemory/default/memory/code-metrics/memory/code-metrics/*.jsonmemory/audit-workflowsmemory/default/memory/audit-workflows/memory/audit-workflows/*.jsonThis makes the folder structure semantically aligned with the branch naming convention and ensures glob patterns correctly validate files at their actual storage location within the branch.
Testing:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.