Repository navigation
fix(protocols): condition input content on its message role - #708
Merged
Merged
Conversation
Keep refusals on assistant history and use role-specific content contracts in translation and provider consumers. Preserve retained refusal text when compaction restates history as input content.
2 tasks done
Keep assistant refusal content and its existing retention-budget treatment while applying role-specific content contracts. Replace the unsupported text-normalization expectation with a mixed-content regression that also checks retained history.
Menci
marked this pull request as ready for review
November 12, 2026 11:38
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.
Condition message content on its role: client messages and tool results accept client content; assistant history also accepts refusals. Adapt translation and provider consumers to these contracts while preserving retained refusal content and its existing compaction budget treatment.
Validation: the existing named protocol/consumer suites and owning TypeScript projects, plus 14 Copilot compaction tests covering mixed assistant text/refusal history and retention budgeting; scoped lint passes. Independent prerequisite for #673.