David Fowler
90d · built 2026-11-30
Performance
What David Fowler shipped in the selected window, measured in ETV, and how it compares with the 90 days before it.
Effective capacity
+13.3engineers
delivers like 14.3 (14.3x pre-AI)
Output (ETV)
122.0ETV
+270.2% vs 32.9 prior
Features share
39.3%
−2.7 pp vs prior window
Fixes share
7.2%
−0.1 pp vs prior window
Work mix
39.3% Features2.7% Maintenance48% Tests2.8% Docs7.2% Fixes
173 commits over 90 days, ending 2026-11-30.
Where this dev ranks
Percentile against the global top-100 leaderboard (all-time totals).
- By commits
- Top 67 %
- By Features share
- Top 13 %
Daily performance
Daily ETV, stacked by Features, Maintenance, Tests, Docs and Fixes.
Repository spread
Where this developer's commits land. Concentrated work (top1 > 80%) vs polymath spread (top1 < 30%).
Most impactful commits
Top 10 by ETV in the last 90 days.
- 36.9ETVAdd opt-in AppHost Server v2 to the CLI bundle (#20897) ## 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`: ```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. Related to #20873. See the [App Model v2 specification](https://github.com/microsoft/aspire/blob/64e5860ad76ca05c743c9c5f1f3d57e00dd7c99c/docs/specs/appmodelv2.md) for details. This PR remains draft. ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - If yes, did you have an API Review for it? - [ ] Yes - [ ] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [ ] No - [x] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5232bd9d-6550-4411-a521-cd6be239f67e Copilot-Session: 7a6644bf-9352-4988-b790-7b2c407f50c0github.com-microsoft-aspire · f4ae2cc4 · 2026-10-21
- 26.1ETVAdd experimental native tray companion for macOS and Windows (#20096) ## Description Managing several AppHosts should not require repeatedly running `aspire ps`. This PR adds a native **macOS menu-bar and Windows notification-area companion**, backed by the invoking Aspire CLI rather than a separate/private CLI installation. The companion is C# NativeAOT using AppKit and Win32 directly. There is no Swift build, WebView, macOS .NET workload, Windows Forms, or third-party UI framework. The CLI supplies an opt-in, versioned discovery/health stream and exact-instance stop contract; existing unversioned consumers retain their behavior. Related to #20083. **The scope expanded in `bf72a532d9`: Windows now has a functional frontend and bundled payload, not a read-only scaffold.** This remains experimental, not a stable-release or completed-validation claim. See the outstanding Windows runtime and security validation below. ### User-facing usage After this PR's native archive jobs pass, install its CLI using the [PR dogfooding instructions](https://github.com/microsoft/aspire/blob/main/docs/dogfooding-pull-requests.md) in archive mode. Invoke that installation explicitly, rather than an older CLI on PATH: ```sh aspire tray start aspire tray start aspire tray stop ``` The first start extracts and launches the bundled companion; another start restores the existing icon without another watcher. Stop, or **Quit Aspire**, exits the companion and its discovery child, not the AppHosts. Starting from another CLI installation restores the running companion; stop and start to adopt the new CLI/bundle. Both frontends expose AppHost health, Open Dashboard, exact-instance Stop with a native default-Cancel confirmation, history, pinning, explicit Start for offline projects, folder/editor actions, Documentation, and About. Merely opening a submenu never starts an AppHost. History stores source paths and preferences, not process identities or dashboard login URLs. Missing pins are pruned; clearing recent history requires confirmation and preserves pins. **Upgrading an earlier preview:** quit it using its original CLI's `aspire tray stop` command or **Quit Aspire** before starting this build. The current macOS control socket and instance lock live under `~/.aspire/tray/runtime`; `~/Library/Application Support/Aspire/Tray/` is the legacy state/log location, not the active control endpoint. An older preview may use a different endpoint. Windows state and diagnostics live under `%LocalAppData%\Aspire\Tray`. ### Implementation - Native frontends live in `src/Aspire.Tray/`, with shared tests in `tests/Aspire.Tray.Tests/`. The projects use normal repository build, analyzer, versioning, and test conventions. - macOS payloads include `tray/Aspire Tray.app/Contents/MacOS/aspire-tray`. Windows x64 and ARM64 payloads include `tray/aspire-tray.exe` and the required adjacent `tray/Aspire.ico`. Payload verification runs before embedding. - Startup is acknowledged by the native UI loop. CLI/helper bundle leases cover the handoff until the GUI owns its lease; stop waits for the exact tray process lifetime. - A single CLI discovery process supplies replacement snapshots, resource-health summaries, and heartbeats. Stop revalidates path, PID, and process start time, without force escalation or project-wide fallback. Independent AppHosts can stop concurrently. - The Windows frontend owns native menus/icons, handles Explorer restoration and artwork invalidation, and uses current-user-secured singleton/control primitives. Windows x64 native smoke runs when the runner has an interactive Explorer/input desktop. Hosted Windows ARM64 UI smoke is temporarily excluded by explicit maintainer decision following the investigation below. Both unavailable desktops and the ARM64 exclusion are explicitly reported, not counted as UI coverage. - Official macOS whole-app signing/notarization and Windows executable signing are wired into packaging. Wiring is not evidence that release signing has been validated. ### Validation - **Earlier macOS build:** installed-artifact lifecycle, exact-stop safety, payload verification, and native smoke evidence is recorded in [the testing report](https://github.com/microsoft/aspire/pull/20096#issuecomment-5656474737). That report covers the earlier build, not the later Windows/UX expansion. - **Earlier local follow-up on Apple Silicon:** 189 tray tests passed (four Windows-only tests skipped), 252 tray-packaging/selector tests passed, and 320 targeted CLI tests passed (one case-sensitive-filesystem test skipped). Local Windows builds are not Windows runtime tests. - **Windows ARM64 investigation on `fbedb3e2fb`:** [same-runner ARM64 → x64 → ARM64 SDK controls](https://github.com/microsoft/aspire/actions/runs/35373950404/job/105696457894), with verified PE architectures and standard Windows artwork, all rejected `Shell_NotifyIconW(NIM_ADD)` with and without `NIF_SHOWTIP`, despite a responsive Explorer notification area. The actual Aspire ARM64 native smoke then failed registration too. The root cause remains unresolved; these results do not establish a defect specific to Aspire interop or prove a runner defect. - **Explicit temporary coverage reduction on `c68909d371`:** the maintainer approved excluding only hosted Windows ARM64 native UI smoke. [ARM64 publishing, payload verification, packaging and upload passed](https://github.com/microsoft/aspire/actions/runs/35377958296/job/105708101588), with an explicit warning and job-summary notice that native UI behavior was **not validated**. [Windows x64 native UI smoke and packaging passed](https://github.com/microsoft/aspire/actions/runs/35377958296/job/105708101710). The manual ARM64 smoke remains available; restoring hosted ARM64 UI coverage requires further investigation. The exclusion is not a fix for the registration failure or evidence of release readiness. ### Screenshots / Recordings > **This PR includes UI changes.** Screenshots/recordings of the current macOS and Windows menus, health/pinning/history, default-Cancel confirmations, and icon restoration are still needed. <!-- Add screenshots/recordings here --> ### Remaining validation and limitations - **Before shipping:** passing Windows ARM64 native UI smoke, Windows installed-bundle lifecycle coverage, real monitor/DPI testing, official signing/notarization/Authenticode validation, and formal security/threat-model review remain outstanding. Windows x64 fixture-based native smoke passed, but it does not validate live AppHost connectivity; Windows runtime validation is not complete. - Intel Mac runtime validation, login startup, automatic tray upgrade handoff, and long-running log management remain follow-up work. The CLI backend means one extra long-lived native process. - macOS icon recovery uses an undocumented AppKit saved-position preference and cannot guarantee visibility on crowded/notched menu bars. Very long home-directory paths can exceed the macOS socket-path limit. - Linux is unsupported. This experimental PR must not be read as a stable-release claim. ### Security considerations The same-user IPC endpoints, profile lock/state/log files, native process launching, persisted history, and bundle lifetime/signing paths require formal review. Control IPC uses current-user restrictions and fixed lifecycle messages plus process identity. Subprocesses use absolute executable paths and argument lists, not shell command construction. Dashboard URLs can contain credentials and are not persisted in history or raw discovery logs. Stop revalidates PID and lifetime and never escalates or falls back to every instance of a project. ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [x] Yes - New CLI commands and an opt-in wire contract; no hosting integration or supported .NET library API is added. CLI layout model types are executable implementation details. - If yes, did you have an API Review for it? - [ ] Yes - [x] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [x] No - [ ] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Sébastien Ros <1165805+sebastienros@users.noreply.github.com> Co-authored-by: Sebastien Ros <sebastienros@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mitch Denny <midenn@microsoft.com> Copilot-Session: c091eda9-8768-406b-bd20-d760fee3a090github.com-microsoft-aspire · 8eec461e · 2026-10-01
- 13.6ETVAdd polyglot hosting integrations through ATS projection (#16110) ## Description Part of #16220. Adds support for hosting integrations authored outside .NET through Aspire's ATS metadata, SDK generation, and runtime dispatch pipeline. A consuming AppHost gets normal generated builder methods, while the integration executes in its own runtime and configures the same .NET resource model as a managed integration. Integration-host ownership belongs to the AppHost server rather than the CLI. The CLI and server share process execution, command resolution, containment, and owner-liveness primitives instead of maintaining independent launching and polling implementations. The PR includes TypeScript-authored Kafka and Deno examples, plus a real, packable `@aspire/nuxt` preview integration. TypeScript integration hosting is implemented today. The metadata contract is intended to support other authoring languages without making the consumer depend on the integration's language. ### Architecture ```mermaid flowchart TB Config["aspire.config.json<br/>Managed packages + external integration entry points"] CLI["Aspire CLI<br/>Restore, bootstrap, session launch, diagnostics"] Guest["Guest AppHost<br/>Generated fluent SDK"] subgraph Server[".NET AppHost server process"] Session["Server session<br/>Integration discovery and supervision"] Managed["Managed integration assemblies<br/>AspireExport capabilities"] ATS["Merged ATS metadata<br/>Consumer SDK generation"] Dispatch["Capability dispatcher<br/>Shared handles and callback routing"] Model["Authoritative .NET resource model<br/>Resources, annotations, deferred configuration"] end subgraph External["External integration process scope"] Guardian["Server-owned guardian<br/>Parent liveness + OS containment"] Host["TypeScript integration host<br/>Generated runIntegrationHost runtime<br/>Author code + generated core SDK"] end subgraph Restore["Dependency-install process scope"] InstallGuardian["CLI-owned guardian<br/>Same shared supervisor and OS containment"] Npm["npm install<br/>Lifecycle scripts and workers"] end DCP["DCP / container runtime"] Workloads["Application workloads<br/>Nuxt, Deno, Kafka, backend services"] Config --> CLI CLI -.->|starts and owns| Session CLI -.->|starts guest runtime| Guest Session -.->|supervises| Guardian Guardian -.->|launches node --import tsx directly| Host CLI -.->|owns during integration restore| InstallGuardian InstallGuardian -.->|launches and contains| Npm Session -->|loads and scans| Managed Managed -->|capability metadata| ATS Host -->|getCapabilities| ATS ATS -->|generated SDK| Guest Guest -->|invokeCapability JSON-RPC| Dispatch Dispatch -->|in-process invocation| Managed Dispatch <-->|external invocation, core API calls, callbacks| Host Managed -->|configures| Model Model -->|workload orchestration| DCP DCP --> Workloads ``` Dashed arrows show process-launch and lifetime responsibility; solid arrows show metadata, invocation, or workload flow. The external host connects back to the server over authenticated JSON-RPC. The guardian is a separate supervisor process, not part of the integration's event loop. Application workloads created through the resource model belong to DCP/the container runtime, not to the integration host's descendant tree. The important separation is: - **CLI:** resolves configuration, restores dependencies inside a CLI-owned guardian scope, launches the server and guest AppHost, and retains linked diagnostics. It does not directly launch or supervise runtime integration hosts. - **AppHost server:** owns the resource model, managed integrations, external-host discovery and supervision, the merged ATS contract, and capability/callback routing. - **Integration host:** advertises its exported methods and executes author code against its generated core SDK. Resource handles refer back to server-owned objects; this is not a second resource model. The architecture document distinguishes this implementation from the future Native AOT direction. Today the single runtime representation is server-owned C# objects. The target is one ATS-native runtime model, backed by core C# primitives and consumed through language projections, not parallel CLR and ATS models. This PR does not implement that runtime or an AOT server. ### Authoring and invocation model Integration authors write ordinary TypeScript functions using generated hosting APIs. `AspireExport(metadata, function)` marks methods for projection, and `defineIntegration(...)` collects the package's capabilities. The generated SDK also emits `runIntegrationHost`, which handles connection setup, authentication, registration, metadata discovery, dispatch, and callback transport. Packages do not copy private RPC/bootstrap boilerplate. Integration hosts reuse the normal `AspireClient` transport for marshalling, structured errors, cancellation, and fluent work. Each export and inbound callback gets its own async promise scope, so unawaited fluent continuations complete before the request returns without making concurrent exports or reentrant callbacks wait on each other. Deferred guest callback relays survive export return and belong to both participating connections. Void guest callbacks apply returned positional DTO properties to the integration's original argument objects according to the callback projection. Non-DTO arguments and ordinary return-value callbacks are unchanged. For an exported integration, there is one delivery path regardless of the consumer's language: 1. The server gathers managed exports and the external host's capability metadata into one ATS context. 2. Codegen projects that context into the consumer's fluent SDK. 3. A generated call such as `builder.addNuxtApp(...)` reaches the server dispatcher, which forwards it to the owning integration host. 4. The integration uses its own generated core SDK to call managed hosting APIs and configure server-owned resources. Plain same-language helper libraries can still be imported and called directly. That library pattern does not need an integration-host process, but it also does not contribute exported methods to another language's generated SDK. ### Configuration and bootstrap External integrations currently use explicit entry-point paths in `aspire.config.json`. For the installed Nuxt preview package: ```json { "packages": { "Aspire.Hosting.JavaScript": "", "@aspire/nuxt": { "source": "npm", "path": "./node_modules/@aspire/nuxt/dist/src/host.js" } } } ``` Restore, run, and publish share a two-pass bootstrap: 1. A temporary server skips external hosts, generates the managed SDK, and allows the required dependencies to be installed. 2. That server is disposed before the final server starts the configured integration hosts, discovers their capabilities, and generates the combined SDK. The final SDK is not generated until every configured host has registered and completed capability discovery. Registration and discovery have per-host bounds; missing hosts, early exits, invalid metadata, and duplicate capability IDs fail startup rather than silently freezing an incomplete SDK. The server obtains launch commands through the language provider's optional, reflection-discovered JSON `GetIntegrationHostSpec()` hook. Launch metadata remains internal, without adding a new member or contract type to the shared `ILanguageSupport` interface. Paths resolve relative to the configuration file that declares them. Server-session configuration is parsed and validated once by `IntegrationHostConfiguration`. `IntegrationHostProcessLauncher` resolves commands and owns contained process creation through an injectable factory; `IntegrationHostLauncher` coordinates readiness, recovery, and shutdown. Failed launches dispose their executions, and launch plus cleanup failures retain both causes. Accepted RPC connections are closed and logged if service activation or connection setup fails. TypeScript hosts launch directly as `node --import tsx <entryPoint>`; there is no `npx`/`tsx` wrapper process. Command lookup fails with actionable installation guidance. Dependency installation uses the CLI's process factory, forwards both output streams, closes unused stdin, and verifies the complete guardian scope is gone before accepting npm's private completion status. ### TypeScript-authored Nuxt integration [`src/Aspire.Hosting.Nuxt`](https://github.com/microsoft/aspire/tree/davidfowl/ts-integration/src/Aspire.Hosting.Nuxt) contains `@aspire/nuxt@0.1.0-preview.1`, a TypeScript-authored npm package, not a C# wrapper or a NuGet integration. It is packable but has not been published to npm. Consumers install the tarball and explicitly configure its host entry point; npm registry discovery through `aspire add` is not implemented yet. ```typescript const api = await builder.addJavaScriptApp('api', '../api', { runScriptName: 'start', }).withHttpEndpoint({ env: 'PORT' }); const web = await builder.addNuxtApp('web', '../web') .withNuxtReference('apiBase', api.getEndpoint('http')) .waitFor(api); ``` `addNuxtApp` runs the development script locally and publishes Nitro's standalone `.output` with `.output/server/index.mjs` as the production entry point. `withNuxtReference` projects deferred endpoint references into Nuxt runtime configuration, so local endpoints become deployment-native addresses at publish time. Existing JavaScript hosting APIs remain available. The package includes its compiled implementation and generated core SDK. CI packs it, installs it into a separate consumer, runs a real Nuxt dev server and backend, verifies server-rendered backend data, then publishes, builds, and runs the generated production images. The sample is in `playground/NuxtApp`. Current prerequisites are Node.js 22.12+, a TypeScript AppHost, and Docker for production-image validation; Nuxt 4 with the Node-server Nitro preset is the validated scenario. The Deno example remains the deeper deferred-callback exercise: argument replacement, build tasks, Dockerfile generation/adoption, certificate trust, and executable debug metadata. Its state is stored as resource-attached annotations rather than in a process-local map of resource handles. ### Process ownership and recovery The current implementation launches each external runtime through a server-owned guardian. Unix containment uses a session/process group; Windows uses a kill-on-close job. The guardian watches the server's process identity independently of integration code, so a blocked Node event loop is not the only mechanism available for cleanup. Registration uses a fresh identity for each launch attempt. | Failure | Current behavior | |---|---| | Startup, registration, or discovery failure | Fail readiness, retain diagnostics, and clean up already-launched hosts. | | Callback-free integration runtime or guardian failure | Clean up the old scope before replacement; rediscover and validate the same capability IDs and projection signatures. Up to three retries with 1/2/4-second backoff. | | External capability stalls or its request is canceled | Bound the call, retire the connection, and clean up the old process scope before recovery. Never replay the call. Callback owners require session restart. | | Deferred guest callback stalls | Bound the relay, retire both connections, and require session restart to rebuild captured callbacks. | | Integration host that has contributed callbacks fails | Stop the AppHost session with explicit restart-required diagnostics. `aspire start` rebuilds the resource model and callbacks. | | AppHost server or owning CLI dies | End the session and reap the integration scope; recovery requires explicit restart. | | CLI dies during integration dependency installation | The independent guardian reaps npm, blocked lifecycle scripts, and descendants; the user explicitly reruns restore. | | Recovery budget exhausted or old-scope cleanup fails | Stop the session and surface the failure instead of starting another owner. | **Metadata rediscovery is not callback recovery.** Deferred callbacks capture the old connection and process-local callback IDs. A replacement host cannot reconstruct those closures merely by advertising the same methods. Callback admission is retired atomically with failure handling, and all admitted integration-owned delegates are conservatively treated as potentially persistent. Callback-free recovery preserves server-owned handles, not arbitrary integration-local state. In-flight calls fail and are never replayed because they may already have mutated the model. External invocations and callbacks each default to an independent one-minute deadline. The server setting `IntegrationHost:InvocationTimeout` accepts a positive `TimeSpan`, also configurable through `IntegrationHost__InvocationTimeout`. Registration/discovery, callback, shutdown/output-drain, and recovery policy are also configurable and validated centrally. Outer callback budgets must exceed inner invocation budgets when callback-free integration recovery is desired. An injected `TimeProvider` drives deadlines and recovery. Server/runtime diagnostics and startup profiling activities correlate invocation IDs, capability, connection, runtime PID, elapsed time, deadlines, cancellation, callback lifecycle, and cleanup/recovery. Responsive runtimes report their active phase every ten seconds; a blocked event loop remains bounded by the server deadline. Hosts advertising protocol version 2 receive correlation IDs; older hosts retain the two-argument wire shape without changing capability signatures. Guardian diagnostics use a structured `ILogger` bridge over inherited stderr, decoded by the owning process with the original severity preserved. Raw AppHost server stdout and stderr are retained at Debug in the CLI file log rather than printed during normal usage; collected startup failures are surfaced at Error. Expected launch cancellation is Debug, and malformed guardian records produce a warning while remaining available through ordinary stderr forwarding. Diagnostics do not add authentication tokens or invocation payloads. The process plumbing is source-shared across the net11 CLI and net10 AppHost server. `ChildProcess` owns the common graceful-shutdown ladder, bounded force escalation, contained descendant-cleanup verification, output draining, and process-handle disposal. The CLI's `ProcessExecution` supplies its existing command-wide shutdown window and process-tree signaler rather than implementing another ladder. `ProcessScope` only retains ownership and the root-exit signal; it no longer implements OS termination or cleanup deadlines. Contained cleanup also works without that wrapper or after guardian death. Shutdown policy is evaluated when teardown begins, and cancellation plus termination failures retain both causes. The guardian establishes Unix process-group or Windows kill-on-close-job containment and independently monitors owner liveness using the existing stable-identity parent monitor. Its runtime cleanup uses the same shared execution. Windows batch formatting is also shared with the net8/net472 MSBuild task. Cleanup failures are logged and prevent replacement; operation and cleanup errors are retained together. Automatic full-session replay and transparent callback rebinding are not implemented. Intentionally escaping the guardian's process scope is unsupported. Persistent containers are an explicit workload policy, not proof of integration-process cleanup. Authoring providers beyond TypeScript and richer custom-resource/package-manager support are outside the scope of this PR. ### Supporting hosting APIs - **Resource-scoped annotations:** stable annotation IDs and typed JSON payloads, with generated serialized-annotation capabilities and TypeScript helpers. Bare resource handles work in deferred callbacks, not only builder handles. - **Deferred argument replacement:** `CommandLineArgsEditor.clear()` lets a callback recompute final arguments after configuration is complete. - **Certificate and debug projection:** runtime-specific certificate environment variables and VS Code executable launch metadata without exposing the corresponding generic .NET APIs directly. - **Callback and handle transport:** integration-owned callback execution, uniquely identified connection-owned deferred guest callback relays, recursive handle wrapping, and shared server-owned handle resolution across integration connections. - **AppHost-relative paths:** `builder.appHostDirectory()` separates application paths from the integration package's own working directory. ### Security considerations External integration hosting executes project-configured packages and entry points, accepts authenticated integration registrations, and routes callbacks and shared resource handles. Opaque random handle IDs prevent sequential enumeration; passing a handle delegates access to its object. These mechanisms are not a sandbox for locally running integration code. Configuration/package trust, command arguments, registration and callback ownership, annotation access, and process containment still require a threat model and security review before release. ### Validation Current head: **`6d3a718b3e`**. [Matching-head CI run 37637520546, attempt 2](https://github.com/microsoft/aspire/actions/runs/37637520546/attempts/2) completed successfully: **336 passing checks and six skips**, with no pending or failed checks. Both Windows/Linux RemoteHost suites and all nine hostile lifetime E2Es passed. Guest callback relays now honor `IntegrationHost:CallbackTimeout` independently of external capability invocation deadlines, including their structured diagnostics and surfaced timeout errors. **Current CI retry caveat:** the extension Windows producer failed restoring `supports-color` from the internal npm feed with HTTP 429, so downstream extension E2Es could not download the `aspire-extension` artifact. Separate hosting failures were MongoDB replica readiness, a Windows file-app marker read blocked by a file lock, and a Windows rebuild-command state assertion (expected 2, actual 3). The callback fix did not modify those tests or extension inputs. Both a failed-jobs rerun and a targeted extension-producer rerun were initially rejected by GitHub with HTTP 500; a later failed-jobs rerun was accepted and passed. No code or assertions changed for the retry, and its success does not establish the causes or prove those failures fixed. The previous merge head **`4c0e1a09d4`**, merging `main` at `809a672cc4`, passed [CI run 37575522858, attempt 3](https://github.com/microsoft/aspire/actions/runs/37575522858/attempts/3): **337 passing checks and six skips**, with no pending or failed checks. The generated CLI resource conflict is reconciled with one accessor for each of the 59 resource keys, including the integration-feature message. **Merge-head retry caveat:** the macOS CLI suite hit the ten-minute hang watchdog, with process escalation, a PowerShell telemetry hook, and a Git process test still running. The Windows Blazor release-configuration test failed twice deleting a locked temporary directory; that test is unchanged from `main`. Repository automatic retries passed on the same commit. No product code or assertions changed for these retries, and their success does not establish the causes or prove either failure fixed. The previous head **`05bf5e4915`** passed [CI run 37532173488, attempt 2](https://github.com/microsoft/aspire/actions/runs/37532173488/attempts/2): **337 passing checks and five skips**, with no pending or failed checks. That head added runtime-only E2E routing for the generated TypeScript resources, with focused cases for all four current inputs. **Previous-head retry caveat:** the first attempt's Windows Hosting-1 job lost communication with the hosted runner. The repository's automatic same-commit retry passed. No product code or test assertions changed, and the runner annotation does not establish the underlying cause. The implementation head **`6bf02c798e`** passed [CI run 37524173726, attempt 2](https://github.com/microsoft/aspire/actions/runs/37524173726/attempts/2): **337 passing checks and five skips**, with no pending or failed checks. Windows/Linux/macOS CLI suites, Windows/Linux RemoteHost suites, and all six native CLI archive builds passed. [All nine hostile lifetime E2Es executed and passed on `6d3a718b3e`](https://github.com/microsoft/aspire/actions/runs/37637520546/job/112853203760), with zero failures and zero skips, verified in the job log. These cover actual runtime, guardian, server, CLI, and dependency-installer crashes, deferred callback ownership, stalls, bounded recovery, diagnostics, descendant cleanup, and no side-effect replay. **Previous implementation-head retry caveat:** `6bf02c798e` attempt 1 reported two Linux tray-watch assertions (expected exit code 0, actual 7), a Windows registration/discovery test timeout, and an Azure Functions stop timeout. The repository's automatic retry passed on the same commit. No code or assertions changed for that retry, and its success does not establish the underlying causes or prove those intermittent failures fixed. Current local validation: | Coverage | Result | |---|---| | RemoteHost | 634 passed, zero skips, on `6d3a718b3e`, including configured callback deadlines and shared .NET 10 lifetime/shutdown-failure cases. | | Callback/invocation deadlines | Three regressions failed before the fix. All five focused deadline cases passed 20 repeated runs afterward: 100 executions, zero skips. These use an injected fake clock and real in-memory JSON-RPC connections, not wall-clock sleeps. | | CLI | 6,888 passed, 54 platform skips, on merge head `4c0e1a09d4` in a complete serial run using the repository's CI timeout budgets. Earlier default-parallel local runs encountered command/discovery timeouts and a stall; they are not claimed as passing. | | Infrastructure | Earlier implementation-head coverage: 1,477 passed in the full run; all eight initially failing summary-tool cases passed separately after excluding stale generated sources from child builds through the environment. This is not a full-suite result for the merge head. | | Trigger-map selectors | 304 passed, zero skips, on merge head `4c0e1a09d4`, including the four generated-runtime routing regressions. | | JavaScript | Previous-head coverage: 197 passed across eight files, including actual callback-wrapper DTO round trips with serialized requests and responses. The RPC connection in these unit tests is mocked; this suite has not been rerun on the merge head locally. | | TypeScript code generation | 136 passed on merge head `4c0e1a09d4`. | | Local Linux lifetime E2Es | Earlier local execution was blocked during Docker image preparation because the shared Docker VM disk was full; no current local E2E pass is claimed. All nine scenarios passed in matching-head CI as recorded above. | The new process cases cover cancellation and disposal through the same shared graceful budget, signalling failure diagnostics, cancellation/termination error preservation, and direct contained-execution cleanup without `ProcessScope` after guardian death. CLI cases also verify that shutdown policy is evaluated at teardown rather than construction. Previously pushed head **`50f202c19d`** passed [CI run 37505069826, attempt 2](https://github.com/microsoft/aspire/actions/runs/37505069826/attempts/2): 337 passing checks and five skips, with all nine lifetime E2Es executed. Attempt 1 had Deno fixture startup failures with a DCP SQLite `SQLITE_BUSY` error; the same-code retry passed. That is historical evidence, not validation of the current shutdown changes. An earlier Windows starter `FailedToStart` also passed on retry without an established cause. Earlier macOS diagnostics captured process-wait lock contention, and earlier process-tree termination investigation is tracked by [dotnet/runtime#131944](https://github.com/dotnet/runtime/issues/131944). Current results are not a claim that an upstream runtime issue was fixed. The removed playground script test used fake CLI/compiler permutations rather than exercising real restore/typecheck behavior; real playground and Nuxt validation remain the relevant evidence. No Markdown test documentation was added. Focused TypeScript compilation of the changed runtime and integration-host tests passed in earlier validation with explicit test dependency resolution. The standalone project's broad typecheck had generated-playground-module/import-resolution and ESLint typing issues; it is not claimed as passing. Earlier Redis/Kafka/Deno run and Docker Compose publish evidence is retained in the [cross-platform validation report](https://github.com/microsoft/aspire/pull/16110#issuecomment-5687089189). Validation covers the stated run, publish, and process-recovery scenarios; complete dashboard coverage and cloud deployment validation are not claimed. Package publishing/discovery and trust productization are deliberately deferred. Design details: [`docs/specs/polyglot-integrations.md`](https://github.com/microsoft/aspire/blob/davidfowl/ts-integration/docs/specs/polyglot-integrations.md) and [`docs/specs/polyglot-apphost.md`](https://github.com/microsoft/aspire/blob/davidfowl/ts-integration/docs/specs/polyglot-apphost.md). ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [x] Yes - If yes, did you have an API Review for it? - [ ] Yes - [x] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [x] No - [ ] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No The new public surface is exported ATS capabilities, generated language APIs, and the TypeScript integration-authoring/preview-package API. CLR hosting adapters remain internal; the shared `Aspire.TypeSystem` contract and generated CLR API baselines are unchanged. The triple-slash checklist is not applicable to the new TypeScript APIs. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Sebastien Ros <sebastienros@gmail.com> Copilot-Session: f534a1fc-0aa1-47f3-8d3e-73aaf5088a66 Copilot-Session: 73357635-b9b6-41bc-b3f9-b18cac70b36cgithub.com-microsoft-aspire · 517d5662 · 2026-10-09
- 4.0ETVAdd optional parameters and programmatic value setting (#18108) ## Description Parameters currently do not have a complete first-class model for two related scenarios: optional parameters that can intentionally have no value, and programmatic parameter values that can be set by AppHost code instead of only through configuration, prompts, or generated defaults. This change adds both pieces so run, publish, dashboard, C# AppHost, and TypeScript AppHost flows share the same parameter value contract. Users can now mark parameter resources optional with `WithOptional()` / `WithRequired(...)`, allowing unset optional parameters to resolve to `null` without prompting or blocking publish. Users can also inspect and set parameter values programmatically with `TryGetCurrentValue(...)` and `SetValueAsync(...)`; observed parameter updates synchronize dashboard state, resolve missing-value prompts, and preserve required-parameter validation when a required parameter is cleared. The implementation centralizes value state on `ParameterResource` and refactors `ParameterProcessor` to consume that public/resource-level contract instead of manipulating internal completion state directly. ATS and TypeScript generation expose the value-management APIs, including nullable value metadata for `setValueAsync` and `tryGetCurrentValue`. ### User-facing usage C# AppHost: ```csharp var messagePrefix = builder.AddParameter("message-prefix") .WithOptional(); if (!messagePrefix.Resource.TryGetCurrentValue(out _)) { await messagePrefix.Resource.SetValueAsync("local"); } ``` TypeScript AppHost: ```typescript const messagePrefix = await builder.addParameter("message-prefix").withOptional(); if (await messagePrefix.tryGetCurrentValue() === null) { await messagePrefix.setValueAsync({ value: "local" }); } ``` The TypeScript validation AppHost exercises inspection, assignment, clearing, and required toggling against the generated SDK./ ### Validation - `./build.sh --build /p:SkipNativeBuild=true /p:RepositoryCommit=$(git rev-parse HEAD)` - `dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class "*.AddParameterTests" --filter-class "*.ParameterProcessorTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"` - `git diff --check` Fixes #17710 ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [x] Yes - If yes, did you have an API Review for it? - [ ] Yes - [x] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [x] No - [ ] No - Does the change make any security assumptions or guarantees? - [ ] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [ ] No - [x] No --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mitch Denny <midenn@microsoft.com> Copilot-Session: c63c476d-a728-4c18-9ad1-1f283254aa4agithub.com-microsoft-aspire · 682f6abc · 2026-10-12
- 3.7ETVAdd Foundry Toolbox resource and deploy pipeline (#17742) * Add Foundry Toolbox resource and deploy pipeline Adds first-class Microsoft Foundry Toolbox support to Aspire.Hosting.Foundry. Toolboxes are a Foundry data-plane construct (no ARM/Bicep) that bundle tools for agents. Aspire now models them as a resource that is created via the AgentToolboxes data plane API at deploy time, after the parent project's endpoint becomes ready. Public API: - FoundryToolboxResource (parented to AzureCognitiveServicesProjectResource, implements IResourceWithConnectionString) - AddToolbox extension on the project resource builder - WithWebSearchTool, WithMcpTool, WithAISearchTool tool-definition extensions Deploy is wired as a PipelineStepAnnotation so it runs alongside Azure ARM provisioning: a publish-mode deploy step and a run-mode before-start step that both call AgentToolboxes.CreateToolboxVersionAsync once the project endpoint is reachable. Retries with Polly handle the brief window where the freshly provisioned project endpoint is still warming up. Polyglot (TypeScript): AddToolboxForPolyglot and WithMcpToolForPolyglot use AspireExport/AspireUnion so the TS apphost can call addToolbox, withMcpTool, withWebSearchTool, and withAISearchTool with TS-friendly union types. Validated end-to-end against a real Azure AI Foundry account: the deploy hook fired in 3.4s after the project reached Running, and the toolbox was confirmed present on the data plane (toolboxes API returned field-tools, default_version 1). 102/102 tests pass in Aspire.Hosting.Foundry.Tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * [debug] dump env var state to diagnose CI-only Toolbox test failure Temporary instrumentation in AsHostedAgent_ResolvesToolboxConnectionString to capture python app + hosted agent + project env vars and annotations into the assertion failure message. To be reverted once the CI vs local divergence is identified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Seed APPLICATION_INSIGHTS_CONNECTION_STRING output in toolbox resolution test AsHostedAgent_ResolvesToolboxConnectionString was failing on CI (Windows + Ubuntu) with `InvalidOperationException: No output for APPLICATION_INSIGHTS_CONNECTION_STRING on resource my-project`. AzureHostedAgentResource.GetResolvedEnvironmentVariablesAsync walks every env var callback on the target resource. On CI the python app picks up extra WithReference(project)-style callbacks that splat AzureCognitiveServicesProjectResource.GetConnectionProperties() (Uri / ConnectionString / ApplicationInsightsConnectionString) as MY_PROJECT_* env vars. Those references resolve through BicepOutputReference, which throws if the named output is not seeded on the test resource. The test is only asserting on ConnectionStrings__field-tools, so unrelated extra env vars should not break it. Seed APPLICATION_INSIGHTS_CONNECTION_STRING (in addition to the existing endpoint output) so every project output reachable through GetConnectionProperties() can be resolved. Also drops the temporary diagnostic dump that was wrapped around the assertion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add MCP auth/headers and auto-derived publish deps for FoundryToolbox Two follow-ups to the Foundry Toolbox MCP integration: 1. FoundryToolboxMcpToolDefinition now exposes AuthorizationTokenExpression and a case-insensitive Headers dictionary. ToProjectsAgentToolAsync resolves both at deploy time and forwards them to ResponseTool.CreateMcpTool so private MCP servers behind a bearer token or custom headers can be wired up declaratively. The new WithMcpTool(..., configure) overloads thread an optional configuration callback so callers don't have to grab the resource to mutate the tool definition. 2. FoundryToolboxResource now installs a PipelineConfigurationAnnotation that walks each MCP tool's EndpointExpression via IValueWithReferences and wires the toolbox deploy-compute step to depend on the deploy-compute step of every referenced compute resource that lives in the app model. This removes the manual WaitFor(...) ordering caveat for the common case where an MCP tool points at a sibling project/container/app service. Run-mode waits are filtered to resources that implement both IComputeResource and IResourceWithWaitSupport so we don't hang on Azure-only or model-only resources that never publish a Running state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add TS Foundry Toolbox + auth MCP playground sample Adds an end-to-end playground showcasing the new polyglot auth/headers support on FoundryToolboxMcpToolOptions: * WithMcpToolForPolyglot now accepts an optional FoundryToolboxMcpToolOptions (AuthorizationToken, Headers), projected onto the existing .NET configure callback so polyglot AppHosts can wire bearer-token / custom-header MCP servers without dropping to C#. * playground/FoundryAgentToolboxTs/ - a TypeScript AppHost (apphost.mts) that wires a Foundry agent + Toolbox to a custom Node MCP server which validates Authorization: Bearer <token>. A secret mcp-bearer-token parameter is fed into both the MCP server (env var) and the toolbox tool definition (authorizationToken), with an extra x-app-source custom header to exercise the headers feature. * The MCP server uses @modelcontextprotocol/sdk with the streamable HTTP transport, exposes lookup_employee and record_note tools, and was smoke-tested end-to-end (init handshake, tools/list, tools/call) with bearer auth enforced. NuGet.config and 13.5.0-dev pins are temporary until this PR ships in a release of Aspire.Hosting.Foundry; the README documents the dev-loop workflow and the cleanup steps. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Bypass ModelReaderWriter.Write for OpenAI Responses tools in polyglot AppHost The natural FoundryToolbox{WebSearch,Mcp}ToolDefinition.ToProjectsAgentToolAsync implementation goes through ResponseTool.Create*().AsAgentTool(), which internally calls ModelReaderWriter.Write<T> on an OpenAI.Responses tool. In a normal .NET process this works. In the polyglot (TypeScript) AppHostServer, IntegrationLoadContext loads probe assemblies into a separate ALC, and the prebuilt host's System.ClientModel 1.10.0 ends up bound to OpenAI in the default ALC while the integration's System.ClientModel 1.11.0 lives in the probe ALC. The two SCMs surface as distinct CLR assemblies, so the IPersistableModel<WebSearchTool> interface check inside ModelReaderWriter.Write fails with a misleading 'must implement IEnumerable or IPersistableModel<T>' exception.`Fix: stop calling MRW.Write across the ALC boundary. Both definitions now hand-build the OpenAI Responses wire JSON and feed it to MRW.Read<ProjectsAgentTool>(..., AzureAIProjectsAgentsContext.Default), which stays inside a single ALC (BCL + Azure.AI.Projects.Agents + probe-ALC SCM). Wire shapes match openai-dotnet's McpTool.Serialization.cs and WebSearchTool.Serialization.cs.`Also widens the polyglot WithMcpToolForPolyglot union to accept ReferenceExpression so TS apphosts can use refExpr to compose URLs like \ efExpr\\/mcp\\.`Validated end-to-end against playground/FoundryAgentToolboxTs deployed to Azure: aspire deploy completes deploy-field-tools cleanly and the resulting toolbox version contains both {type:web_search} and the full MCP tool with auth + headers.`Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Flesh out TS Foundry Toolbox sample with dev tunnel + publish-mode topology Iterates on playground/FoundryAgentToolboxTs to exercise the full bearer-auth MCP path against a real Foundry data plane:`- apphost.mts: dual run/publish topology. In run mode the local MCP server is fronted by an Aspire dev tunnel so the Foundry data plane can reach it; in publish mode it deploys as a NodeApp container with public ingress and the toolbox points at its public ACA endpoint. Documents the Foundry data-plane inline-auth gap inline. - mcp-server/src/server.ts: bearer auth middleware + request logging so we can verify whether the Foundry proxy is forwarding the Authorization header. - scripts/invoke-toolbox.mjs: standalone Node consumer that creates a Foundry agent against the deployed toolbox and runs a thread end-to-end. Useful for smoke-testing toolbox deploys without the dashboard. - NuGet.config / aspire.config.json: add Aspire.Hosting.DevTunnels and Aspire.Hosting.Azure.AppContainers package mappings.`Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Harden Foundry Toolbox deployment Add ownership-aware, idempotent Toolbox version reconciliation; remove unsupported inline MCP authentication; add unit, polyglot, and Azure deployment coverage; and remove the temporary authentication playground. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address Foundry Toolbox review feedback Make search connections deterministic, serialize tool names, close the initial-version promotion race, reject local MCP endpoints, document Toolbox usage, and extend Azure Search deployment coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Complete Toolbox review coverage Require Azure AI Search index names and role assignments, align resource-name comparison, cover MCP serialization and polyglot options, and complete Toolbox documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address Toolbox endpoint review feedback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Harden Toolbox MCP endpoint validation Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Complete Foundry Toolbox lifecycle support Add existing-resource modes, full tool authoring metadata, concurrency checks, and live deployment verification. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Support complete MCP approval filters Preserve tool-name and read-only selectors in both custom approval branches. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix Toolbox Search identity grants Emit Foundry project Search roles directly and harden the two-deployment test timing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Prevent concurrent Toolbox default overwrite Require the default observed during reconciliation to remain unchanged before promotion, including initial creation races. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Retry Toolbox tool discovery Poll the MCP tools list within a bounded timeout to account for Foundry provisioning consistency. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Complete Toolbox reconciliation safeguards Verify reused defaults, suppress Search provisioning in existing mode, and send the negotiated MCP protocol version. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix Toolbox consumer lifecycle and access Grant consumers Foundry User access, isolate Toolbox readiness from parent provisioning, and require Search discovery in deployment coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Wait for Toolbox tool readiness Probe authenticated MCP discovery before publishing Running and correct Foundry User diagnostics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Harden Toolbox discovery retries Retry transient tool discovery failures, scope consumer access to the project, and complete Toolbox API documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fail Toolbox on terminal MCP dependencies Observe terminal dependency states so Toolbox readiness and waiting consumers fail promptly instead of hanging. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Validate Toolbox consumer version pins Verify an explicitly pinned immutable version still exists after managed reconciliation so deployment cannot report success with an unusable consumer endpoint. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Probe the reconciled Toolbox version Keep consumer version pins independent from readiness by probing the immutable version selected by reconciliation against the newly modeled tool names. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Complete Toolbox tool metadata Add Azure AI Search descriptions to the public API, canonical wire payload, configuration hash, documentation, and deployment coverage. Correct MCP server label documentation and tolerate Foundry's documented transient tools/list HTTP 500 response in the deployment test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Follow Toolbox discovery pagination Accumulate every tools/list page in the live deployment assertion and restart discovery cleanly after documented transient server errors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Clarify Toolbox Search index prerequisite Document that Azure AI Search Toolbox tools require a pre-existing populated index and do not provision index content. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Allow Search RBAC propagation Give the deployment test an isolated ten-minute budget for Azure Search role assignments to propagate before reporting a focused timeout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Require every Toolbox MCP server Keep mixed Toolboxes in readiness until built-in tools are present and each configured MCP server label contributes at least one discovered tool. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address Toolbox review feedback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: tommasodotnet <tstocchi@microsoft.com>github.com-microsoft-aspire · 5eaf4313 · 2026-09-08
- 3.0ETVSupport environment-specific Aspire secrets for deployment (#20135) ## Description Deployment workflows need to configure secrets and parameters ahead of time instead of relying on Development-only user secrets, interactive prompts, or process environment variables. This change lets users set, get, list, delete, and locate AppHost secrets for a selected environment with `--environment` / `-e`. `aspire secret list --all` shows secrets across environments, including JSON output grouped by environment. Secret commands continue to default to Development. Secrets are stored in Aspire-owned files at `~/.aspire/secrets/<apphost-id>/<environment>.json`. Hosting loads the selected file below environment variables and command-line arguments in configuration precedence, while preserving `IUserSecretsManager`. Deployment pipeline commands pass the selected secrets file; run passes the AppHost identity so Hosting chooses the file after launch profiles determine the final environment. Existing Development .NET user secrets are imported when the Aspire file does not exist. TypeScript AppHosts retain their synthetic identity. If a .NET project initializes its user-secrets ID after deployment secrets have already been written, all synthetic environment files are migrated, preserving existing canonical values and retiring source files only after successful saves. Fixes #17184 ### User-facing usage ```bash aspire secret set Parameters:api_key staging-secret --environment Staging --apphost apphost.cs aspire secret get Parameters:api_key --environment Staging --apphost apphost.cs aspire secret list --all --format json --apphost apphost.cs aspire deploy --environment Staging --non-interactive --apphost apphost.cs ``` The same secret commands support TypeScript AppHosts: ```bash aspire secret set MyConfig:ApiKey staging-ts-secret --environment Staging --apphost apphost.mts aspire secret list --all --apphost apphost.mts ``` Relevant excerpts from the built CLI's `aspire secret set --help` and `aspire secret list --help`: ```text Usage: aspire secret set <key> <value> [options] -e, --environment <environment> The AppHost environment whose Aspire secrets file is used. The default is 'Development'. Usage: aspire secret list [options] --all, --all-environments List secrets from all AppHost environment Aspire secrets files. --format <Json|Table> Output format ``` ### Breaking changes AppHost secrets written by Aspire now live in Aspire-owned files rather than the legacy .NET user-secrets file. After import, changes to existing keys in the legacy file do not override values in the Aspire file. Scripts or tooling that directly read or update the old file should use `aspire secret` and `aspire secret path` instead. Legacy Development configuration remains a lower-precedence fallback. ### Security considerations Security review is needed for the new per-environment plaintext secrets storage and migration behavior. Files live under the user's profile; path segments are sanitized, writes use same-directory temporary files and replacement, and Unix secret files/directories receive owner-only permissions. This is not encrypted storage or a remote secret vault. `secret get` and `secret list`, including `--all`, intentionally display secret values. Environment isolation, configuration precedence, legacy deletion behavior, and migration failure handling have regression coverage. No threat model or dedicated security review has been completed. ### Validation - 91 CLI regression tests passed across secret commands, store resolution, deployment, and run commands. - 93 Hosting tests passed across builder/configuration, user-secrets management, and deployment-state behavior. - Both Docker E2Es passed against the updated branch CLI and local Hosting package: - `SecretDeploymentEnvironmentLoadsSelectedAspireSecretsFile`: environment-specific CRUD/listing, a non-interactive Staging deployment pipeline, and run with a Staging launch profile overriding an ambient Development environment. - `SecretCrudOnTypeScriptAppHost`: secret CRUD and separate Staging/Production values and listings. - E2Es used a cached Linux ARM64 test image for both scenarios after Docker registry DNS prevented rebuilding the base images. The TypeScript run therefore does not establish SDK-free coverage. - Verified generated secret-command help and `git diff --check`. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - If yes, did you have an API Review for it? - [ ] Yes - [ ] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [ ] No - [x] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mitch Denny <midenn@microsoft.com> Copilot-Session: 3abd620c-c593-4bad-bf18-95d5cc37b600 Copilot-Session: e197b322-6470-4d6a-bae2-e215a0ee2f2dgithub.com-microsoft-aspire · d751daa0 · 2026-10-14
- 2.5ETVDeprecate Aspire.AppHost.Sdk (ASPIRE012) (#20867) ## Description Deprecates `Aspire.AppHost.Sdk` and migrates the default C# AppHost experience toward explicit packages, Project Resource v2 (`AddDotnetProject`), and the CLI bundle. Addresses #20594; **not yet feature complete**. ### Implemented through `3efe19d5ef52f2243a0ac9e5123311199f962ed4` - Retains the functional obsolete SDK, including original `ProjectReference` resources. `ASPIRE012` is suppressible through `SuppressAspireAppHostSdkObsoleteWarning` or `NoWarn`; no removal date is promised. - Establishes `IsAspireHost` from the AppHost package without requiring a test/user-injected property. Preserves the file-based AppHost's non-AOT behavior. - Defaults the workload compatibility version to the actual AppHost package version. Pinned CLI selection independently follows that package, even with an older retained SDK. - Preserves `ASPIRE007` for pre-9 SDKs that cannot set the new marker. - Documents the required `Aspire.Hosting.Dotnet` migration dependency, file-based migration, resource-build tradeoffs and behavioral verification; adds a migration-assistance skill. - Strengthens regression assertions to reject empty/unsubstituted versions and exercise package props rather than injecting `IsAspireHost`. - Converts C# project/file templates and CLI init to explicit AppHost/Dotnet packages; starter services use `AddDotnetProject` paths. Preserves non-C# defaults. - Recognizes and updates package-only AppHosts without restoring the obsolete SDK or removing the explicit AppHost package, including CPM and persisted channel/version configuration. - Makes the CLI bundle required by default for C# AppHosts. Disabling it produces unsuppressible `ASPIRE010`; SDK-warning suppression does not opt out of the bundle. - Uses real native runtime packages in template tests, covers runtime-only Dotnet consumers in CI with/without project-graph analysis, and removes duplicate test-target imports that blocked CI setup. - Recognizes unrestored package-only AppHosts while respecting explicit `IsAspireHost=false`. Shares metadata parsing between discovery and the .NET runner. - Uses evaluated imported package references for updates, rejects `PackageReference Update` as a discovery marker, and parses complete directive lines rather than commented/embedded examples. - Preserves MTP test commands during metadata-only CI enumeration, keeps the extension scenario's required bundle enabled, and stores native template payloads under the harness cleanup root. - Preserves full updater support for F#/VB, versionless SDK directives, and evaluated imported SDK declarations. Updates imported SDK/package declarations in place without introducing duplicate references. - Limits discovery and single-file rewrites to active directive preambles, preserving examples in multiline comments and strings. - Aligns archive deployment fixtures with package-only templates; retained-SDK lanes explicitly restore SDK and resource `ProjectReference` items. Prepares the complete native bundle in each isolated extension home. - Preserves malformed/trailing-token and uppercase package-directive lines during cleanup; only complete valid directives are removed. - Uses package-only C# scaffolding for Aspire 17+, retaining SDK-based scaffolding for earlier versions instead of requesting an unpublished Dotnet integration. - Updates imported legacy SDKs that lack the evaluated SDK-use marker, without treating inactive shared SDK imports as package-only projects' SDK declarations. - Preserves inactive project-local SDK imports in package-only C#/F#/VB AppHosts. Automatic SDK rewrites are limited to unconditional declarations; ambiguous conditional SDKs fail explicitly before edits. Diagnostics use the CLI localization resources. - Migrates the FileKeyRef fixture to `AddDotnetProject`, explicitly opts the EF fixture into its existing experimental v2 API, and removes the Deno fixture's assumption that generated AppHosts contain an SDK directive. Deployment failures capture Compose logs before cleanup. ### CPM guidance documented in `d26c77bd620fdd3fafd5629f0c1026774d78027d` Generated explicit-package AppHosts require manual CPM adjustment: centralize AppHost/Dotnet versions and remove `Version` from their package references, retaining the explicit AppHost reference. Matching central versions alone do not prevent `NU1008`. Packaged baseline comparisons confirmed previously working SDK-only AppHost cases are newly affected; the baseline Redis starter already fails under CPM. David's [accepted team guidance](https://teams.microsoft.com/l/message/19%3AuuDJgMCR7JeFSM-0RK2xRW5mAq2WFNfUK0TLmYDvAU01%40thread.tacv2/1791757040412?groupId=f2e0b0b6-f130-46fa-8ec6-2ef4a7168ed2&parentMessageId=1791622155244) retains the template/CPM convention until further notice. The migration guide documents the expanded limitation rather than changing template policy. A conditional-reference candidate passed five local restore/build/start/stop scenarios but remains unpublished; those results do not qualify the published templates. ### Recorded decisions and ownership - **D003, accepted:** Damian Edwards directed retention of the obsolete but functional SDK, original C# project resources, suppressible build warning and coordinated SDK/AppHost targets. [Team decision](https://teams.microsoft.com/l/message/19%3AuuDJgMCR7JeFSM-0RK2xRW5mAq2WFNfUK0TLmYDvAU01%40thread.tacv2/1791646379788?groupId=f2e0b0b6-f130-46fa-8ec6-2ef4a7168ed2&parentMessageId=1791622155244). - **D004, accepted:** David Fowler directed extension of this PR and ownership of **all** follow-up template/default/bundle work. [Owner direction](https://teams.microsoft.com/l/message/19%3AuuDJgMCR7JeFSM-0RK2xRW5mAq2WFNfUK0TLmYDvAU01%40thread.tacv2/1791650382170?groupId=f2e0b0b6-f130-46fa-8ec6-2ef4a7168ed2&parentMessageId=1791622155244). That work remains in scope, not unassigned or disclaimed. - **D005/D008, pending:** Explicit deprecation/migration sign-off and coordinated `microsoft/aspire.dev` branch/review/publication guidance remain unanswered in [the existing request](https://teams.microsoft.com/l/message/19%3AuuDJgMCR7JeFSM-0RK2xRW5mAq2WFNfUK0TLmYDvAU01%40thread.tacv2/1791649965862?groupId=f2e0b0b6-f130-46fa-8ec6-2ef4a7168ed2&parentMessageId=1791622155244). Adjacent docs PRs microsoft/aspire.dev#1853 and #1804 require coordination, not duplicate writes. - **D006/D007, accepted delivery gates:** Required human approvals/green CI and explicit sign-off, coordinated public docs, and all relevant merges are required. Merge is **not** final acceptance: after official internal daily artifacts publish, the coordinator must start a **new session**, verify their source SHA includes all merged changes, and manually qualify the official new/migrated AppHost and CLI journeys. Local builds and PR dogfood do not replace that gate. ### Validation and remaining gates **Latest continuation:** `bb5a4d0cd343c7c7cadfe7316a4430bd6a47b643` removes only the repo-local migration skill and updates the migration guide; production code, templates and tests are unchanged against `d26c77bd`. Following [David's location request](https://github.com/microsoft/aspire/pull/20867#discussion_r4244039948), [microsoft/aspire-skills#93](https://github.com/microsoft/aspire-skills/pull/93) extends the existing migration skill with separately approved, exact-package-capability-gated SDK removal. CODEOWNER reviews are requested; exact current validation is below. The companion is draft/unmerged/unpublished and adds a tracked delivery gate. New source-head checks are not inferred from the previous green run. **New-head native qualification (`bb5a4d0cd`):** production CLI reports `17.0.0-pr.20867.gbb5a4d0c`; native `11724922206`, managed `11724946316`, and Linux RID `11724214237` archives were independently downloaded, SHA256-matched against GitHub metadata and ZIP-integrity checked. A fresh generated explicit-package/AddDotnetProject starter started healthy API/frontend resources with real HTTP and correct Reference/WaitFor relationships. The authenticated rendered Dashboard reported `"Rebuild" succeeded`; API HTTP afterward and CLI restart succeeded. Production `aspire update --channel pr-20867` preserved the AppHost project byte-for-byte and persisted its channel/version. After update/restart the rendered frontend showed five forecasts loaded through the API service. Bundle opt-out still fails ASPIRE010 despite NoWarn; invalid bundle path fails ASPIRE009; normal build then succeeds with zero warnings/errors and unchanged source. All task-owned AppHosts were stopped. Local certificate exceptions and explicit NuGetAudit=false remain qualification limitations, not official-daily acceptance. **Current checks:** source CI [38198464573, attempt 4](https://github.com/microsoft/aspire/actions/runs/38198464573/attempts/4) is **completed/success** at exact `bb5a4d0cd343c7c7cadfe7316a4430bd6a47b643`. Fully paginated settled results conserve **418 unique completed jobs: 415 success / 3 skipped**, all at this head/attempt, with no failures or running jobs. Repository automation initiated the retries; this worker requested none. **Original failures, retained as history:** attempt 1 failed Windows Hosting, Windows Dashboard.Components and macOS CLI. Windows recovery expected POST/GET but observed no requests (482 passes/1 failure/2 skips); Linux reproduction initially had 5 passes/1 same-symptom failure in a different theory case. Exact base `a1f8cbd` passed all six; subsequent current/base runtime controls passed six each. This does not prove Windows root cause or baseline causality, and no timeout/assertion weakening was published. The Dashboard chart-filter-open assertion failed (746 passes/1 failure); its unchanged test passed locally. macOS CLI hung for ten minutes with three unfinished tests; 6420 passes/49 skips/0 assertion failures plus one runner error was **not** a suite pass. The final retry's success does not establish the original failures' causes. Original failed-job artifacts `11723833975`, `11724428662`, and `11725065389` were independently downloaded, digest/head/ZIP-verified and their TRX counters/assertions inspected. Exact-base [main CI `38099325878`](https://github.com/microsoft/aspire/actions/runs/38099325878) attempt 1 was fully paginated (338 unique, same-head completed jobs): both current failing Windows lanes passed at base. The base macOS CLI lane also hung, but with different unfinished tests; that does not establish the current hang's cause or justify dismissing either Windows failure. The Dashboard assertion passes in both current and unmodified base local builds. Harness side effect: default starter generation also installed agent skills/hooks globally; that side effect was not isolated. No known pre-state exists for those shared files, so they were not blindly reverted. **Companion checks:** current `965767d7abb44de8183ba492b3af3026e727d70c` applies the owner-approved correction to exactly the router and migration executor values, from unsupported `gpt-5.6-sol-fast` to `gpt-5.6-sol`. Parsed specs were independently compared: judge, thresholds, stimuli/fixtures, trial counts and guards are unchanged. **52 focused tests and 377 exact-commit full Node tests pass**; GitHub lint and all three platform test+bundle checks pass. The [actual agent-eval gate](https://github.com/microsoft/aspire-skills/actions/runs/38204985764/job/114666377185) completed **success**, with **51 executed/graded trials and no execution/grading infrastructure errors**. Migration passed **24/24, score 100% at unchanged 100% threshold**; router passed **26/27 cases, aggregate 97.53% at unchanged 70% threshold**. Both SDK capability/approval guard cases passed with empty workspace patches. Downloaded result artifact `11727331701` independently matched GitHub SHA256 `d4083d79112d603d85fd7c4721a44f12a5eef69a9b91d6849a2bed41a6538920`, source head and ZIP integrity; raw trial conservation/grades and the repository integrity checker were verified again locally. Local authenticated reproduction remains enterprise-DNS-blocked; hosted actual behavior is now verified within this scoped gate. **Explicit eval limitation:** router case `should_trigger_08` activated `aspire-init` for read-only `aspire doctor` instead of the contract's `aspire-orchestration`. Both unchanged skills document doctor. This is not an all-individual-cases pass or full-nightly-suite acceptance; no grader/threshold was weakened and no unrelated routing rewrite was mixed into SDK delivery. **Configuration decision and human IDE check:** [main's actual nightly eval](https://github.com/microsoft/aspire-skills/actions/runs/38117249387) at `da1230ca` failed on the same old executor, including original migration cases. David's later, independently verified 04:20 UTC "Yep do it" approved the exact two-setting proposal and supersedes his earlier conditional maintainer hold for this correction. Approval and calibrated confidence were communicated in the authorized Teams thread before the edit. This is configuration permission, not PR review/merge approval or deprecation sign-off. No judge/threshold/fixture/trial/guard weakening or manual CI retry was requested. Damian's planned Windows/Visual Studio try-out remains a human qualification gate, not satisfied by Windows CI or Linux manual results. **Owned publication follow-up:** the current installer and embedded snapshot still pin skills `v0.0.3`, whose digest-verified archive does not contain the new SDK migration reference. Merging/publishing #93 alone will not update this pinned CLI payload. This owner retains the source follow-up: after approved companion publication, use the existing attestation-enforcing updater to refresh the archive/metadata, installer version, project resource and telemetry hooks, then qualify the resulting source head. Default bundle support remains `>=13.5.0 <13.7.0`; remote and remote-origin cached bundles enforce it, while embedded-origin bundles explicitly skip compatibility. Current embedded fallback success is not proof of remote CLI17 compatibility. Do not bypass attestation or silently widen the whole bundle's support claim. **Fresh `d26c77bd` compatibility and E2E:** installed the production native PR CLI/hive and independently rechecked native archive `11717736089` SHA256 `1226001c9b51d4d7367f0544727db916a7b0f288ca3956a764764fdfbbbec25d`. The generated AddDotnetProject starter started both services with working HTTP/health/references/waits, rendered authenticated Dashboard, successful Dashboard Rebuild, HTTP after rebuild, resource restart and graceful stop. Genuine released CLI13.6.1 ran this new explicit-package starter and SDK17 with an original AddProject resource; the PR CLI ran unchanged SDK13.6.1 with an original resource and working HTTP. A CLI-only upgrade does not rewrite SDK/resources or introduce the new SDK's ASPIRE012. These are tested combinations, not universal old-version support. **Retained coverage and human review:** the two unchanged legacy resource classes passed **90/90**, the SDK target class passed **69 with 3 Windows-only skips**, and both runtime-consumer selector tests passed. AddProject is not newly deprecated by this PR. [Selector rationale](https://github.com/microsoft/aspire/pull/20867#discussion_r4244335575), [measured helper-library run-hook rationale](https://github.com/microsoft/aspire/pull/20867#discussion_r4244335667), and [skill-location response](https://github.com/microsoft/aspire/pull/20867#discussion_r4244370626) are posted. The three human threads remain unresolved; replies are not acceptance or approval. **Fresh qualification limitations:** full restore failed first on audit connectivity and then feed downloads; focused builds used explicit `NuGetAudit=false` and a build-only HTTP/2 workaround. Initially leaking that workaround into AppHost runtime broke Dashboard gRPC; removing it and restarting produced the fresh GUI results above. No vulnerability-audit success, full cross-platform/extension GUI, Windows debugger correction, full Kubernetes/FileKeyRef/Deno deployment, or official-daily acceptance is claimed. The scoped plugin migration was exercised manually in the current Copilot host, not via a separate Vally agent-output evaluation. All task-owned AppHosts were stopped and known process IDs verified absent. [Substantive Teams answer](https://teams.microsoft.com/l/message/19%3AuuDJgMCR7JeFSM-0RK2xRW5mAq2WFNfUK0TLmYDvAU01%40thread.tacv2/1791773933006?groupId=f2e0b0b6-f130-46fa-8ec6-2ef4a7168ed2&parentMessageId=1791622155244) was posted and independently read back. **Previous runtime-head CI:** [CI run 38180555189, attempt 3](https://github.com/microsoft/aspire/actions/runs/38180555189) is **completed/success** at exact head `d26c77bd`, confirmed independently from the workflow resource and PR checks; both final aggregates succeeded. Smaller-page pagination independently conserved **418 unique completed jobs: 415 success / 3 skip**, all reporting attempt 3 and the exact head. This was an externally triggered retry, not requested by this worker. The advisory Windows debugger limitation below is not erased by green checks. Human approving review, explicit deprecation/migration sign-off, coordinated public docs, companion-skill delivery and official-daily acceptance remain required. **Native updater evidence (`d26c77bd`):** production `aspire update` on the migrated package-only project succeeded, preserved its `Microsoft.NET.Sdk` and explicit AppHost/Dotnet references byte-for-byte, and persisted PR channel/version configuration. The updated project built successfully. A duplicate-cased local NuGet config from fixture setup caused the first explicit failure; removing that duplicate corrected it. **Exact-package negative diagnostics (`d26c77bd`):** disabling the bundle fails with `ASPIRE010` even with `NoWarn=ASPIRE010`; a nonexistent bundle path fails with actionable `ASPIRE009` installation/path guidance. Both nonzero outcomes were asserted. The subsequent normal build succeeds with zero warnings/errors and the project remains unchanged. **Exact-head production native evidence (`d26c77bd`):** Linux CLI archive `11717736089`, managed packages `11718275023`, and RID packages `11717586279` were downloaded and their SHA256 values matched GitHub metadata. Installed CLI reports `17.0.0-pr.20867.gd26c77bd`. Original template generation, real `AddDotnetProject` service startup/HTTP, authenticated rendered Dashboard, Dashboard Rebuild success and HTTP after rebuild, native restart/stop, retained-SDK original `ProjectReference` resources, and explicit-package migration startup/HTTP/rebuild succeeded. All task-owned AppHosts were stopped. SDK acquisition initially hit stale source mapping; the verified SDK was then cached and normal resolution succeeded. These use the preview SDK, explicit runtime root and `NuGetAudit=false`; they do not qualify vulnerability audit, full extension GUI, cross-platform behavior or official daily artifacts. **Historical review/CI state at `d26c77bd`:** earlier inline threads were addressed and resolved, before the three subsequent human questions recorded above. This is not an approving review. Previous runtime-head CI succeeded as recorded above, not qualification of the new documentation-only head. Historical attempt-1 Linux tray-watch and Windows Kubernetes recovery failures were tested against merge `3eeac162` into base `a1f8cbd`; the relevant production/test paths are unchanged against that base. Local focused tray cases (4), full tray class (34), recovery cases (3), updater class (128), and package marker/AOT cases (2) passed. Those focused results do not establish Windows reproduction or unrelated-baseline causality; the successful external retry does not explain the original failures. **Exact-head extension evidence:** Linux edge-cases job `114594546086` independently confirms the required `gd26c77bd` bundle and **6 passing** UI scenarios, including debugger-install guidance with the AppHost source closed. Windows browser-debugger job `114594546186` finished with **7 passes / 1 failure**: standalone Blazor WASM root-session attachment timed out. The workflow explicitly makes completed failures in this lane advisory under #20117; its successful job status is **not** an all-scenarios pass. **Historical qualification correction:** attempt 1 settled at **418 jobs: 411 success / 4 failure / 3 skip** (two actual test failures and two aggregates), before the successful external attempt 3. This worker did not request either retry. Full local CLI scheduling reproduced the tray exit-code failure that focused runs missed. That run had **7,085 passes / 45 failures / 57 skips**, including missing shell prerequisites and privileged-filesystem assumptions, and is not a suite pass. The full SDK target class passed **69 / 3 Windows-only skips**. The documented manual CPM adjustment builds with the exact-head packages. No speculative cancellation patch, test weakening or template-policy change was published. **Current source evidence (`3efe19d5e`):** updater/parser/locator tests passed **285 / 3 platform/filesystem skips**. A real package-only AppHost with an inactive project-local SDK import built successfully; source CLI update preserved its active AppHost package and inactive import byte-for-byte. A real active conditional SDK **13.6.1** produced the documented explicit manual-edit error without changing the source. These use matching `8cf28660d` packages with the corrected source CLI, not a final-head native binary. Deployment test-project build and Deno E2E TypeScript compilation passed; compilation is not full deployment or GUI acceptance. **Earlier imported-SDK evidence (`8cf28660d`):** the focused classes passed **277 / 3 skips**, covering imported marker-absent SDKs and inactive shared imports, but not the project-local conditional-import bug fixed above. Real imported SDK **13.6.1** migrated successfully with the corrected source CLI, including restore/build and ASPIRE012. The broader project-class selection had **1,140 passes / 2 failures / 4 skips** in untouched process-shutdown and root-permission tests; not a full-suite pass. **Scoped native evidence (`8cf28660d`, not final HEAD):** Linux archive `11695117081` and matching packages `11695056414` matched their GitHub SHA256 metadata; the installed CLI reported `17.0.0-pr.20867.g8cf28660`. The corrected EF fixture compiled, generated its migration bundle, and published Compose output. Full deployment failed: captured PostgreSQL and Dashboard logs explicitly report **No space left on device**. This is an environment-blocked failure, not a pass. FileKeyRef deployment and actual Deno GUI/debugger qualification remain pending. **Earlier source evidence:** `4c1687cc1` focused discovery/parser/updater/new/init/template tests passed **664 / 3 skips**; trigger-map infrastructure tests passed **156** before its directive-casing-only change. Source-built CLI `0da548f42` generated an SDK-based `13.6.1` AppHost against the stable feed; restore, startup, authenticated Dashboard inspection, describe and graceful stop succeeded. These remain historical evidence, not final-head native qualification. **Production native evidence (`56ebe3bfa`, not current HEAD):** verified Release native archive `11693801830` and matching packages `11694316113` passed **7/7** archive scenarios and **2/2** C# channel-update scenarios. Manual package-only AppHost/API startup, authenticated Dashboard rebuild, CLI resource restart/update/stop, retained-SDK migration preserving original project resources, both ASPIRE012 suppression mechanisms, and explicit migration to `AddDotnetProject` all succeeded. Missing-resource restart and bundle opt-out failed explicitly as required. Both live AppHosts were stopped. These results do **not** qualify subsequent cleanup/stable-template/imported-SDK commits. **CI/infrastructure evidence and limitations:** `56ebe3bfa` run [38117084347](https://github.com/microsoft/aspire/actions/runs/38117084347) selected all **101 test projects / 11 job categories**, without skipped/unattributed projects. Downloaded Hosting shard counters were **174 passed / 2 not executed / 0 failed**; this is one shard, not complete partition/execution conservation. Logs verify tested merge `82ca627` into base `a1f8cbd`, explaining tests absent from the older local base; DevTunnels, Windows Kubernetes recovery, Windows child-process and macOS telemetry failures are in unchanged paths relative to that actual base, not proven PR regressions. The stable C# Smoke failure's captured diagnostics identified unpublished `Aspire.Hosting.Dotnet@13.6.1`; this is corrected by the source/runtime qualification above. Prior CI ultimately had **342 success / 8 failure / 66 cancellation / 2 skip** jobs; it was not green. Prior-head `8cf28660d` [CI run 38120117496](https://github.com/microsoft/aspire/actions/runs/38120117496), attempt 1, had **418 jobs: 409 success / 6 failure / 3 skip**. Four actual failures were Linux CLI's tray-watch test, EF deployment, FileKeyRef deployment, and Linux Deno debugger; the other two failures were aggregates. The three fixture failures' source causes are corrected above; the unchanged tray-watch failure has no demonstrated PR-specific cause. Later attempts were observed, not requested by this worker. Final-head CI and Linux native/migration/dashboard evidence are recorded above; full cross-platform GUI and official-daily acceptance are not inferred. Prior `4c1687cc1` [run 38118765689](https://github.com/microsoft/aspire/actions/runs/38118765689) and earlier local CLI results were not green acceptance. Local extension GUI remains blocked by VS Code download DNS/socket failures; local Kubernetes failed before scaffolding during KinD startup. **Earlier evidence below is historical, not replacement-worker or latest-head acceptance.** The single owner retains all remaining qualification and follow-up scope. DamianEdwards's human review request was posted and independently verified; no approval is inferred. Reconstructed SDK tests passed **67 / 3 Windows-only skips** and selected CLI discovery/init/update/template tests passed **604 / 3 platform/filesystem skips** against the integrated production changes. Warning/suppression tests now require successful builds, and file-based package props explicitly assert `PublishAot=false`. The CI import failure was reproduced by evaluation and corrected at source. Coherent `17.0.0-issue20594` packages were produced at `e82f4e7f`; the template harness passed **3 real build/start/stop scenarios** covering CPM and retained SDK with/without an explicit AppHost reference, then passed all three again after the cleanup-root changes now persisted at `1ed3f183`. These use actual native Dashboard/DCP packages and isolated pinned SDKs, supplying real bundle paths and suppressing only CLI delegation so the harness controls process lifetime. The follow-up discovery/runner/updater/parser checks passed **492 / 3 skips**, including first-restore, explicit opt-out, imported-package, commented-directive and metadata-update regressions. Extension E2E TypeScript compilation passed; this is not a GUI scenario pass. Both CI-failing test projects now compute their MTP run command with a deliberately nonexistent tasks assembly, while the bundle remains enabled. Hosting MSBuild passed **29 / 2 Windows-only skips** unchanged after removing a verified stale generated attribute file that caused the earlier 13 failures. Expanded trigger routing passed **156** invariants. Standalone exact-head native CLI publication at `75e78efd` passed; embedded publication previously exited 137 and is retrying serially against `1ed3f183`. Full CLI/embedded-bundle/new-service/migration/dashboard-UX qualification remains in progress. Audit connectivity warnings `NU1900`/`NU1905` remain visible and do not establish a successful vulnerability audit. Earlier retired-environment results are **not** current evidence. Full integrated E2E/UX, Windows-specific behavior, required CI, human approval, explicit deprecation sign-off, coordinated docs publication and new-session official-artifact acceptance remain outstanding. Bot reviews and product decisions are not PR approval. ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] No. Follow-up changes expected within this owner's scope. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - [x] No --------- Co-authored-by: David Fowler <davidfowl@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>github.com-microsoft-aspire · 3569705e · 2026-10-12
- 1.8ETVGive the Deno AppHost inspector attach the AppHost startup budget (#21604) ## Description Fixes #21603. That issue is the Windows `launch-profiles` flake "debugs a Deno AppHost through the built-in JavaScript debugger", #5/#7 on the 7-day top-flakes list in #21600. **Root cause.** - To debug a Deno AppHost, the extension launches `deno run --inspect-wait=127.0.0.1:<port> ...` through js-debug (`pwa-node`) with `attachSimplePort`, but never sets `timeout`. - js-debug's default 10s budget starts before it spawns `deno.EXE`, so it has to cover both the spawn and the inspector bind. On a slow Windows runner it fails the launch with `Could not connect to debug target ... Could not find any debuggable target`. - js-debug only owns the runtime after it attaches, so Deno stays blocked in `--inspect-wait` forever. The CLI shows "Connecting to AppHost..." until the test's 300s deadline, and teardown hits `EBUSY` on `DenoAppHost`. **Fix** (`extension/src/debugger/languages/node.ts`) - **Bounded attach timeout.** A Deno AppHost debug launch sets the js-debug `timeout` to `denoAppHostInspectorAttachTimeoutMs = 120_000`. An explicitly configured `timeout` (for example from the `debuggers` launch-configuration overrides) is preserved. This is deliberately separate from the CLI's 24h debug startup budget, which exists for breakpoints after attach, not for an inspector that never opens. Run (no-debug) launches and Deno *resource* launches are unchanged. There is no added sleep or retry: js-debug still polls every 200ms and attaches as soon as Deno is ready. - **Stop runtimes left in `--inspect-wait`.** A `pwa-node` adapter tracker watches the launch response and session stop, and a pending-start cancellation stops the session when the owning Aspire session shuts down. If js-debug never attached, cleanup finds every extension-host descendant started with the unique `--inspect-wait=127.0.0.1:<port>` argument (covering the `cmd.exe` + `deno.exe` pair from a `deno.cmd` shim, including after the shim exits) and stops it. - Cleanup runs inside the owning session's shutdown, so a restart or workspace deletion does not race the live process. - Cleanup confirms exit from a later listing. A failed listing is never treated as empty, and a PID is only signalled when a successful listing matched it. - On Linux/macOS the listing only has pids, so each candidate's command line comes from `getProcess`. A failed lookup marks the PID **unidentified**: it is not signalled and does not count as gone. It is confirmed exited only when a later listing no longer shows it (which also drops the exited `ps` helper every POSIX listing includes) or when a lookup finds the process gone (`ENOENT`/`ESRCH`). Unidentified PIDs are followed into later lookups, so a runtime reparented when its wrapper stops is not lost. An empty result is final only if spawning had settled before that listing began. Anything still unconfirmed fails the cleanup, which is retried on the next shutdown. - **Internal console only.** A Deno AppHost debug launch always uses js-debug's `internalConsole`; a `console` override such as `debuggers.apphost.console: integratedTerminal` is ignored with a logged warning. A terminal would start Deno outside the extension host's process tree, where cleanup cannot find it, and bypass `outputCapture`. Other Deno and Node launches keep their configured console. - A never-ready inspector logs a localized error naming the address and timeout. Other launch failures keep js-debug's own reason. ### Evidence **CI denominator.** ci.yml from 10-24 to 10-31, attempt-1 runs, excluding runner loss (#21570): | Runs | Failures with this signature | |---|---| | Windows `launch-profiles` (401) | 16 (4.0%), across 13 branches | | Windows, main only (55) | 3 | | Linux `launch-profiles` (406) | 0 | **Real-component repro (Linux).** I used js-debug v1.140.0, real Deno 2.9.0 and a real `aspire init --language typescript` AppHost, with a `deno` wrapper that delays the exec: | Delay | `timeout` | Result | |---|---|---| | 12s | default (10000) | **3/3 fail** with the exact CI error, and `deno run --inspect-wait` is left orphaned | | 12s | 120000 | **3/3 attached** (13.1–13.3s) | | 25s | 120000 | attached (26.7s) | ## Confidence - **Behavior and regression coverage.** - `nodeDebugger.test.ts` covers: - the 120s default and a preserved explicit timeout; - non-Deno and no-debug launches leaving `timeout` unset; - Windows-shim and POSIX process matching; - late-appearing runtimes, a runtime orphaned by its shim, and launches that can no longer spawn; - failed listings and reused-PID safety; - failed POSIX `getProcess` lookups, both permanent and transient, and confirmed-gone lookups; - the exited `ps` helper that every macOS listing includes; - Deno spawning while the launch finishes during a lookup; - an unidentified runtime reparented when its wrapper stops; - the Deno AppHost forced to `internalConsole` for `integratedTerminal`, `externalTerminal` and unset, while non-AppHost launches keep a configured console. - `nodeInspectorAttach.test.ts` drives VS Code's real js-debug through these cases: - a delayed-ready inspector, which attaches; - a never-ready inspector, which fails after at least 2s, names the address, and stops the process; - cancellation while waiting and during the launch request; - shutdown of the owning Aspire session; - a launch with a missing executable; - a POSIX runtime whose command line can't be read: cleanup rejects, leaves the runtime alive, then stops it on retry; - a never-ready inspector with `console: integratedTerminal`, which stops the runtime. - `aspireDebugSession.test.ts` covers awaited and retryable cleanup during shutdown. - Each fix was verified to fail before and pass after. The fix for unreadable process details failed on 7dac4b23a with "Missing expected rejection" and a never-stopped runtime. The `ps` helper test failed on 4db5f2962 with the helper left unidentified. The spawn-race and reparenting tests failed on 6137935bf with Deno never stopped. On 7453b0982 the console tests failed: the e2e `integratedTerminal` never-ready test timed out with the runtime left in `--inspect-wait`, and the three configuration tests kept the terminal console. - **Tests and pipelines run.** - Locally, on VS Code 1.131 on Linux, the Node Debugger (including nodeInspectorAttach), AspireDebugSession, Deno, Bun and strings suites pass: 307 tests, 0 failures. `tsc` and `eslint src` are clean. - CI "Final Results" on the current head, c825421f8, [passed](https://github.com/microsoft/aspire/actions/runs/41947995866/job/127000122728). - CI "Final Results" on the previous head, 7453b0982, [passed](https://github.com/microsoft/aspire/actions/runs/41774667761/job/126401996768) on the first attempt with no red checks. The [Windows extension unit-test job](https://github.com/microsoft/aspire/actions/runs/41774667761/job/126392664014) reported 4115 passing, 0 failing and 9 pending. - **Build artifacts.** The extension bundle builds locally with webpack. On 7453b0982, CI's [E2E prerequisites job](https://github.com/microsoft/aspire/actions/runs/41774667761/job/126398031992) packaged `aspire-extension.vsix` (67 files, 2.45 MB) and the production VSIX (67 files, 2.43 MB), and the E2E matrix ran against them. - **E2E experience.** - On d0f6ddd87, real Deno 2.9.8 ran through the extension host. The generated configuration was `timeout: 120000` with `run --inspect-wait=127.0.0.1:<port> -A apphost.mts`. js-debug attached in about 0.46s, and stopping the session terminated `deno`. - CI extension E2E on 7453b0982: every Windows and Linux shard passed. [Windows `launch-profiles`](https://github.com/microsoft/aspire/actions/runs/41774667761/job/126399025549), the shard that originally flaked, passed "debugs a Deno AppHost through the built-in JavaScript debugger" (115.8s). [Linux `deno-debugger`](https://github.com/microsoft/aspire/actions/runs/41774667761/job/126399025412) also passed. **How we stop this recurring:** js-debug attach waits are now explicit and bounded for Deno AppHosts. A runtime left waiting for a debugger is always stopped, or reported and retried, instead of silently orphaned. The Deno AppHost always runs in the internal console, where cleanup can find it. Real-js-debug tests guard the delayed, never-ready, cancelled, terminal-console and unreadable-process paths on every extension CI run. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - [x] No **🤖 Posted by AspireAgent (AI Agent)** --------- Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>github.com-microsoft-aspire · 9b353dde · 2026-11-05
- 1.7ETVAdd TypeScript Azure Functions app support (#17980) ## Description This adds a proof-of-concept path for Azure Functions apps that are not .NET projects, starting with TypeScript and JavaScript on the Node worker. The goal is to let a TypeScript AppHost model, run, publish, and deploy a TypeScript Azure Functions app the same way it models the rest of a distributed app. The change introduces a directory-based Azure Functions app resource, local Core Tools launch behavior, and deterministic Dockerfile publishing for TypeScript/JavaScript Functions containers. VS Code debugger support was split into the stacked follow-up #20943 so the hosting and deployment support can land independently. A new playground sample demonstrates the scenario end to end: a TypeScript AppHost, TypeScript Azure Function, Azure Storage dependency, and Vite TypeScript frontend. Locally, the frontend proxies `/api` to the Aspire-modeled Functions endpoint. In Azure Container Apps, the frontend is published as a static site with `/api` routed to the Functions container. Related to #17979 ### User-facing usage TypeScript AppHost: ```typescript const functions = await builder .addAzureFunctionsApp("functions", "../Functions", AzureFunctionsLanguage.TypeScript) .withExternalHttpEndpoints() .withReference(samples).waitFor(samples); await builder .addViteApp("frontend", "../Frontend") .withEnvironment("FUNCTIONS_BASE_URL", functions.getEndpoint("http")) .waitFor(functions) .publishAsStaticWebsite({ apiPath: "/api", apiTarget: functions }) .withExternalHttpEndpoints(); ``` Generated TypeScript Functions Dockerfile publish uses the official Functions Node host image shape, builds TypeScript during container build, and exposes container port 80 for ACA `kind: functionapp` deployment. ### Security considerations This change adds support for launching Node-based Azure Functions apps locally and publishing them as containers. The sample frontend adds a static-site reverse proxy route from `/api` to the Functions resource. Security review has not been completed yet because this is a POC. ### Validation - Passed: `./restore.sh` - Passed (67 tests): `dotnet test --project tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-class "*.AzureFunctionsTests" --filter-class "*.FunctionsPublicApiTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"` - Passed: `dotnet build tests/Aspire.Deployment.EndToEnd.Tests/Aspire.Deployment.EndToEnd.Tests.csproj --no-restore --nologo` - Clean isolated local `aspire start` for the TypeScript AppHost - `aspire wait functions` and `aspire wait frontend` - Local frontend `/api/storageHttpTrigger?name=Frontend` call wrote a blob to the modeled `samples` container - `aspire publish` emitted Functions and frontend container artifacts, including ACA Bicep, Functions `kind: 'functionapp'`, target port 80, frontend YARP static-site routing, and storage role assignments - Real `aspire deploy` to ACA in `rg-aspire-ts-functions-poc` succeeded - Deployed frontend `/api/storageHttpTrigger?name=ACAFrontend` returned HTTP 200 and wrote a blob - Passed: `git diff --check` Fixes # (issue) ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [x] Yes - If yes, did you have an API Review for it? - [ ] Yes - [x] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [x] No - [ ] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mitch Denny <midenn@microsoft.com> Copilot-Session: 9758c021-6791-46c1-81f0-c31dd977b996 Copilot-Session: ba624858-8d8b-431c-afa7-b672f0c74ac2github.com-microsoft-aspire · da9f076d · 2026-10-13
- 1.2ETVFix coordinated .NET build path casing that breaks Blazor WebAssembly builds (#21623) ## Description Fixes #21621. Part of the flake-zero effort in #21600. **Problem.** In #21621 (VS Code Windows `browser-debugger` E2E), `standalone-gateway` goes `FailedToStart` right after the coordinated build `__dotnet-project-build-2` exits non-zero. Frequency over 7 days: 3 of 192 `browser-debugger` jobs, including 1 of 20 main runs. The real build error was not visible anywhere, so this PR first makes it visible and then fixes it. **Root cause.** The diagnostics added in this PR captured the real error on this PR's own CI ([run 41260248165](https://github.com/microsoft/aspire/actions/runs/41260248165), artifact `extension-e2e-diagnostics-win-x64-browser-debugger-attempt1`): ``` [FAIL] [AppHost/DotnetProjectBuildCoordinator] The coordinated .NET build failed with exit code 1 ... __dotnet-project-build-2 Microsoft.NET.Sdk.WebAssembly.Browser.targets(532,5): error : Source file 'C:\Users\...\HostedPerPage.Client\obj\Debug\net11.0\_framework\HostedPerPage.Client.cr0442jzk4.pdb' does not exist for framework asset materialization. [c:\Users\...\HostedPerPage.Client.csproj] ``` The error path uses `C:\`, but the project path uses `c:\`. - The coordinated build's paths come from the AppHost directory. That directory comes from the `AppHostProjectPath` metadata, which keeps whatever spelling the AppHost was built with. Under VS Code on Windows, that spelling can be the lowercase drive letter `c:\`. - In the static web assets SDK, `DefineStaticWebAssets.ComputeCandidateIdentity` checks `candidateFullPath.StartsWith(contentRoot)` with case-sensitive (ordinal) comparison. When the casing differs, the SDK builds an identity from the content root plus `_framework/<name>.<fingerprint>.pdb`. That file doesn't exist, so `MaterializeFrameworkAsset` fails the Blazor WebAssembly client build. **Correlation.** I compared the drive-letter casing of `__dotnet-project-build-2` (`dotnet build <c|C>:\...\projects.<hash>.proj -mt`) against the outcome in Windows `browser-debugger` E2E runs: | Build 2 drive letter | Runs | `FailedToStart` | |---|---|---| | lowercase `c:\` | 4 | **4** | | uppercase `C:\` | 13 | **0** | **Fix.** 1. *Root cause:* `DotnetProjectBuildResource` now resolves the on-disk casing of every path it gives MSBuild: the working directory, build directory, project paths and step working directories. That casing also reaches the launched project's path. Directories that don't exist yet are resolved from their deepest existing ancestor. The fix doesn't resolve symlinks, so the existing symlink-spelling behavior is unchanged. On case-insensitive file systems, case-variant spellings of one project still deduplicate to one entry, but that entry now uses the on-disk spelling instead of the first caller's spelling. `CaseVariantProjectPathsFollowFilesystemIdentity` was updated to assert this. 2. *Diagnostics:* when the coordinated build fails: - The coordinator reads the build output, bounded to 10s and best-effort. - It extracts the MSBuild `error` lines, or the last 20 output lines if there are none. - It appends them to the dependent's exception and logs them **once per build attempt** to the AppHost logger, so they reach CLI logs and the E2E artifacts. - It keeps a log subscriber from build start until the build settles, so DCP drains the final output before the terminal state. ## Evidence **Regression tests** in `DotnetProjectBuildCoordinatorTests`: | Test | Before fix | After fix | |---|---|---| | `CoordinatedBuildPathsUseOnDiskCasing` (Windows/macOS; casing-insensitive file systems) | ❌ on Windows CI at 2835be72 (test-only commit): `Expected: "C:\\Users\\runneradmin..." Actual: "c:\\Users\\runneradmin..."` ([job](https://github.com/microsoft/aspire/actions/runs/41263841703/job/124722889008)) | ✅ | | `FailedCoordinatedBuildReportsBuildErrorsToDependentsAndAppHostLogOnce` | ❌ `Not found: "/src/Api/Program.cs(3,1): error CS1002..."` | ✅ | | `FailedCoordinatedBuildWithoutErrorLinesReportsBuildOutputTail` | ❌ `Not found: "build output line 05"` | ✅ | | `FailedCoordinatedBuildStillFailsDependentWhenBuildOutputIsUnavailable` (guards the fallback) | ✅ | ✅ | | `CoordinatedBuildKeepsOutputSubscribedUntilBuildSettles` (review feedback) | ❌ `Assert.True() Failure` | ✅ | The full `DotnetProjectBuildCoordinatorTests` class passes on Linux: 128 passed, 1 skipped (the casing test is skipped because Linux file systems are case-sensitive). **Real DCP (`playground/DotnetProject` AppHost with a compile error injected):** - Before, on main: **0** console lines about the build failure. - After: exactly **1** `fail: Aspire.Hosting.Dotnet.DotnetProjectBuildCoordinator` record, containing `Greeter.cs(13,78): error CS0103: The name 'NotAType' does not exist in the current context`. **E2E:** the Windows `browser-debugger` E2E job on this PR is the functional check; see the CI results. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - Did you add public API? - [x] No - Does the change make any security assumptions or guarantees? - [x] No **🤖 Posted by AspireAgent (AI Agent)** --------- Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Karol Zadora-Przylecki <karolz@microsoft.com>github.com-microsoft-aspire · d70dbf54 · 2026-11-03