docs: Alignment analysis of .NET and Python context compaction vs. ADR-0019#4515
Draft
Copilot wants to merge 2 commits intocrickman/feature-compaction-deuxfrom
Draft
docs: Alignment analysis of .NET and Python context compaction vs. ADR-0019#4515Copilot wants to merge 2 commits intocrickman/feature-compaction-deuxfrom
Copilot wants to merge 2 commits intocrickman/feature-compaction-deuxfrom
Conversation
Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add analysis of .NET and Python compaction work
docs: Alignment analysis of .NET and Python context compaction vs. ADR-0019
Mar 6, 2026
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 and Context
Adds a cross-implementation analysis of the in-progress Python (#4469) and .NET (#4496) compaction PRs against ADR-0019 to surface alignment gaps before either PR merges.
Description
Creates
docs/design/alignment.md— no code changes.Spec recap (ADR-0019 decision)
CompactionStrategy) + Variant F2 (_-annotated messages, no sidecar)TokenBudgetComposedStrategyas the canonical composition patternPython PR #4469
Protocolinterface,TokenBudgetComposedStrategy, strategy-internal triggers, all four built-in strategiesannotate_message_groups().NET PR #4496
CompactingChatClient(innermost in pipeline),MessageIndexwith incrementalUpdate(), state serialized intoAgentSession.StateBag, streaming supportMessageIndex) rather than spec-preferred F2 — intentional and acceptable per spec's own acknowledgementTokenBudgetComposedStrategyabsent;PipelineCompactionStrategyruns all strategies unconditionally with no budget-stopIChatReduceronInMemoryChatHistoryProvider— separate abstraction fromCompactionStrategy, not unified as the spec intendsMessageIndex.CreateKey gaps identified
TokenBudgetCompactionStrategymissingIChatReducer, notCompactionStrategyReasoningContent) atomicityContribution Checklist
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.