Repository navigation
Python: preserve metadata-like text in memory topic summaries - #9079
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoOct 9, 2026
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused parser change correctly addresses the reported data corruption and is thoroughly covered by regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes memory Markdown parsing so metadata-like summary text is preserved during reloads and index rebuilding.
Changes:
- Restricts metadata parsing to the pre-content section.
- Adds round-trip, file-store, multiline summary, and index regression tests.
| File | Description |
|---|---|
python/packages/core/agent_framework/_harness/_memory.py |
Enforces the metadata/content parsing boundary. |
python/packages/core/tests/core/test_harness_memory.py |
Covers affected summaries and storage workflows. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 8, 2026
LI (ktz03)
marked this pull request as ready for review
October 9, 2026 02:33
3 tasks done
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Oct 9, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation & Context
A memory topic summary starting with
Updated:orSessions:is currently parsed as metadata on reload. The summary disappears, and its text replaces the stored timestamp or originating session IDs. File-store reads and rebuilt index summaries inherit the same loss.Description & Review Guide
Updated:andSessions:as metadata only before entering a content section. Add regressions for public record and file-store round trips, index rebuilding, multiline summaries, and ordinary content controls.mainobservability tests; they did not fail tests. No live-model or service integration run was performed.Related Issue
Fixes #9078
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.