Repository navigation
.NET: Skip empty Foundry memory context messages - #8932
Merged
westey (westey-m) merged 3 commits intoOct 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fix correctly preserves input context and is covered by success and regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Prevents Foundry memory searches with no usable content from adding an empty message.
Changes:
- Return empty context for empty or blank memories.
- Add regression tests for empty, blank, and usable results.
- Update the fake transport to match the SDK search route.
| File | Description |
|---|---|
FoundryMemoryProvider.cs |
Skips empty memory context messages. |
FoundryMemoryProviderTests.cs |
Adds public invocation regression coverage. |
TestableAIProjectClient.cs |
Corrects the mocked search endpoint. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
4 of 5 tasks
Merged
4 of 5 tasks
quifox (quifox)
marked this pull request as ready for review
October 1, 2026 11:03
Vincent Biret (baywet)
left a comment
Member
There was a problem hiding this comment.
Thanks for the contribution!
westey (westey-m)
approved these changes
Oct 2, 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 successful Foundry memory search with no usable memory text currently appends an empty user message. Empty results and results containing only blank content should retain the original input without an added memory turn.
Description & Review Guide
The empty-result regressions fail before the fix and pass afterward. Validation: macOS arm64, .NET SDK 10.0.401; affected net10.0 unit project 489/489 passed. Combined verification with #8931 and #8933: full-solution build with zero warnings and errors; 9,067 unit tests passed, 69 skipped, 0 failed (including FeatureRegistry.UnitTests); formatting checks passed for all changed files. Tests use
--culture en-USbecause five existing PowerFx-related tests depend on English diagnostics. External-service integration tests were not run.Related Issue
No matching issue was found. The added regression tests reproduce the problem described above.
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.