Skip to content

Add .NET test inventory and one-to-one Go test mappings - #1263

Merged
Quim Muntal (qmuntal) merged 2 commits into
mainfrom
feat/dotnet-test-inventory-mapping
Oct 6, 2026
Merged

Quim Muntal (qmuntal) merged 2 commits into
mainfrom
feat/dotnet-test-inventory-mapping

Conversation

@qmuntal

Copy link
Copy Markdown
Member

Summary

Add a name-only inventory of 6,750 .NET test methods from 45 compiled test assemblies at microsoft/agent-framework commit 0c9944cc9f577d51277ac7c55dbc388b60a577af. Extraction uses go-winmd and does not execute .NET tests. Existing API inventory entries remain unchanged.

Add static Go test discovery and strict one-to-one test reconciliation. The catalog records 413 direct .NET-to-Go test pairs, 1,672 reviewed-unpaired Go tests, and no unreviewed Go tests across the 2,085 current source identities. Reviewed-unpaired means source comparison was completed without an eligible direct counterpart; it is not a claim that an SDK feature is missing. Mappings require the same primary setup, action, representable cases, and golden observations, allowing minor language/API differences.

Complete scoped cases and assertions in existing tests while retaining original Go test names and existing coverage. Include three fixes exposed during alignment: release the A2A subscription before polling fallback, retain skill content read during discovery instead of reopening the file, and avoid creating standing approval rules from denied responses. Synchronize the Foundry header-isolation test's shared observations.

Rebased the pending work onto main at 3071afa. The earlier workflow-only branch commits are not included. Existing main API assessments and SDK changes are preserved.

Validation

  • Full unit suites for 29 affected SDK/tooling packages: 1,872 top-level pass events and 13 existing skips. The shared test-inventory package also compiled and has no tests.
  • All 412 mapped unit identities and all 17 newly reviewed main tests passed. The one mapped E2E test was compiled but not run.
  • go vet for all 30 affected packages.
  • Strict test/API reconciliation, complete static discovery, formatting, and staged/unstaged whitespace checks passed.
  • After the final catalog-only main update, the complete symbolmap suite and strict test/API reconciliation passed again; all test pairs and classifications remained unchanged.
  • No live E2E, replay-harness, .NET test, benchmark, or race execution. No binaries or temporary research artifacts included.

Extract test names from compiled .NET assemblies with go-winmd and discover
Go test functions statically. Add strict one-to-one test reconciliation and
separate reviewed and unreviewed Go test lists.

Record 6,750 .NET tests and 413 direct Go counterparts, retaining original
Go test names and completing their minor case and assertion differences.
Mark the remaining 1,672 Go tests as reviewed without claiming counterparts.

Preserve subscription cleanup before A2A polling fallback, retain discovered
skill content, and avoid standing approval rules for denied responses.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 11:09
@qmuntal
Quim Muntal (qmuntal) requested a review from a team as a code owner October 6, 2026 11:09
@github-actions github-actions Bot added area:agent Changes files in the agent area area:internal Changes files in the internal area area:message Changes files in the message area area:provider Changes files in the provider area area:provider/a2a Changes files in the provider / a2a area area:provider/agui Changes files in the provider / agui area area:provider/copilot Changes files in the provider / copilot area area:provider/foundry Changes files in the provider / foundry area area:provider/openai Changes files in the provider / openai area area:tool Changes files in the tool area area:tooling Changes files in the tooling area area:workflow Changes files in the workflow area size:xlarge More than 300 changed lines or 10 files labels Oct 6, 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.

Copilot review overview

🔵 Needs a closer look

The large generated inventory, hundreds of semantic test mappings, and broad cross-package changes require final human verification.

Review effort: Balanced
Findings: None

What changed in this PR

Adds .NET test inventory extraction, static Go test discovery, and strict one-to-one reconciliation, alongside behavioral fixes and expanded parity assertions.

Changes:

  • Adds test-inventory and reconciliation tooling plus documentation.
  • Fixes A2A fallback cleanup, skill-content retention, and denied approval handling.
  • Expands workflow, provider, agent, and compaction tests.
File Description
cmd/​internal/​testinventory/​inventory.go Defines shared test inventory schema.
cmd/​dotnetsymbols/​{main,model,extract,tests}.go Extracts test declarations and provenance.
cmd/​dotnetsymbols/​README.md Documents test extraction.
cmd/​symbolmap/​{main,reconcile,gotests,testmapping}.go Adds discovery and reconciliation commands.
docs/​dotnet-go-sdk-feature-comparison.md Documents test mapping semantics.
provider/​a2aprovider/​a2a.go Releases subscriptions before fallback polling.
agent/​skills/​fsskills/​source.go Retains discovered skill content.
agent/​harness/​toolapproval/​toolapproval.go Prevents denied responses creating rules.
workflow/​**/​*_test.go Strengthens workflow behavior and concurrency assertions.
provider/​**/​*_test.go Expands provider contract coverage.
agent/​**/​*_test.go Expands agent, skill, harness, and compaction coverage.
message/​**/​*_test.go Strengthens message ownership and forwarding tests.
tool/​agenttool/​agenttool_test.go Verifies metadata, panic, and error contracts.
internal/​telemetry/​telemetry_test.go Isolates helper-process environment state.

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

@github-actions github-actions Bot added kind:code Changes production behavior or code kind:docs Changes documentation or comments kind:tests Changes tests, fixtures, or test infrastructure labels Oct 6, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Oct 6, 2026
Avoid shadowing copy, normalize the module validation diagnostic, use a tagged switch in the reconciliation test, and remove an unused checkpoint helper.
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

API consistency review

Result Scope
aligned user-visible behavior

Changed Go contract

No exported Go API was added, renamed, or changed. The diff is overwhelmingly tests, docs, and internal dev tooling (cmd/dotnetsymbols, cmd/symbolmap, cmd/internal/testinventory, docs/*). The only non-test production files touched are:

  • agent/harness/toolapproval/toolapproval.go — addApprovalRuleFromResponse now returns early (no standing rule recorded) when bound.Approved is false, i.e. a denied AlwaysApprove* response no longer creates a standing approval rule.
  • provider/a2aprovider/a2a.go — subscribeToTaskWithFallback now fully drains/releases the SubscribeToTask iterator (breaking out of the range loop) before issuing the GetTask fallback call, instead of calling GetTask while still inside the subscription's iteration.
  • agent/skills/fsskills/source.go — GetContent now reuses the content string read during discovery instead of re-reading SKILL.md from the filesystem inside the cached closure.

Upstream evidence reviewed

Implementation Source Contract checked
.NET dotnet/src/Microsoft.Agents.AI/Harness/ToolApproval/ToolApprovalAgent.cs#L887 Standing rule creation is gated on alwaysApprove is not null && innerResponse.Approved && ... — a denied response never records a rule, matching the Go fix.
.NET dotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.cs (comment: "Dispose the enumerator before the fallback call to release the HTTP/SSE connection") .NET disposes the subscription enumerator before calling GetTaskAsync fallback; the Go change makes the Go implementation release the subscription iterator before calling GetTask, matching this ordering.

Assessment

The two behavioral fixes (tool-approval denial no longer creates a standing approval rule, and the A2A subscription is released before the GetTask fallback) are each directly corroborated by the current upstream .NET implementation and bring Go into closer parity rather than away from it. The skills GetContent caching fix removes a double-read/possible-inconsistency bug with no cross-language behavioral contract at stake. No new public surface, default, or opt-in gate was introduced, and no divergence from .NET/Python semantics was found. The remainder of the diff (test additions/restructuring, cmd/dotnetsymbols, cmd/symbolmap, cmd/internal/testinventory, docs/*) is internal tooling/test scope and does not affect the Go SDK's public contract.

Generated by Go API Consistency Review Agent for #1263 · copilot · auto · 80.8 AIC · ⌖ 6.99 AIC · ⊞ 13.9K · ◷

@qmuntal
Quim Muntal (qmuntal) added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit 197a414 Oct 6, 2026
28 checks passed
@qmuntal
Quim Muntal (qmuntal) deleted the feat/dotnet-test-inventory-mapping branch October 6, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Changes files in the agent area area:internal Changes files in the internal area area:message Changes files in the message area area:provider/a2a Changes files in the provider / a2a area area:provider/agui Changes files in the provider / agui area area:provider/copilot Changes files in the provider / copilot area area:provider/foundry Changes files in the provider / foundry area area:provider/openai Changes files in the provider / openai area area:provider Changes files in the provider area area:tool Changes files in the tool area area:tooling Changes files in the tooling area area:workflow Changes files in the workflow area kind:code Changes production behavior or code kind:docs Changes documentation or comments kind:tests Changes tests, fixtures, or test infrastructure parity-approved Go API consistency review found no parity issues size:xlarge More than 300 changed lines or 10 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants