Skip to content

Expose the agent provider contract for engine extensions - #22

Draft
oznetmaster wants to merge 1 commit into
nunit:mainfrom
oznetmaster:feature/pluggable-agent-provider-contract
Draft

oznetmaster wants to merge 1 commit into
nunit:mainfrom
oznetmaster:feature/pluggable-agent-provider-contract

Conversation

@oznetmaster

@oznetmaster oznetmaster commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Expose ITestAgentProvider in NUnit.Engine.Api so an agent-provider extension can compile against public contracts without referencing the engine implementation assembly. This is the API half of the provider/server direction discussed in remote execution discussion #1909.

This is deliberately a draft for architecture review, not a request for immediate merge or publication. The companion engine draft #1917 activates provider discovery and routing; this API addition alone does not enable remote execution.

Change

  • Add the existing provider abstraction as a public API interface, retaining its NUnit.Engine.Services namespace alongside ITestAgentInfo.
  • Retain the suitability, acquisition and release shape using types already defined by this API assembly. Document query/ownership boundaries, release failure, and the distinction between stopping an agent and confirming external deployment cleanup.
  • Keep existing public members, target frameworks (net462 and netstandard2.0) and package dependencies unchanged. Add no engine implementation, transport or server dependency.

The companion engine removes its former internal definition, giving extensions and the engine one contract identity. Private prototype binaries compiled against the earlier engine-defined interface must be rebuilt; we are not claiming compatibility for that unpublished prototype ABI.

Validation

Against API main at 84ecdf43bb850d45a7ea2e345c8d6eac9b630096, on Windows with .NET SDK 10.0.402:

  • Complete API solution build: zero warnings/errors; both library targets built.
  • API tests: 69 passed / 0 failed on .NET Framework (net462) and 69 passed / 0 failed on net8.0.
  • An independent remote-provider extension compiled against the locally packed API rather than nunit.engine. Six boundary checks passed: API contract identity, no engine implementation reference from the extension, ordinary local packages declined, shared agency/extension identity, and no duplicate contract in the engine.

The test package has a distinct local-only version (4.0.0-beta.101.providerdraft.1); no public package or existing NuGet cache entry was replaced, and no package is being published by this PR. The companion engine describes combined execution testing separately.

Questions for review

Is this the desired public contract assembly/namespace and interface shape? Should the capability-information inheritance and release semantics be adjusted before publishing them? What coordinated API/engine version and integration sequence would you prefer?

No version bump is proposed here until that sequence is agreed. The engine companion remains dependent on this contract becoming available; the existing public beta.101 package cannot build that dependent change.

Prepared by Neil Colvin (@oznetmaster) with OpenAI Codex.

Co-authored-by: OpenAI Codex <noreply@openai.com>
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