Skip to content

fix(protocols): condition input content on its message role - #708

Merged
Menci merged 2 commits into
mainfrom
fix/protocol-content-roles
Nov 12, 2026
Merged

Menci merged 2 commits into
mainfrom
fix/protocol-content-roles

Conversation

@Menci

@Menci Menci commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

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.

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.
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
Menci marked this pull request as ready for review November 12, 2026 11:38
@Menci
Menci merged commit 0e11662 into main Nov 12, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant