You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add opt-in AppHost Server v2 to the CLI bundle - #20897
The Aspire CLI is the single entry point: aspire run / aspire start / aspire deploy. Each command uses the same application model; what changes is how that model is executed.
This PR introduces AppHost Server v2, separating application authoring from execution. AppHost code describes the application through generated ATS contracts. A separate, long-lived server owns the graph, pipeline scheduling, and workload lifetimes.
Architecture
The server's minimal-dependency kernel owns declarations, references, revisions, and execution authority. Integration-specific libraries stay outside it: portable modules compose the model in the guest, while integration hosts provide runtime services in separate processes. NativeAOT and build-time ATS generation keep runtime scanning and code generation off the execution path.
Authoring and execution have independent lifetimes. A guest can disconnect or submit a new revision without inherently restarting compatible workloads. The server validates and schedules pipeline steps; their integration-specific callbacks execute in the guest. Local execution uses DCP and the existing Dashboard. Deployment integrations, such as Compose, consume the same model without becoming part of the kernel.
Scope
Opt in per project in aspire.config.json:
{
"features": {
"appHostServerV2": true
}
}
Existing AppHosts continue using managed Hosting by default, with no change to its behavior.
The first CLI slice supports TypeScript/Node.js on Windows and Unix. The PR also includes standalone C# prototypes and side-by-side TypeScript/C# Compose integrations. Compose publishing and deployment are bounded, nonshipping demonstrations, not managed Compose parity. Automatic CLI reload, broader integration support, and formal security review remain follow-up work.
Real CLI validation covers run, detached start, publish, and deploy, including shutdown and Redis persistence. Linux NativeAOT and Windows named-pipe validation passed.
Add an isolated Native AOT resource core, unchanged managed Redis execution, a TypeScript Nuxt integration process, and a real workload/deployment-context harness. Record the ownership, orchestration, publishing, containment, and measurement limitations without changing production behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5232bd9d-6550-4411-a521-cd6be239f67e
Exercise native containers, database children, executable readiness, deferred values, restart persistence, and owner-scoped cleanup. Preserve a mixed path through the unchanged managed Redis integration and document the production gaps.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5232bd9d-6550-4411-a521-cd6be239f67e
Add run-only custom endpoints with owner/generation fencing, deferred URL consumers, command cancellation, DCP log observation, and owner invalidation. Exercise real DCP and HTTP forwarding with an explicit local CLI fixture; record live relay validation as blocked by expired authentication.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5232bd9d-6550-4411-a521-cd6be239f67e
Generate the real ATS guest SDK and static AOT dispatch from a minimal primitive contract. Replatform bounded Redis, PostgreSQL and Dev Tunnels integrations, exercise actual DCP workloads, and demonstrate guest graph replacement with persistent native server and integration host processes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5232bd9d-6550-4411-a521-cd6be239f67e
Integrate direct AOT-safe DCP bootstrap and execution-document cleanup, embed the offline ATS SDK, and reuse CLI process and session lifetimes through an explicit headless override. Add real CLI workload and failure scenarios, focused regression coverage, and runnable samples.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5232bd9d-6550-4411-a521-cd6be239f67e
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The override leaks into unsupported CLI operations, alters managed shutdown behavior, retains a DCP startup race, and leaves the principal PoC outside CI coverage.
Graph cleanup is fail-fast: one rejected monitor task or one failed tunnel deletion aborts releaseGraph, so later session-owned tunnels are never deleted. This is especially likely after a monitor transport failure. Settle monitor tasks and attempt every owned-tunnel deletion before reporting aggregate cleanup failure.
This discards the captured stream and marks stderr as Information. Native server and DCP failures are intentionally written to stderr, so CLI diagnostic files and extension forwarding will present failures as ordinary output. Preserve stream and map StdErr to LogLevel.Error.
Consolidate the native runtime into one AOT server project with generated ATS dispatch, DCP execution, and a Dashboard protocol adapter. Add server-owned workspaces, staged model revisions, stable resource executions, integration configuration acknowledgements, and ordered workload replacement. Cover actual guest reexecution, retained workloads and data, dependent endpoint rebinding, and cleanup with real CLI and Dashboard E2E fixtures.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5232bd9d-6550-4411-a521-cd6be239f67e
Implement the existing CLI backchannel on the native server, use source-generated wire DTOs and validated runtime policies, and launch the authenticated Dashboard through DCP. Fix playground composition, connection-material startup retries, integration registration, output bounds, and CI-owned coverage.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5232bd9d-6550-4411-a521-cd6be239f67e
Keep stop coordination connection-owned and bounded, align C# and TypeScript run lifetimes, and exercise run/start/publish/deploy in the real Compose smoke without changing managed Hosting behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a6644bf-9352-4988-b790-7b2c407f50c0
Pass the dashboard subcommand for the bundled managed DLL and cover every launch form. Stop the foreground smoke by AppHost PID so project-wide launcher cleanup cannot race its zero-exit assertion; keep project-wide shutdown coverage for detached start.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a6644bf-9352-4988-b790-7b2c407f50c0
…hots
Compare the bootstrap fingerprint with the exact embedded contract bytes before normalizing the build-specific identity for Verify.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a6644bf-9352-4988-b790-7b2c407f50c0
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the six shared compatibility surfaces for existing AppHosts. No concrete legacy regression identified. Final-revision official signing and layout validation remains recommended before merge.
Match the other bundled executables after the .NET 11 RC2 update so NativeAOT publish does not attempt to copy a missing XML documentation file.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a6644bf-9352-4988-b790-7b2c407f50c0
Documented the new opt-in features.appHostServerV2 config key in the CLI config settings table. Triggered signals: cli_command_file_changed (ConfigCommand.cs rejects project-only features with --global), new_package_added/new_hosting_integration_project (new Aspire.Hosting.Native.* projects), new_public_type, polyglot_code_generator_changed, target_framework_changed. The PR is draft/experimental, so only the user-visible config surface was documented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Aspire CLI is the single entry point:
aspire run/aspire start/aspire deploy. Each command uses the same application model; what changes is how that model is executed.This PR introduces AppHost Server v2, separating application authoring from execution. AppHost code describes the application through generated ATS contracts. A separate, long-lived server owns the graph, pipeline scheduling, and workload lifetimes.
Architecture
The server's minimal-dependency kernel owns declarations, references, revisions, and execution authority. Integration-specific libraries stay outside it: portable modules compose the model in the guest, while integration hosts provide runtime services in separate processes. NativeAOT and build-time ATS generation keep runtime scanning and code generation off the execution path.
Authoring and execution have independent lifetimes. A guest can disconnect or submit a new revision without inherently restarting compatible workloads. The server validates and schedules pipeline steps; their integration-specific callbacks execute in the guest. Local execution uses DCP and the existing Dashboard. Deployment integrations, such as Compose, consume the same model without becoming part of the kernel.
Scope
Opt in per project in
aspire.config.json:{ "features": { "appHostServerV2": true } }Existing AppHosts continue using managed Hosting by default, with no change to its behavior.
The first CLI slice supports TypeScript/Node.js on Windows and Unix. The PR also includes standalone C# prototypes and side-by-side TypeScript/C# Compose integrations. Compose publishing and deployment are bounded, nonshipping demonstrations, not managed Compose parity. Automatic CLI reload, broader integration support, and formal security review remain follow-up work.
Real CLI validation covers
run, detachedstart,publish, anddeploy, including shutdown and Redis persistence. Linux NativeAOT and Windows named-pipe validation passed.Related to #20873. See the App Model v2 specification for details. This PR remains draft.
Checklist
<remarks />and<code />elements on your triple slash comments?