Repository navigation
.NET: fix(dotnet): preserve pending Magentic plan review - #9797
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1a97d677-e089-43e3-bdb9-03a64d2918bd
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: Findings reported
Scope: full PR (1 commit(s)): 749f508b5561
Model: gpt-5.6-sol
Overview
The change adds an explicit, checkpointed pending-review flag and uses it to reject ordinary turns until the active review is answered; request-ID correlation and restore tests provide strong protection against stale responses and checkpoint regressions. However, ordinary content submitted in the same invocation as an approval is buffered before the approval handler clears the flag, allowing that pre-approval content to enter coordination on a later turn.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.
Affected areas: dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/Magentic/MagenticOrchestrator.cs
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 3 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1a97d677-e089-43e3-bdb9-03a64d2918bd
There was a problem hiding this comment.
MAF Automated Review — Iteration 2
Result: No findings
Scope: 1 net-new commit(s): e582d4c0a4a4
Model: gpt-5.6-sol
Overview
The incremental change clears executor-local ordinary messages before handling a correlated plan-review response while preserving explicit revision feedback in the response payload. It reuses the stateful executor's message-processing helper and adds regression coverage across approval, revision, streaming, non-streaming, and session-restore paths. Existing request correlation and awaiting-review guards further constrain the lifecycle. No Critical, High, or Medium residual risk was established.
Reviewed the supplied incremental change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Motivation & Context
Keep Magentic workflows paused consistently while a generated plan is awaiting review, including when a session is resumed.
Description & Review Guide
Commands run from
dotnet:dotnet test --project tests\Microsoft.Agents.AI.Workflows.UnitTests -f net10.0 --filter-method Microsoft.Agents.AI.Workflows.UnitTests.MagenticOrchestrationTests.PlanReview_Pending_Ignores_Unrelated_TurnsAsync --no-ansi --output Detailed --minimum-expected-tests 4: four behavioral failures before the fix; all four passed afterward.dotnet test --project tests\Microsoft.Agents.AI.Workflows.UnitTests -f net10.0 --filter-method Microsoft.Agents.AI.Workflows.UnitTests.MagenticOrchestrationTests.PlanReview_Response_Discards_Unrelated_Buffered_MessagesAsync --no-ansi --output Detailed --minimum-expected-tests 4: four behavioral failures before the follow-up correction; all four passed afterward.dotnet test --project tests\Microsoft.Agents.AI.Workflows.UnitTests -f net10.0 --no-ansi --minimum-expected-tests 884: passed, 884 tests, including the original regressions and mixed-response coverage.dotnet build src\Microsoft.Agents.AI.Workflows\Microsoft.Agents.AI.Workflows.csproj --no-restore --tl:off: passed across all target frameworks with zero warnings and errors.dotnet build src\Microsoft.Agents.AI.Workflows\Microsoft.Agents.AI.Workflows.csproj -c Release --tl:off: passed at the initial revision across all target frameworks with zero warnings and errors.dotnet format src\Microsoft.Agents.AI.Workflows\Microsoft.Agents.AI.Workflows.csproj --no-restore: passed.dotnet format tests\Microsoft.Agents.AI.Workflows.UnitTests\Microsoft.Agents.AI.Workflows.UnitTests.csproj --no-restore: passed.dotnet build agent-framework-dotnet.slnx --tl:off: stopped after local disk exhaustion. Solution-wide unit tests were not run.Related Issue
N/A - maintainer-directed bugfix; no public issue.
AI Assistance
AI assistance details: Implementation, regression tests, documentation, validation, and this PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.