[dotnet-code] Align compaction equality helpers - #1090
Quim Muntal (qmuntal) merged 1 commit into
Conversation
Extract unexported content comparison helpers in compaction equality so the Go structure more closely mirrors the .NET ChatMessageContentEquality internals without changing behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues were identified, and behavior remains unchanged.
Pull request overview
Refactors compaction content equality into focused unexported helpers while preserving behavior and API compatibility.
Changes:
- Extracted per-content equality helpers.
- Retained existing comparison logic and recursive behavior.
File summaries
| File | Description |
|---|---|
agent/compaction/equality.go |
Adds per-content equality helpers used by compaction matching. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Scope: internal-only Changed Go contract: None. Upstream evidence reviewed: Result: aligned — this is a pure internal refactor (unexported helper extraction) with no observable behavior change and no public API surface change. No
|
Tip
Your pull request is ready to create! 🎉 ✅
Everything is OK—the changes have been pushed to branch
dotnet-code-compaction-equality-20260915223009-f396d162ede52596. Please review the changes, including any protected files, before creating the pull request.Create the pull request
The original pull request description is below.
Summary
Extracts unexported per-content comparison helpers from
agent/compaction/equality.go. This keeps the existing compaction equality behavior while making the Go implementation structurally closer to .NET'sChatMessageContentEqualityhelper layout for future ports..NET Reference
dotnet/src/Microsoft.Agents.AI/Compaction/ChatMessageContentEquality.cs- defines per-content comparison helpers used by compaction message matching.Public API and Behavior
No public Go API changed. No intentional behavior change was made.
Tests
go test ./agent/compactionNotes
Rejected candidates:
dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.cs/AgentResponseUpdate.cs- comparable Go response assembly already had aligned behavior; changing update metadata handling would risk observable behavior changes.dotnet/src/Microsoft.Agents.AI.Workflows/MessageMerger.cs- comparable Go workflow merging internals were close, but usage/raw representation parity questions were behavior-affecting rather than safe cleanup.dotnet/src/Microsoft.Agents.AI/Skills/*- inspected as a sampled area from the upstream directory listing, but no safer small cleanup was found before the compaction equality candidate.The direct upstream
git fetchwas blocked by the environment, so the .NET reference was inspected through the read-only GitHub bridge after checking local refs.Closes #1080