Skip to content

.NET: Fix misleading workflow protocol attribute diagnostics - #7609

Merged
Peter Ibekwe (peibekwe) merged 1 commit into
microsoft:mainfrom
peibekwe:workflow-fixes
Aug 11, 2026
Merged

.NET: Fix misleading workflow protocol attribute diagnostics#7609
Peter Ibekwe (peibekwe) merged 1 commit into
microsoft:mainfrom
peibekwe:workflow-fixes

Conversation

@peibekwe

Copy link
Copy Markdown
Contributor

Motivation & Context

Protocol-only executors incorrectly receive diagnostics referring to [MessageHandler]. This makes the intentional partial requirement confusing.

Description & Review Guide

  • What are the major changes? Add dedicated diagnostics for  [SendsMessage]  and  [YieldsOutput] , clarify documentation, and add regression tests.
  • What is the impact of these changes? Users receive accurate, actionable errors without changing existing behavior.
  • What do you want reviewers to focus on? Diagnostic wording and separation from handler diagnostics.

Fixes #5163

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 August 10, 2026 22:39
@agent-framework-automation agent-framework-automation Bot added .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Aug 10, 2026
@github-actions github-actions Bot changed the title Fix misleading workflow protocol attribute diagnostics .NET: Fix misleading workflow protocol attribute diagnostics Aug 10, 2026

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.

Pull request overview

Adds protocol-specific diagnostics so executors using [SendsMessage] or [YieldsOutput] receive accurate guidance.

Changes:

  • Adds MAFGENWF008 and MAFGENWF009.
  • Routes protocol-only validation through the new diagnostics.
  • Documents and tests the partial requirement.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ExecutorRouteGeneratorTests.cs Adds regression coverage for protocol diagnostics.
YieldsOutputAttribute.cs Documents the partial requirement.
SendsMessageAttribute.cs Documents the partial requirement.
DiagnosticDescriptors.cs Defines protocol-specific diagnostics.
SemanticAnalyzer.cs Uses the new diagnostics for protocol-only classes.

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

@github-actions github-actions Bot 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.

Agent Framework Review — Iteration 1

Completed passes: 5 | Result: No high-severity findings

Scope: full PR (1 commit(s)): dec11d76b826

Review passes

  • Correctness (gpt-5.6-sol) — No issues found in this pass.
  • Security Reliability (claude-opus-4.8) — No issues found in this pass.
  • Test Coverage (gpt-5.6-sol) — No issues found in this pass.
  • Failure Modes (claude-opus-4.8) — No issues found in this pass.
  • Design Approach (claude-opus-4.8) — No issues found in this pass.

@peibekwe
Peter Ibekwe (peibekwe) marked this pull request as ready for review August 10, 2026 23:08
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 workflows Usage: [Issues, PRs], Target: Workflows

Projects

None yet

4 participants