Skip to content

.NET: Allow compaction for per-service-call local chat history - #8845

Merged
westey (westey-m) merged 3 commits into
mainfrom
copilot/exclude-agent-local-chat-history-cases
Sep 29, 2026
Merged

westey (westey-m) merged 3 commits into
mainfrom
copilot/exclude-agent-local-chat-history-cases

Conversation

Copilot AI commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Motivation & Context

CompactionProvider treats _agent_local_chat_history as a remote conversation ID, incorrectly skipping compaction when placed below the per-service-call history persistence client.

Description & Review Guide

  • What are the major changes? Exempt the existing local-history sentinel from the remote-session skip condition.
  • What is the impact of these changes? Local history can be compacted; real remote conversation IDs still bypass compaction.
  • What do you want reviewers to focus on? Regression coverage for sentinel, null, empty, whitespace, and remote conversation IDs.

Related Issue

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 is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • 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.

Copilot AI balanced review requested due to automatic review settings September 29, 2026 14:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: westey-m <164392973+westey-m@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix exclusion of conversation ID for compaction .NET: Allow compaction for per-service-call local chat history Sep 29, 2026
Comment thread dotnet/src/Microsoft.Agents.AI/Compaction/CompactionProvider.cs Outdated
@github-code-quality

github-code-quality Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall line coverage in commit 25fc330 in the copilot/exclude-agen... branch is 85%. Line coverage data for the main branch is not yet available.

Show a line coverage summary of the most covered files.
File main copilot/exclude-agen... 25fc330 +/-
/home/runner/wo...valConverter.cs — 100% —
/home/runner/wo...entsProvider.cs — 99% —
/home/runner/wo...egatingAgent.cs — 99% —
/home/runner/wo...nticAnalyzer.cs — 94% —
/home/runner/wo...putConverter.cs — 90% —
/home/runner/wo...kflowBuilder.cs — 90% —
/home/runner/wo...SkillsSource.cs — 89% —
/home/runner/wo...onExtensions.cs — 81% —
/home/runner/wo...CopilotAgent.cs — 76% —
/home/runner/wo...ctionVisitor.cs — 75% —

Updated September 29, 2026 16:23 UTC

Co-authored-by: westey-m <164392973+westey-m@users.noreply.github.com>
@westey-m
westey (westey-m) added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit 5343347 Sep 29, 2026
34 checks passed
@westey-m
westey (westey-m) deleted the copilot/exclude-agent-local-chat-history-cases branch September 29, 2026 17:02

This branch was successfully deployed

2 active deployments
github-app-auth — 25fc330f Deployed Sep 29, 2026 by Copilot via add_label #24020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: Should we exclude cases where ConversationId="_agent_local_chat_history"?

4 participants