[dotnet-port-fixes] Add tool approval no-session parity test - #904
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds regression coverage for tool-approval auto-approval without an explicit session.
Changes:
- Adds a no-session parity test.
- Verifies message preservation, approval response injection, and completion output.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
API Consistency ReviewScope: internal-only (test-only change) This PR adds a regression test, No exported API surface changed;
|
Summary
Add a regression test in
agent/harness/toolapproval/toolapproval_test.gothat ports the intent of the upstream .NET no-session tool-approval fix. The Go middleware already preserves the original user message when an approval request is auto-approved and the inner agent is re-invoked in the same run, so this change locks that behavior in with explicit parity coverage rather than changing the implementation.Upstream reference: microsoft/agent-framework#7310 and commit
28e02d466997972d51c0a435b133a875f7444976.Ported .NET PRs
Breaking Changes
No.
Tests and Examples
go test ./agent/harness/toolapprovalTestToolApproval_AutoApprovalWithoutSessionPreservesOriginalMessagesNotes
The broader recent
dotnet/inspection did not produce a smaller behavior fix that was both unported and in scope for[dotnet-port-fixes]. This PR keeps the nightly change narrow by adding parity coverage for the remaining applicable tool-approval regression path instead of changing public or internal behavior that is already aligned.Closes #874