Skip to content

Route configured remote requests through the built-in provider - #1934

Merged
oznetmaster merged 2 commits into
nunit:feature/remote-agentsfrom
oznetmaster:feature/remote-provider-endpoints
Oct 30, 2026
Merged

oznetmaster merged 2 commits into
nunit:feature/remote-agentsfrom
oznetmaster:feature/remote-provider-endpoints

Conversation

@oznetmaster

@oznetmaster oznetmaster commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Route explicitly configured remote requests through the built-in RemoteProcessAgentProvider. A package with no remote configuration keeps its normal local-process path; an invalid, unreachable or unsupported explicit remote request fails without local fallback.

The provider reads a bounded XML definition, qualifies advertised agent names, removes coordinator routing from forwarded packages and retains the originating client for each acquired proxy. Returning an agent uses that client even if its definition changes. A failed return retains ownership; a lost acquisition reply fences further allocation to that endpoint within the engine instance.

Runtime constraints are evaluated at the selected backend. Local leaves retain local availability checks, including within mixed packages. Explicitly remote unmanaged images are rejected before they can execute locally.

Current foundation

This refresh incorporates current main ac7c28c, including #1936's public provider contract, TestAgentService rename and coordinated API/agent dependencies: API 4.0.0-beta.101.2, Agent.Core 4.0.0-beta.6.2 and Extensibility/API 4.0.0-beta.6. The engine-local interface is not reintroduced. Five additional contract-identity tests from #1935 are retained here. Existing launcher/registration interfaces and wire command names stay unchanged.

The remote-provider changes were consolidated into commit 24d1a7c directly on main ac7c28c, with a Git tree identical to the previously tested and CI-passing head ebb5491. This PR now targets the upstream feature/remote-agents integration branch, created from main 437a8ec. The PR branch incorporates that base's README and workflow updates; no engine, Console or test source bytes changed in that update. CI is run on the resulting integration. The callback/task connection completion correction remains intact; it does not obtain or dispose a Task's borrowed AsyncWaitHandle. Its original Linux failure and the stress test that passed before the correction remain separate historical evidence.

Validation

  • Supported engine/Console target builds pass with repository analyzers, zero warnings/errors. Complete Windows engine suites pass 522 cases on net462 and 514 on net10.0, zero failures and 12 existing ignored/explicit cases each. Console suites pass 305/295, zero failures and four existing skips each.
  • On native Linux ARM64 and macOS ARM64, all 115 selected contract/ownership/exit/runtime/definition/completion cases and all 32 provider integration cases pass. The corresponding current-main production baseline passes its original 11 integration cases after removing only the fixture Ignore; the separate one-line re-enable PR is Re-enable provider server integration tests #1937. These results do not explain the earlier unexplained errors.
  • Sixteen direct Windows Console scenarios pass with unchanged released Framework/.NET 10 agent packages across all four Framework/modern host/backend combinations. Another sixteen pass using the newly rebuilt .NET 10 agent with public Agent.Core beta.6.2. Four local/remote execution, expected-failure and discovery cases also pass with each newly rebuilt .NET 8 and .NET 9 agent; result XML verifies CLR 8.x and 9.x execution.
  • Linux and macOS each pass four modern Console scenarios with the rebuilt .NET 10 agent: local control, remote exact pass, expected remote failure and discovery. Receipts verify the candidate engine hash, execution directory, acquired-agent counts, successful agent exits and owned server shutdown.
  • The Console source/parser is unchanged. A separate test-only project loader supplies routing and runtime settings. Native checks execute Windows-built managed payloads, not native source builds. ARM64 x86 launcher checks construct process settings only; they do not execute x86 agents.
  • Source whitespace checks pass and the complete update patch independently reconstructs the committed tree. Failed harness-staging attempts remain in the private receipts. They were corrected in the isolated test payloads, without NUnit package or production-source workarounds. Owned native agent processes are gone, the Linux VM is stopped and its coordination gate is released. No processor or physical device was contacted.

Remaining scope

This initial feature-branch implementation supports literal loopback endpoints and a provisional #1922-derived protocol. Authenticated LAN/WAN transport and a stable definition schema remain future work. It does not stage files or translate remote-only paths. The test server already has access to the assemblies and is explicitly started/stopped by the harness; permanent server installation is not required by the architecture.

The Console still pre-checks global --framework availability locally. Backend-only project/API constraints work; the CLI path needs a separate frontend/API decision. Production authentication/transport, deployment/temporary servers, recovery, lifecycle deadlines, evidence/reservations/restoration and refreshed adapter/GUI/physical-backend validation remain separate follow-ups. Historical prototype coverage is not substituted for those checks.

Prepared by Neil Colvin with assistance from OpenAI Codex.

@CharliePoole

Copy link
Copy Markdown
Member

Can you rebase on current main so we can see what changes are left?

Base the remote-provider draft directly on current main, including the public
provider API, ownership routing and TestAgentService rename. Keep explicit
remote requests from falling back locally and evaluate runtime constraints
at the selected backend.

Preserve the already-tested final tree while removing superseded foundation
commits and merge history from the review branch.
@oznetmaster
oznetmaster force-pushed the feature/remote-provider-endpoints branch from ebb5491 to 24d1a7c Compare October 29, 2026 22:51
@oznetmaster

Copy link
Copy Markdown
Collaborator Author

@CharliePoole, the branch is now a single commit directly on current main ac7c28c, with the superseded foundation commits and merge history removed. The remaining diff contains only the configured remote-provider work, its tests and documentation. Its complete Git tree is identical to the previously tested, CI-passing head ebb5491; this update changes history and the description, not source bytes. The PR remains a draft.

Prepared by Neil Colvin with assistance from OpenAI Codex.

@CharliePoole CharliePoole left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for clarifying.

@CharliePoole

Copy link
Copy Markdown
Member

@oznetmaster Would it be useful for us to create a long-running branch for the remote agent feature and merge your work periodically into it?

@oznetmaster

Copy link
Copy Markdown
Collaborator Author

@CharliePoole, yes, that would be useful. An upstream remote-feature branch would give us a shared integration point for small, reviewed changes while keeping unfinished functionality separate from main. We can regularly incorporate main and continue validating ordinary local execution alongside the remote cases. Would you like #1934 retargeted to that branch as the first contribution?

Prepared by Neil Colvin with assistance from OpenAI Codex.

@oznetmaster oznetmaster mentioned this pull request Oct 30, 2026
@CharliePoole

Copy link
Copy Markdown
Member

Yes, lets use #1934. I don't think you can merge into a non-existent branch but you can create it from main first. No need for another review for that.

@oznetmaster
oznetmaster changed the base branch from main to feature/remote-agents October 30, 2026 08:31
@oznetmaster
oznetmaster marked this pull request as ready for review October 30, 2026 08:31
@oznetmaster oznetmaster changed the title Draft: route configured remote requests through the built-in provider Route configured remote requests through the built-in provider Oct 30, 2026
@oznetmaster
oznetmaster merged commit 4d8ee98 into nunit:feature/remote-agents Oct 30, 2026
2 checks passed
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.

2 participants