Skip to content

Fix Foundry ATS baseline#17671

Merged
adamint merged 3 commits into
mainfrom
davidfowl/fix-foundry-ats-baseline
May 29, 2026
Merged

Fix Foundry ATS baseline#17671
adamint merged 3 commits into
mainfrom
davidfowl/fix-foundry-ats-baseline

Conversation

@davidfowl
Copy link
Copy Markdown
Collaborator

@davidfowl davidfowl commented May 29, 2026

Description

The stable ATS baseline for Aspire.Hosting.Foundry still exposed the stale hosted-agent export names after the hosted-agent builder API update merged to main. This updates the generated ATS baseline so polyglot hosts see the current hosted-agent shape.

The baseline now includes HostedAgentOptions and asHostedAgent(project, options?), and removes the stale withComputeEnvironmentExecutable entries. This intentionally does not update the generated api/*.cs public API baseline.

Validation: ./dotnet.sh test --project tests/Aspire.Hosting.Foundry.Tests/Aspire.Hosting.Foundry.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" (92 passed).

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • 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
    • 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
    • No

Update the generated stable ATS baseline for the hosted-agent API rename so the baseline exposes HostedAgentOptions and asHostedAgentExecutable, and drops the stale withComputeEnvironmentExecutable entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 29, 2026 17:17
@davidfowl davidfowl requested a review from sebastienros as a code owner May 29, 2026 17:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17671

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17671"

Comment thread src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Foundry ATS release baseline so polyglot host comparisons reflect the current hosted-agent export shape (asHostedAgentExecutable(project, options?) plus the HostedAgentOptions DTO), and removes stale asHostedAgent()/withComputeEnvironmentExecutable entries that no longer match source.

Changes:

  • Adds the HostedAgentOptions DTO to the ATS DTO Types section.
  • Adds asHostedAgentExecutable(project, options?) capability entry.
  • Removes stale asHostedAgent() and duplicate withComputeEnvironmentExecutable(...) capability entries.
Show a summary per file
File Description
src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt Refresh baseline to match current hosted-agent polyglot exports.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@sebastienros
Copy link
Copy Markdown
Contributor

I don't understand why it's failing, the PR is removing withComputeEnvironmentExecutable

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
adamint added a commit to adamint/aspire that referenced this pull request May 29, 2026
PR microsoft#17671 owns the Foundry ATS baseline update; this branch should only contain the AppHost and CLI fixes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint adamint enabled auto-merge (squash) May 29, 2026 17:46
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint adamint merged commit bb39cb2 into main May 29, 2026
615 of 619 checks passed
@adamint adamint deleted the davidfowl/fix-foundry-ats-baseline branch May 29, 2026 18:53
@github-actions github-actions Bot added this to the 13.5 milestone May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CLI E2E Tests unknown — 108 passed, 0 failed, 2 unknown (commit 6790d5c)

View all recordings
Status Test Recording Job Artifacts
AddPackageInteractiveWhileAppHostRunningDetached Recording #78564799189 Logs
AddPackageWhileAppHostRunningDetached Recording #78564799189 Logs
AgentCommands_AllHelpOutputs_AreCorrect Recording #78564798552 Logs
AgentInitCommand_DefaultSelection_InstallsDefaultSkills Recording #78564798552 Logs
AgentInitCommand_MigratesDeprecatedConfig Recording #78564798552 Logs
AgentMcpListStructuredLogsReturnsLogsFromStarterApp Recording #78564799156 Logs
AgentMcpListStructuredLogsReturnsLogsFromStarterApp_DevLocalhost Recording #78564799156 Logs
AgentMcpListStructuredLogsReturnsLogsFromStarterApp_Isolated Recording #78564799156 Logs
AllPublishMethodsBuildDockerImages Recording #78564798530 Logs
AspireAddAndStartWorkAgainstLegacyAppHostTs Recording #78564797812 Logs
AspireAddPackageVersionToDirectoryPackagesProps Recording #78564799472 Logs
AspireInitSingleFileAppHostRunsViaDotnetRunAppHost Recording #78564798767 Logs
AspireInitWithExistingAppHostDirRecreatesMissingNuGetConfigAndPreservesFiles Recording #78564799447 Logs
AspireInitWithSolutionFileGeneratesAppHostThatBuildsAgainstChannelHive Recording #78564799447 Logs
AspireStartUpdatesStaleTypeScriptAppHostPath Recording #78564798151 Logs
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps Recording #78564799472 Logs
AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent Recording #78564799472 Logs
Banner_DisplayedOnFirstRun Recording #78564798512 Logs
Banner_DisplayedWithExplicitFlag Recording #78564798512 Logs
Banner_NotDisplayedWithNoLogoFlag Recording #78564798512 Logs
CertificatesClean_RemovesCertificates Recording #78564798682 Logs
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate Recording #78564798682 Logs
CertificatesTrust_WithUntrustedCert_TrustsCertificate Recording #78564798682 Logs
ConfigSetGet_CreatesNestedJsonFormat Recording #78564798646 Logs
CreateAndRunAspireStarterProject Recording #78564798508 Logs
CreateAndRunAspireStarterProjectWithBundle Recording #78564798606 Logs
CreateAndRunEmptyAppHostProject Recording #78564797881 Logs
CreateAndRunJavaEmptyAppHostProject Recording #78564798310 Logs
CreateAndRunJsReactProject Recording #78564798494 Logs
CreateAndRunPolyglotAppHostWithDevLocalhostUrls Recording #78564798508 Logs
CreateAndRunPythonReactProject Recording #78564798254 Logs
CreateAndRunTypeScriptEmptyAppHostProject Recording #78564799123 Logs
CreateAndRunTypeScriptStarterProject Recording #78564799161 Logs
CreateJavaAppHostWithViteApp Recording #78564798756 Logs
CreateTypeScriptAppHostWithViteApp_AllowsGuestAppPackageManagerToDiffer Recording #78564798534 Logs
CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain Recording #78564798534 Logs
DashboardRunWithAgentMcpListTracesReturnsNoTraces Recording #78564798557 Logs
DashboardRunWithAgentMcpListTracesReturnsNoTraces_DevLocalhost Recording #78564798557 Logs
DashboardRunWithOtelTracesReturnsNoTraces Recording #78564798557 Logs
DashboardRunWithOtelTracesReturnsNoTraces_DevLocalhost Recording #78564798557 Logs
DeployK8sBasicApiService Recording #78564798038 Logs
DeployK8sWithExternalHelmChart Recording #78564798398 Logs
DeployK8sWithGarnet Recording #78564798914 Logs
DeployK8sWithMongoDB Recording #78564798588 Logs
DeployK8sWithMySql Recording #78564799174 Logs
DeployK8sWithPostgres Recording #78564798233 Logs
DeployK8sWithRabbitMQ Recording #78564798976 Logs
DeployK8sWithRedis Recording #78564798291 Logs
DeployK8sWithSqlServer Recording #78564799118 Logs
DeployK8sWithValkey Recording #78564798475 Logs
DeployTypeScriptAppToKubernetes Recording #78564799652 Logs
DescribeCommandResolvesReplicaNames Recording #78564798563 Logs
DescribeCommandShowsRunningResources Recording #78564798563 Logs
DetachFormatJsonProducesValidJson Recording #78564798395 Logs
DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance Recording #78564798395 Logs
DoPublishAndDeployListStepsWork Recording #78564799157 Logs
DocsCommand_RendersInteractiveMarkdownFromLocalSource Recording #78564798931 Logs
DoctorCommand_DetectsDeprecatedAgentConfig Recording #78564798552 Logs
DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain Recording #78564798797 Logs
DoctorCommand_WithSslCertDir_ShowsTrusted Recording #78564798797 Logs
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted Recording #78564798797 Logs
GatewayWithoutExternalEndpoint_FailsPublishWithGuidance Recording #78564797956 Logs
GeneratedAspireDevScript_StartsWatchMode_WithConfiguredToolchain Recording #78564798534 Logs
GlobalMigration_HandlesCommentsAndTrailingCommas Recording #78564798646 Logs
GlobalMigration_HandlesMalformedLegacyJson Recording #78564798646 Logs
GlobalMigration_PreservesAllValueTypes Recording #78564798646 Logs
GlobalMigration_SkipsWhenNewConfigExists Recording #78564798646 Logs
GlobalSettings_MigratedFromLegacyFormat Recording #78564798646 Logs
IngressWithoutExternalEndpoint_FailsPublishWithGuidance Recording #78564797956 Logs
InitTypeScriptAppHost_AugmentsExistingViteRepoInWorkspaceSubdirectory Recording #78564798534 Logs
InteractiveCSharpInitCreatesExpectedFiles Recording #78564798424 Logs
InvalidAppHostPathWithComments_IsHealedOnRun Recording #78564799464 Logs
JavaScriptHostingApisRunFromTypeScriptAppHost Recording #78564798530 Logs
LatestCliCanStartStableChannelAppHost Recording #78564798508 Logs
LatestCliCanStartStableChannelTypeScriptAppHost Recording #78564798508 Logs
LegacySettingsMigration_AdjustsRelativeAppHostPath Recording #78564798151 Logs
LogsCommandShowsResourceLogs Recording #78564799271 Logs
OtelLogsReturnsStructuredLogsFromStarterApp Recording #78564798670 Logs
OtelLogsReturnsStructuredLogsFromStarterAppIsolated Recording #78564798670 Logs
PsCommandListsRunningAppHost Recording #78564799131 Logs
PsFormatJsonOutputsOnlyJsonToStdout Recording #78564799131 Logs
PublishJavaScriptPatternsGeneratesExpectedDockerComposeArtifacts Recording #78564799126 Logs
PublishWithConfigureEnvFileUpdatesEnvOutput Recording #78564799126 Logs
PublishWithDockerComposeServiceCallbackSucceeds Recording #78564799126 Logs
PublishWithoutOutputPathUsesAppHostDirectoryDefault Recording #78564799126 Logs
ResourceCommand_FailedExecution_DisplaysAppHostLogPathAndLogContainsEntries Recording #78564799220 Logs
ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput Recording #78564799220 Logs
RestoreGeneratesSdkFiles Recording #78564798576 Logs
RestoreGeneratesSdkFiles_WithConfiguredToolchain Recording #78564798617 Logs
RestoreRefreshesGeneratedSdkAfterAddingIntegration Recording #78564798617 Logs
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes Recording #78564798843 Logs
RunFromParentDirectory_UsesExistingConfigNearAppHost Recording #78564798440 Logs
RunReportsSyntaxErrorsForDotNetAppHost Recording #78564798591 Logs
RunReportsSyntaxErrorsForTypeScriptAppHost Recording #78564798591 Logs
SecretCrudOnDotNetAppHost Recording #78564798517 Logs
SecretCrudOnTypeScriptAppHost Recording #78564799036 Logs
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels Recording #78564798458 Logs
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets Recording #78564798091 Logs
StartReportsSyntaxErrorsForDotNetAppHost Recording #78564798591 Logs
StartReportsSyntaxErrorsForTypeScriptAppHost Recording #78564798591 Logs
StopAllAppHostsFromAppHostDirectory Recording #78564799284 Logs
StopJavaPolyglotAppHostUsingApphostDirectory Recording #78564798176 Logs
StopNonInteractiveSingleAppHost Recording #78564799284 Logs
StopTypeScriptPolyglotAppHostUsingApphostDirectory Recording #78564798543 Logs
StopWithNoRunningAppHostExitsSuccessfully Recording #78564799189 Logs
UnAwaitedChainsCompileWithAutoResolvePromises Recording #78564798617 Logs
UpdateProjectChannelToStable_CSharpEmptyAppHost_PreservesAspireConfigChannel Recording #78564798175 Logs
UpdateProjectChannelToStable_CSharpSingleFileInit_PreservesAspireConfigChannel Recording #78564798175 Logs
UpdateProjectChannelToStable_TypeScriptSingleFileInit_PreservesAspireConfigChannel Recording #78564798175 Logs
UpdateProjectChannelToStable_TypeScript_PreviewsStablePackagesAndPreservesChannel Recording #78564798175 Logs

📹 Recordings uploaded automatically from CI run #26654025807

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

docs_required → already documented by name

Triggered signals (1): pr_body_has_cli_flag_mention

Evidence: The signal fired on the validation command in the PR body:

./dotnet.sh test --project tests/Aspire.Hosting.Foundry.Tests/Aspire.Hosting.Foundry.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

The flags --project, --no-launch-profile, and --filter-not-trait are standard dotnet test / Microsoft.Testing.Platform runner flags — not new Aspire CLI flags introduced by this PR. This is a false-positive signal.

Per-signal docs evidence:

  • --no-launch-profile: already documented at integrations/dotnet/launch-profiles.mdx line 63: "You can also launch a .NET application without a launch profile using the --no-launch-profile option."

What this PR actually changes: Fixes the Aspire.Hosting.Foundry ATS (Aspire TypeScript Shim) baseline snapshot to match the hosted-agent API shape that already merged to main in a prior PR; renames a CI workflow step variable; and updates a code comment. No new user-facing Aspire CLI flags, public API, or documented behaviors were introduced.

joperezr pushed a commit that referenced this pull request May 29, 2026
* Fix five `aspire ls` bugs from #17620 (L1–L5)

Fixes #17615, #17620, #17621, #17624, #17626.

- L1 (#17615): Remove the eager-migration block in
  ConfigurationHelper.RegisterSettingsFiles. Read commands like
  `aspire ls` no longer silently materialize an aspire.config.json
  next to a user's legacy .aspire/settings.json. Migration now happens
  lazily/explicitly via the existing write paths.

- L2 (#17620): Drop the `silent` parameter from
  ProjectLocator.GetAppHostProjectFileFromSettingsAsync so the legacy
  branch unconditionally surfaces the migration warning, and surface
  the actual user-authored `.aspire/settings.json` path in the warning
  text rather than the auto-created `aspire.config.json` path.

- L3 (#17621): Remove the dead post-emission `appHosts.Sort()` in
  LsCommand.FindAppHostsWithJsonStreamAsync (--stream emits candidates
  as they are discovered, so the sort had no effect on already-emitted
  output). Update the --stream option description and
  docs/specs/cli-output-formats.md to declare the arrival-ordered
  contract.

- L4 (#17624): Add an IsValidConfiguredAppHostPath helper in
  ProjectLocator that rejects `\0` and Path.GetInvalidPathChars()
  before the path is passed to Path.IsPathRooted / Path.Combine.
  Wired into both the modern `aspire.config.json` (`appHost.path`)
  branch and the legacy `.aspire/settings.json` (`appHostPath`)
  branch. Validation is intentionally at the consumption point rather
  than in AspireConfigFile.Load, which has 12+ unrelated callers.
  Adds a new ConfiguredAppHostPathHasInvalidCharacters resource string
  and refreshes the xlf set via UpdateXlf.

- L5 (#17626): Add PathNormalizer.ResolveSymlinks in src/Shared, a
  recursive segment-walker that canonicalizes intermediate symlinks
  (Directory.ResolveLinkTarget only reads exactly the path it is given,
  and returns the link target as stored on disk — so a single call on
  /tmp/x/y.cs does not unwrap /tmp -> /private/tmp, and following a
  link whose stored target is /var/.../app keeps the un-canonical
  /var prefix). The recursion has a hard depth limit of 40 and falls
  back to the un-resolved input on broken or circular links. Use it in
  AddSettingsAppHostCandidateAsync as a comparison key only — the
  surfaced AppHostProjectCandidate keeps its original FileInfo so the
  displayed path matches what the user authored in settings.

Tests: 158 of 160 targeted tests pass (2 Windows-only skipped on
macOS). New tests cover L1 (no migration on read), L2 (legacy warning
references settings.json), L3 (arrival-order under --stream), L4
(NUL byte in modern and legacy branches), L5 (symlink dedupe via a
node_modules-hosted link the discovery walk excludes), plus 5 unit
tests on PathNormalizer.ResolveSymlinks itself.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address Aspire CLI PR feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use constants for AppHost config keys

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Deduplicate AppHost config casing on macOS

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Handle duplicate ATS capabilities

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Revert duplicate ATS compatibility fix

PR #17671 owns the Foundry ATS baseline update; this branch should only contain the AppHost and CLI fixes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: adamint <adamratzman1@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants