Skip to content

Remove the Go AppHost experimental feature flag - #21183

Merged
David Pine (IEvangelist) merged 9 commits into
mainfrom
ievangelist-go-remove-experimental-flag
Nov 5, 2026
Merged

David Pine (IEvangelist) merged 9 commits into
mainfrom
ievangelist-go-remove-experimental-flag

Conversation

@IEvangelist

@IEvangelist David Pine (IEvangelist) commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Description

Removes the experimentalPolyglotGo feature flag so Go AppHosts are available by default, the same way TypeScript AppHosts are. With no flag, Empty (Go AppHost) and Starter App (Go API + Redis, Go AppHost) are offered by interactive and non-interactive aspire new, and Go is offered by aspire init language selection and --language go.

This is the GA switch for the Go AppHost epic (#21115) and must merge last, after the other children have landed: #21108 (E2E, publish, deploy), #21110 (support policy, API review, packaging), #21112 (docs and samples) and #21114 (VS Code debugging). It was opened as a draft so CI exercises the 52 Go fixtures without the flag. It is ready for review now, but not for merging.

What changed:

  • CLI: KnownFeatures drops the Go flag and DefaultLanguageDiscovery no longer marks Go experimental. LanguageInfo.IsExperimental is kept because Python, Java and Rust still use it.
  • Leftover key: a stale experimentalPolyglotGo in a user's configuration is ignored with no warning, matching what happened to the TypeScript flag when it was removed. Features only reads named keys, and the extension schemas set additionalProperties: false, so VS Code flags the stale key.
  • Extension schemas: aspire-config, aspire-global-settings and aspire-settings are regenerated with extension/scripts/generate-schema.js. Only the 16-line Go block is removed from each.
  • Fixtures and CI: 52 tests/PolyglotAppHosts/*/Go/aspire.config.json files and .github/workflows/polyglot-validation/Dockerfile.golang no longer set the key.
  • Java E2E picker offsets: Go is always listed now, so with only the Java flag set the aspire init language picker is C#, TypeScript, Go, Java, and Java needs 3 Down presses instead of 2. The first CI run on this PR timed out waiting for > Java in JavaPolyglotTests, JavaCodegenValidationTests and JavaPolyglotApphostDirectoryTests; each now presses Down once more, with a comment stating the picker order. The order comes from DefaultLanguageDiscovery, LanguageService and CliTemplateFactory. TypeScript flows are unaffected because TypeScript sorts before Go.
  • Tests: DefaultLanguageDiscoveryTests, NewCommandTests, ConfigCommandTests, NewCommandTemplateConfigPersistenceTests and InitCommandTests now expect Go without the flag, with 6 new tests. One of them, GetAvailableLanguagesAsync_ListsLanguagesInPickerOrder, pins the picker order so a future ungated language fails a unit test before it breaks a Docker E2E run.
  • Docs: docs/specs/polyglot-apphost.md, the Go code generation README and playground/GoAppHost/apphost.go no longer mention the flag.

Fixes #21106

Validation

Command Result
.\restore.cmd passed
dotnet build tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj -m:2 --no-restore 0 warnings, 0 errors
dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class "*.DefaultLanguageDiscoveryTests" --filter-class "*.NewCommandTests" --filter-class "*.ConfigCommandTests" --filter-class "*.NewCommandTemplateConfigPersistenceTests" --filter-class "*.InitCommandTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" 312 passed, 0 failed (run before the picker-order test was added)
dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class "*.DefaultLanguageDiscoveryTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" 39 passed, 0 failed (38 existing plus the picker-order test)
node extension\scripts\generate-schema.js only the Go block was removed from each schema
repository-wide search for experimentalPolyglotGo and its variants 0 hits
JSON parse of the 53 fixtures and 3 schemas all parse, none contain the flag

Run in PR CI instead of locally, all passing on 0e65752d44: the three Java E2E tests (JavaPolyglotTests, JavaCodegenValidationTests and JavaPolyglotApphostDirectoryTests; they need Docker, so CI was the first execution of the extra Down press), Infrastructure.Tests and the VS Code extension unit and E2E jobs.

Not run: the VS Code new-project flow in an extension host (extension/src/commands/new.ts just runs aspire new).

Before merging

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

@github-actions

Copy link
Copy Markdown
Contributor

🚀 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 -- 21183

Or

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

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 20, 2026 04:54
@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Oct 20, 2026
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human confirmation is needed that prerequisites #21108, #21110, #21112, and #21114 have landed and passed validation before this merge-last switch.

No open issues 🎉

What changed in this PR

Makes Go AppHosts available by default through Aspire CLI discovery, aspire new, and aspire init. This is the merge-last switch for the Go general availability epic #21115.

Changes:

  • Removes Go’s experimental flag from CLI registration and extension schemas.
  • Updates CLI tests and 52 Go fixtures to use default-enabled support.
  • Removes obsolete flag setup from CI, documentation, and sample instructions.
File Description
tests/​PolyglotAppHosts/​Aspire.Hosting/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Yarp/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Valkey/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.SqlServer/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Seq/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Rust/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Redis/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.RabbitMQ/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Qdrant/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Python/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.PostgreSQL/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Orleans/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Oracle/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.OpenAI/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Nats/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.MySql/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.MongoDB/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Milvus/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Maui/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Kubernetes/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Keycloak/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Kafka/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.JavaScript/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Java/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Go/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Garnet/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Foundry/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Dotnet/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Docker/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.DevTunnels/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.WebPubSub/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.Storage/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.Sql/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.SignalR/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.ServiceBus/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.Search/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.Redis/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.PostgreSQL/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.OperationalInsights/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.Network/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.Kusto/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.KeyVault/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.Functions/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.EventHubs/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.CosmosDB/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.ContainerRegistry/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.CognitiveServices/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.AppService/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.ApplicationInsights/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.AppContainers/​Go/​aspire.config.json Removes fixture flag.
tests/​PolyglotAppHosts/​Aspire.Hosting.Azure.AppConfiguration/​Go/​aspire.config.json Removes fixture flag.
tests/​Aspire.Cli.Tests/​Projects/​DefaultLanguageDiscoveryTests.cs Verifies default Go discovery.
tests/​Aspire.Cli.Tests/​Commands/​NewCommandTests.cs Verifies Go template availability and selection.
tests/​Aspire.Cli.Tests/​Commands/​NewCommandTemplateConfigPersistenceTests.cs Removes Go flag setup.
tests/​Aspire.Cli.Tests/​Commands/​InitCommandTests.cs Tests Go initialization without flags.
tests/​Aspire.Cli.Tests/​Commands/​ConfigCommandTests.cs Removes obsolete Go flag case.
src/​Aspire.Hosting.CodeGeneration.Go/​README.md Updates Go setup instructions.
src/​Aspire.Cli/​Projects/​DefaultLanguageDiscovery.cs Makes Go non-experimental and always discoverable.
src/​Aspire.Cli/​KnownFeatures.cs Removes Go flag registration.
playground/​GoAppHost/​apphost.go Removes flag setup from comments only.
extension/​schemas/​aspire-settings.schema.json Removes Go flag schema entry.
extension/​schemas/​aspire-global-settings.schema.json Removes Go flag schema entry.
extension/​schemas/​aspire-config.schema.json Removes Go flag schema entry.
docs/​specs/​polyglot-apphost.md Documents Go as always available.
.github/​workflows/​polyglot-validation/​Dockerfile.golang Runs Go validation without flag setup.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@IEvangelist
David Pine (IEvangelist) force-pushed the ievangelist-go-remove-experimental-flag branch from c845cc4 to 0e65752 Compare October 20, 2026 05:56
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 20, 2026 05:59
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The merge-last requirement needs human confirmation that prerequisites #21108, #21110, #21112, and #21114 are complete before enabling Go by default.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

…ve-experimental-flag

Resolve the DefaultLanguageDiscovery.cs conflict with #21191: keep main's DefaultHostingPackages for the Go language and drop IsExperimental, since Go no longer has a feature flag.

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

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Go AppHost README lacks the Preview status notice required by the linked Aspire 17 release requirements after removing the experimental notice.

1 open issue

Review effort: Balanced

Removing the feature flag also removed the README's only release-status sentence. The Aspire 17 release status in #21106 says the flag is removed while documentation clearly identifies Go AppHosts as Preview, so state that in place of the experimental notice.

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

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Tests selector

4 / 101 PR test projects · 5 PR jobs, from 79 changed files.

Selected PR test projects (4 / 101)

Aspire.Cli.EndToEnd.Tests, Aspire.Cli.Tests, Aspire.Playground.Tests, Infrastructure.Tests

Selected PR jobs (5)

cli-starter-validation, extension-e2e, extension-unit, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

📦 affected project Aspire.Cli
→ 1 test: Aspire.Cli.EndToEnd.Tests

📄 .github/workflows/polyglot-validation/Dockerfile.golang (changed)
→ 1 directly: Infrastructure.Tests

📄 playground/GoAppHost/apphost.go (changed)
→ 1 directly: Aspire.Playground.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/GoCodegenValidationTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/GoEmptyAppHostTemplateTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/GoKubernetesDeployTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/GoPolyglotApphostDirectoryTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/GoPublishTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/GoSecretAppHostTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/GoStarterTemplateTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/Helpers/CliE2EAutomatorHelpers.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/JavaCodegenValidationTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/JavaPolyglotApphostDirectoryTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/JavaPolyglotTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.Tests/Commands/ConfigCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/GoAppHostToolingCheckTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/InitCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/NewCommandTemplateConfigPersistenceTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/NewCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/Sdk/SdkExportCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Projects/DefaultLanguageDiscoveryTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Cli
extension-e2e • extension/schemas/aspire-config.schema.json, extension/schemas/aspire-global-settings.schema.json, extension/schemas/aspire-settings.schema.json, src/Aspire.Cli/KnownFeatures.cs, src/Aspire.Cli/Projects/DefaultLanguageDiscovery.cs, src/Aspire.Cli/Utils/EnvironmentChecker/GoAppHostToolingCheck.cs
• affected project Aspire.Cli
extension-unit extension/schemas/aspire-config.schema.json, extension/schemas/aspire-global-settings.schema.json, extension/schemas/aspire-settings.schema.json
polyglot • .github/workflows/polyglot-validation/Dockerfile.golang, tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppConfiguration/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppContainers/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppService/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.ApplicationInsights/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.CognitiveServices/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.ContainerRegistry/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.CosmosDB/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.EntraId/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.EventHubs/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.Functions/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.KeyVault/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.Kusto/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.Network/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.OperationalInsights/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.PostgreSQL/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.Redis/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.Search/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.ServiceBus/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.SignalR/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sql/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.Storage/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure.WebPubSub/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Azure/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.DevTunnels/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Docker/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Dotnet/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Foundry/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Garnet/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Go/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Java/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.JavaScript/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Kafka/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Keycloak/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Kubernetes/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Maui/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Milvus/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.MongoDB/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.MySql/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Nats/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.OpenAI/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Oracle/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Orleans/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.PostgreSQL/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Python/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Qdrant/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.RabbitMQ/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Redis/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Rust/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Seq/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.SqlServer/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Valkey/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting.Yarp/Go/aspire.config.json, tests/PolyglotAppHosts/Aspire.Hosting/Go/aspire.config.json
• affected project Aspire.Cli
typescript-api-compat affected project Aspire.Cli

Selection computed for commit ecee5b2.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The default-on Preview rollout requires human confirmation that prerequisite #21191 is complete, merge-last sequencing is satisfied, and coordinated documentation and support are ready before merging.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, David. Both earlier items are resolved: #21191 is in, so Aspire.Hosting.Go ships a stable version that the starter's {{aspireVersion}} pin can restore, and the conflict in DefaultLanguageDiscovery.cs was resolved correctly (DefaultHostingPackages kept, IsExperimental dropped).

I merged this head with current main and found no remaining references to the flag. Aspire.Cli.Tests passes for the affected classes (473/473, including DefaultHostingPackagesTests), Aspire.Cli.EndToEnd.Tests builds with no warnings, and none of the 54 Go fixtures has a features block. I didn't run the E2E tests locally; they pass in this PR's CI. The stable-version restore comes from reading the package and template settings, not from a run against a stable feed.

Two things to tidy before merging, neither blocking the code:

  • The description still calls this the GA switch, while #21106 designates Go as Preview for Aspire 17.
  • It also says this merges after #21108, #21110, #21112 and #21114, which are all still open, and the aspire.dev docs item is unchecked. Please confirm those are complete or don't need to hold this PR.

@ellahathaway Ella Hathaway (ellahathaway) added this to the 17.0 milestone Nov 4, 2026
@IEvangelist
David Pine (IEvangelist) merged commit 9dfa151 into main Nov 5, 2026
222 checks passed
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

Step 5 branch: docs_required → already documented by name (no flag content to document). Triggered signals: integration_readme_changed, polyglot_code_generator_changed, pr_body_has_cli_flag_mention, pr_body_has_deprecation_marker. Evidence: the only source file changes are removal of the experimentalPolyglotGo feature flag (plus tests, fixtures, and a Go code-generation README edit). A search of src/frontend/src/content/docs/ finds no mention of experimentalPolyglotGo and no wording describing Go AppHost as experimental or flag-gated; app-host/go-apphost.mdx, aspire-new.mdx, and aspire-init.mdx already present Go and --language go as available. Removing the flag makes the existing docs accurate, so no change is needed. The flag was an undocumented switch, so there is nothing to remove or rewrite.

David Pine (IEvangelist) added a commit that referenced this pull request Nov 6, 2026
## Description

Adds focused Go AppHost E2E coverage for the initialization and
package-resolution gaps identified while reviewing the Preview
flag-removal PR.

- Extends SDK-refresh coverage to interactive init, non-interactive
`init --language go` in an empty directory, and non-interactive init
alongside an existing Go application. The brownfield case verifies
source preservation and wires the existing application through the
default Go integration.
- Builds and vets the consumer and explicitly vets the generated
`.aspire/modules` module, which Go's root `./...` traversal skips.
- Adds a separate stable-identity starter restore/build test with an
isolated NuGet cache, exact Go/Redis package pins, SDK regeneration, and
NuGet metadata assertions proving the packages came from the local hive.
- Retains normal-channel starter startup coverage and adds guaranteed
stop cleanup after resource assertions.

Contributes to #21108 and #21110; companion coverage for #21183. This
does not close either readiness issue or include the flag-removal
changes. Existing flag-setup calls are unchanged so #21183 can remove
them as planned.

### Execution lanes

Initialization, code generation, build/vet, and normal-channel startup
run in the existing regular CLI E2E lane. The stable restore/build test
requires a stable-shaped local-hive archive and explicitly skips
ordinary prerelease PR archives, matching the existing stable-emulation
tests. The stabilization job in `ci.yml` is currently hard-disabled;
this PR does not enable it or claim automated stable-release gating.

The existing runtime-package routes already cover Go, its generator,
Redis and SQL Server. The selector attributes the changed test files to
`Aspire.Cli.EndToEnd.Tests`; no map changes are required.

### Validation

| Command | Result |
| --- | --- |
| `.\restore.cmd` | Passed; reported existing dependency-advisory
warnings. |
| `dotnet build
tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj
--no-restore -m:2 -v:quiet` | Passed, 0 warnings, 0 errors. |
| `dotnet test --project
tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj
--no-launch-profile -- --filter-class "*.GoCodegenValidationTests"
--filter-class "*.GoStarterTemplateTests" --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"` | Initial run:
all three init/codegen cases and normal-channel startup passed. An
initially broader stable scenario failed at startup, after
restore/build/vet passed, because the PR-stamped binary requested its
original prerelease SDK from nuget.org. Stable restore/build is now a
separate test, scoped to the requested package-resolution coverage. |
| `dotnet test --project
tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj
--no-launch-profile -- --filter-method
"*.RestoreAndBuildGoStarterFromStablePackages" --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"` | Passed, 1
test, 0 skipped, against the final stable restore/build scenario. |
| `.\localhive.ps1 -Version 17.0.99 -Output .\artifacts\go-stable-e2e
-Rid linux-x64 -Archive` | Blocked by NU5104 for stable component
packages depending on preview .NET 11 packages. The pack excludes the
changed test project. A consumer-only retry with `$env:NoWarn='NU5104'`
packed the packages, then hit Windows-to-Linux NativeAOT dashboard
publishing restrictions. No warning suppression or build-policy changes
are committed. |
| `git diff --check` | Passed. |

For the Docker executions,
`ASPIRE_E2E_POLYGLOT_GO_IMAGE=aspire-go-e2e-6972:latest` selected an
existing Go 1.26.10 image. `ASPIRE_E2E_ARCHIVE` pointed to a consumer
archive assembled from the approved #21183 native CLI (`ecee5b208e`) and
real `17.0.99` packages built from this worktree. This validates the
consumer scenarios, not a fully rebuilt stable native bundle or
stable-identity startup. Linux stable-hive reproduction commands are
documented in `docs/contributing.md`.

## 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?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist) added a commit that referenced this pull request Nov 9, 2026
## Description

Generated Go AppHosts can run callbacks concurrently with the main
builder chain without racing the sticky error or lazy collection
accessors. Invalid request arguments and unencodable callback results
now fail their individual calls instead of disconnecting every pending
operation. Callback decoding errors and `runtime.Goexit` produce
explicit JSON-RPC errors; message headers and cancellation requests are
bounded.

The Go API export also includes structured `type` and `optional`
metadata for every field and constant. DTO optionality comes from ATS
metadata, not the generated `omitempty` tag or pointer spelling. This is
additive to schema version 1 and includes options, runtime fields, enum
constants, and exported value leaves. Export snapshots and the
output-format documentation are updated.

Related to #21204, #21212, and #21115. This does not close either
follow-up issue. The remaining structured Kubernetes manifest work is
separate in #21824.

### User-facing usage

Collection serialization preserves its existing signature; failures are
now observable through the additive `Err` methods:

```go
payload := resource.GetTags().ToJSON()
if err := resource.GetTags().Err(); err != nil {
    return err
}
_ = payload
```

`aspire sdk export --language go --package Name@Version` now emits
fields such as:

```json
{
  "name": "Mode",
  "type": "*TestPersistenceMode",
  "optional": true
}
```

Cancellation watchers are armed only after the invocation carrying their
IDs has entered the FIFO write queue. The cancellation RPC has a
five-second timeout; a canceled call still returns through its own
context without waiting for that RPC.

### Validation

Commands ran on Windows with the restored repository SDK and an isolated
Go 1.27.3 toolchain added to `PATH`. Linux race checks used Go 1.26.10
and GCC from the existing local `aspire-go-e2e-6972:latest` image.

| Command | Result |
| --- | --- |
| `.\restore.cmd` | Passed; 17 dependency audit warnings, no errors. |
| `dotnet test --project
tests\Aspire.Hosting.CodeGeneration.Go.Tests\Aspire.Hosting.CodeGeneration.Go.Tests.csproj
--no-launch-profile -- --filter-not-trait "quarantined=true"
--filter-not-trait "outerloop=true"` | Passed: 130 tests, no failures or
skips. Reviewed and accepted generated Go/JSON snapshot changes. |
| `dotnet test --project
tests\Aspire.Hosting.CodeGeneration.Go.Tests\Aspire.Hosting.CodeGeneration.Go.Tests.csproj
--no-launch-profile -- --filter-method
"*.GeneratedRuntime_PassesGoRuntimeHardeningTests" --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"` | Passed after
adding the final actual-getter-failure assertions. |
| `go test -race -timeout 60s -v .` | Passed in a generated module
extracted from the Go snapshot, with `runtime_test.go`,
`transport_hardening_test.go`, and `decode_test.go` from the C# tests.
Includes a callback and main chaining on the same captured generated
builder, encoding failures, callback errors/Goexit, header bounds, and
cancellation ordering/timeout cleanup. |
| `go test -race -timeout 60s -run
TestCallbackAndMainCanChainOnCapturedBuilder .` | Failed as expected
against the original main snapshot with data races; the same regression
passes with this branch. |
| `dotnet test --project
tests\Aspire.Hosting.RemoteHost.Tests\Aspire.Hosting.RemoteHost.Tests.csproj
--no-launch-profile -- --filter-not-trait "quarantined=true"
--filter-not-trait "outerloop=true"` | Passed: 698 tests, 1 skipped.
Includes integration scanning and Go export/codegen coverage. |
| `dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj
--no-launch-profile -- --filter-class "*.SdkExportCommandTests"
--filter-not-trait "quarantined=true" --filter-not-trait
"outerloop=true"` | Passed: 31 tests. |
| `dotnet build src\Aspire.Cli\Aspire.Cli.csproj --configuration Release
/p:SkipNativeBuild=true` | Passed, with the existing ILCompiler audit
warning. Managed Release build, not native AOT. |
| `.\.dotnet\dotnet.exe
artifacts\bin\Aspire.Cli\Release\net11.0\aspire.dll sdk export --help` |
Passed; help lists Go as an export language. |
| `git diff --check` | Passed. |

### Remaining policy and execution gaps

- Callback registry release still needs a host release signal and a
cross-language ownership contract. This PR does not unregister callbacks
when a registration capability returns, because the host can invoke them
later.
- Disconnect-driven `os.Exit(1)` is unchanged. Choosing an observable
shutdown contract requires a cross-language decision; no GA lifecycle
guarantee is introduced.
- The reported required-token path is currently unreachable because
`SplitParameters` places all cancellation tokens in Go options. Both
token-emission paths select the supplied token's context.
- A bundled current-main CLI export measuring Redis/Azure Storage
XML-summary coverage was not run. No documentation-copy policy was
changed based solely on project-built behavior.
- No new grouped export view was introduced; consumers still have
`capabilityId` for grouping. The aspire.dev consumer and its grouping
decision are outside this product-only change.
- Native AOT publishing, the full CLI suite, a many-integration live
AppHost, polyglot E2E, macOS, and the complete CI matrix were not run.
Go feature-flag-off validation is obsolete because #21183 removed that
flag.

### Security considerations

This changes handling of AppHost JSON-RPC messages and callback
payloads. Headers are limited to 16 entries and 8 KiB before body
allocation, in addition to the existing 64 MiB body cap. Invalid typed
callback arguments are rejected before user code is called; decoding no
longer silently substitutes invalid DTO fields. No authentication,
listener, or permission policy changes are made. A formal threat
model/security review has not been performed.

## 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?
  - [x] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [x] No
  - [ ] No

The additive APIs are Go `List.Err`/`Dict.Err` and JSON export metadata;
no public C# API was added. Go documentation comments describe the error
contract. Triple-slash XML elements do not apply to these Go members.
The fixes in this PR are complete; the explicitly deferred
cross-language policy and bundle-validation items remain tracked in the
related issues.

---------

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ankit Jain (radical) pushed a commit that referenced this pull request Nov 10, 2026
…n empty file (#21932)

**What failed:** `[vscode] Aspire WinUI debug E2E > debugs an unpackaged
WinUI project through its generated apphost executable` failed on
attempt 1 in
[42448442647](https://github.com/microsoft/aspire/actions/runs/42448442647/job/128635064936)
(tracker #21600, unowned rank 1):

```
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /^ready:\d+$/. Input:
''
```

**Why:** The generated WinUI fixture app wrote its ready marker with
`File.WriteAllText(readyFile, …)`. That call creates the file before it
writes the content. `waitForReadyMarker` polls for the file and returns
its first successful read, so a poll that landed in that gap returned
`''` and failed the assertion. The app had started correctly; the test
read the file before the content was written.

**How fixed:** The fixture app (`extension/scripts/run-e2e.js`) now
writes `ready:<pid>` to `<marker>.tmp` and then `File.Move(…, overwrite:
true)` renames it into place. Because the rename is atomic, the marker
path is either missing or holds the full content, so the test's first
read is always complete. The assertion, timeouts and polling are
unchanged. The existing `e2eLaunchProfile` unit test now checks for the
atomic write and rejects a direct `File.WriteAllText(readyFile, …)`.

## Failure stats (14d, attempt 1)

| Scope | Attempt-1 test failures / runs where the job executed | Rate |
Passed on rerun |
|---|---|---|---|
| PR | 4 / 457 | 0.9% | 4 / 4 |
| main | 0 / 99 | 0% | n/a |

Main over 30 days: 0 test-level failures in 216 runs (0 / 99 in the last
14d plus 0 / 117 in the 16 days before). This job had 9 other attempt-1
failures that never reached the test and are excluded: 8 were "hosted
runner lost communication" and 1 was an `aspire-extension` artifact
download failure.

Test-level failures (all four):
-
[42448442647](https://github.com/microsoft/aspire/actions/runs/42448442647/job/128635064936)
(PR #21921, unrelated Java debug change): `The input did not match the
regular expression /^ready:\d+$/. Input: ''` ← **fixed by this PR**
-
[42257446455](https://github.com/microsoft/aspire/actions/runs/42257446455/job/128037952447)
(PR branch `aspireagent/fix-e2e-notification-dismiss-hover-race`):
`Timed out after 120000ms waiting for the C# language server to resolve
generated InitializeComponent … Last definitions: []` (the
`tree-actions` shard also failed in the same attempt)
-
[41532732531](https://github.com/microsoft/aspire/actions/runs/41532732531/job/125585902027)
(PR #20950): `Timed out after 240000ms waiting for the WinUI OnLaunched
marker.` AppHost hosting startup took 1m42s, and 4 other Windows shards
failed in the same attempt.
-
[41501727353](https://github.com/microsoft/aspire/actions/runs/41501727353/job/125481870825)
(PR #21183): `The C# definition probe for InitializeComponent … Timed
out after 129ms waiting for E2E control revision`. `dotnet
--list-runtimes` took 53s, Roslyn never started, and 6 other shards
failed in the same attempt.

All four are genuine flakes, not caused by their PRs. The last three
come from whole-runner slowness on Windows, which is tracked in #21570
with telemetry in #21644. This PR does not address them because fixing
them would mean raising timeouts.

**Local regression evidence:** A harness ran the fixture's exact
before/after C# writer against a Node reader that uses
`waitForReadyMarker`'s semantics (first successful read is asserted
against `/^ready:\d+$/`), polling tightly, with 500 marker publications
per run:
- Before (`File.WriteAllText(readyFile, …)`): **10/10 runs** saw an
empty marker (475–496 torn first reads out of about 500 per run).
- After (write `.tmp`, then `File.Move` with `overwrite: true`): **0/10
runs** saw an empty marker (0 torn reads out of about 4,980
publications).

The harness ran on Linux. On Windows, `File.Move(overwrite: true)` maps
to `MoveFileEx(MOVEFILE_REPLACE_EXISTING)` within the same directory,
which is also atomic for readers.

**PR CI** ([run
42472017876](https://github.com/microsoft/aspire/actions/runs/42472017876)):
`VS Code extension E2E (Windows, winui-debug)` and the Windows extension
unit tests (including the updated `e2eLaunchProfile` test) passed on
attempt 1. Three unrelated jobs failed on attempt 1: a GitHub 'Unicorn'
outage while downloading Deno in `launch-profiles`, and the known
`tree-actions` flakes (`Expected e2e-worker to expose an endpoint URL`,
addressed by #21914; `Timed out … waiting for running AppHost` on
Linux). After reruns, all 70 checks pass.

**Verdict: MODERATE.** The fixed race is proven deterministically (10/10
→ 0/10) and matches the newest failure's exact signature. However, it
accounts for only 1 of the 4 attempt-1 test failures in 14d. The other 3
belong to the Windows runner-slowness family in #21570.

## Confidence

High that this removes the empty-marker failure mode: the gap is
inherent to `File.WriteAllText` and the reader returns on its first
read. Low that it changes the C# language server / OnLaunched timeout
failures, which this PR does not target.

**How we stop this recurring:** Fixture processes that publish readiness
files for E2E polling should write a temp file and rename it into place.
The unit test now enforces this for the WinUI marker.

## 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>
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
## Description

Generated Go AppHosts can run callbacks concurrently with the main
builder chain without racing the sticky error or lazy collection
accessors. Invalid request arguments and unencodable callback results
now fail their individual calls instead of disconnecting every pending
operation. Callback decoding errors and `runtime.Goexit` produce
explicit JSON-RPC errors; message headers and cancellation requests are
bounded.

The Go API export also includes structured `type` and `optional`
metadata for every field and constant. DTO optionality comes from ATS
metadata, not the generated `omitempty` tag or pointer spelling. This is
additive to schema version 1 and includes options, runtime fields, enum
constants, and exported value leaves. Export snapshots and the
output-format documentation are updated.

Related to #21204, #21212, and #21115. This does not close either
follow-up issue. The remaining structured Kubernetes manifest work is
separate in #21824.

### User-facing usage

Collection serialization preserves its existing signature; failures are
now observable through the additive `Err` methods:

```go
payload := resource.GetTags().ToJSON()
if err := resource.GetTags().Err(); err != nil {
    return err
}
_ = payload
```

`aspire sdk export --language go --package Name@Version` now emits
fields such as:

```json
{
  "name": "Mode",
  "type": "*TestPersistenceMode",
  "optional": true
}
```

Cancellation watchers are armed only after the invocation carrying their
IDs has entered the FIFO write queue. The cancellation RPC has a
five-second timeout; a canceled call still returns through its own
context without waiting for that RPC.

### Validation

Commands ran on Windows with the restored repository SDK and an isolated
Go 1.27.3 toolchain added to `PATH`. Linux race checks used Go 1.26.10
and GCC from the existing local `aspire-go-e2e-6972:latest` image.

| Command | Result |
| --- | --- |
| `.\restore.cmd` | Passed; 17 dependency audit warnings, no errors. |
| `dotnet test --project
tests\Aspire.Hosting.CodeGeneration.Go.Tests\Aspire.Hosting.CodeGeneration.Go.Tests.csproj
--no-launch-profile -- --filter-not-trait "quarantined=true"
--filter-not-trait "outerloop=true"` | Passed: 130 tests, no failures or
skips. Reviewed and accepted generated Go/JSON snapshot changes. |
| `dotnet test --project
tests\Aspire.Hosting.CodeGeneration.Go.Tests\Aspire.Hosting.CodeGeneration.Go.Tests.csproj
--no-launch-profile -- --filter-method
"*.GeneratedRuntime_PassesGoRuntimeHardeningTests" --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"` | Passed after
adding the final actual-getter-failure assertions. |
| `go test -race -timeout 60s -v .` | Passed in a generated module
extracted from the Go snapshot, with `runtime_test.go`,
`transport_hardening_test.go`, and `decode_test.go` from the C# tests.
Includes a callback and main chaining on the same captured generated
builder, encoding failures, callback errors/Goexit, header bounds, and
cancellation ordering/timeout cleanup. |
| `go test -race -timeout 60s -run
TestCallbackAndMainCanChainOnCapturedBuilder .` | Failed as expected
against the original main snapshot with data races; the same regression
passes with this branch. |
| `dotnet test --project
tests\Aspire.Hosting.RemoteHost.Tests\Aspire.Hosting.RemoteHost.Tests.csproj
--no-launch-profile -- --filter-not-trait "quarantined=true"
--filter-not-trait "outerloop=true"` | Passed: 698 tests, 1 skipped.
Includes integration scanning and Go export/codegen coverage. |
| `dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj
--no-launch-profile -- --filter-class "*.SdkExportCommandTests"
--filter-not-trait "quarantined=true" --filter-not-trait
"outerloop=true"` | Passed: 31 tests. |
| `dotnet build src\Aspire.Cli\Aspire.Cli.csproj --configuration Release
/p:SkipNativeBuild=true` | Passed, with the existing ILCompiler audit
warning. Managed Release build, not native AOT. |
| `.\.dotnet\dotnet.exe
artifacts\bin\Aspire.Cli\Release\net11.0\aspire.dll sdk export --help` |
Passed; help lists Go as an export language. |
| `git diff --check` | Passed. |

### Remaining policy and execution gaps

- Callback registry release still needs a host release signal and a
cross-language ownership contract. This PR does not unregister callbacks
when a registration capability returns, because the host can invoke them
later.
- Disconnect-driven `os.Exit(1)` is unchanged. Choosing an observable
shutdown contract requires a cross-language decision; no GA lifecycle
guarantee is introduced.
- The reported required-token path is currently unreachable because
`SplitParameters` places all cancellation tokens in Go options. Both
token-emission paths select the supplied token's context.
- A bundled current-main CLI export measuring Redis/Azure Storage
XML-summary coverage was not run. No documentation-copy policy was
changed based solely on project-built behavior.
- No new grouped export view was introduced; consumers still have
`capabilityId` for grouping. The aspire.dev consumer and its grouping
decision are outside this product-only change.
- Native AOT publishing, the full CLI suite, a many-integration live
AppHost, polyglot E2E, macOS, and the complete CI matrix were not run.
Go feature-flag-off validation is obsolete because #21183 removed that
flag.

### Security considerations

This changes handling of AppHost JSON-RPC messages and callback
payloads. Headers are limited to 16 entries and 8 KiB before body
allocation, in addition to the existing 64 MiB body cap. Invalid typed
callback arguments are rejected before user code is called; decoding no
longer silently substitutes invalid DTO fields. No authentication,
listener, or permission policy changes are made. A formal threat
model/security review has not been performed.

## 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?
  - [x] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [x] No
  - [ ] No

The additive APIs are Go `List.Err`/`Dict.Err` and JSON export metadata;
no public C# API was added. Go documentation comments describe the error
contract. Triple-slash XML elements do not apply to these Go members.
The fixes in this PR are complete; the explicitly deferred
cross-language policy and bundle-validation items remain tracked in the
related issues.

---------

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit e7ff435)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
## Description

Generated Go AppHosts can run callbacks concurrently with the main
builder chain without racing the sticky error or lazy collection
accessors. Invalid request arguments and unencodable callback results
now fail their individual calls instead of disconnecting every pending
operation. Callback decoding errors and `runtime.Goexit` produce
explicit JSON-RPC errors; message headers and cancellation requests are
bounded.

The Go API export also includes structured `type` and `optional`
metadata for every field and constant. DTO optionality comes from ATS
metadata, not the generated `omitempty` tag or pointer spelling. This is
additive to schema version 1 and includes options, runtime fields, enum
constants, and exported value leaves. Export snapshots and the
output-format documentation are updated.

Related to #21204, #21212, and #21115. This does not close either
follow-up issue. The remaining structured Kubernetes manifest work is
separate in #21824.

### User-facing usage

Collection serialization preserves its existing signature; failures are
now observable through the additive `Err` methods:

```go
payload := resource.GetTags().ToJSON()
if err := resource.GetTags().Err(); err != nil {
    return err
}
_ = payload
```

`aspire sdk export --language go --package Name@Version` now emits
fields such as:

```json
{
  "name": "Mode",
  "type": "*TestPersistenceMode",
  "optional": true
}
```

Cancellation watchers are armed only after the invocation carrying their
IDs has entered the FIFO write queue. The cancellation RPC has a
five-second timeout; a canceled call still returns through its own
context without waiting for that RPC.

### Validation

Commands ran on Windows with the restored repository SDK and an isolated
Go 1.27.3 toolchain added to `PATH`. Linux race checks used Go 1.26.10
and GCC from the existing local `aspire-go-e2e-6972:latest` image.

| Command | Result |
| --- | --- |
| `.\restore.cmd` | Passed; 17 dependency audit warnings, no errors. |
| `dotnet test --project
tests\Aspire.Hosting.CodeGeneration.Go.Tests\Aspire.Hosting.CodeGeneration.Go.Tests.csproj
--no-launch-profile -- --filter-not-trait "quarantined=true"
--filter-not-trait "outerloop=true"` | Passed: 130 tests, no failures or
skips. Reviewed and accepted generated Go/JSON snapshot changes. |
| `dotnet test --project
tests\Aspire.Hosting.CodeGeneration.Go.Tests\Aspire.Hosting.CodeGeneration.Go.Tests.csproj
--no-launch-profile -- --filter-method
"*.GeneratedRuntime_PassesGoRuntimeHardeningTests" --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"` | Passed after
adding the final actual-getter-failure assertions. |
| `go test -race -timeout 60s -v .` | Passed in a generated module
extracted from the Go snapshot, with `runtime_test.go`,
`transport_hardening_test.go`, and `decode_test.go` from the C# tests.
Includes a callback and main chaining on the same captured generated
builder, encoding failures, callback errors/Goexit, header bounds, and
cancellation ordering/timeout cleanup. |
| `go test -race -timeout 60s -run
TestCallbackAndMainCanChainOnCapturedBuilder .` | Failed as expected
against the original main snapshot with data races; the same regression
passes with this branch. |
| `dotnet test --project
tests\Aspire.Hosting.RemoteHost.Tests\Aspire.Hosting.RemoteHost.Tests.csproj
--no-launch-profile -- --filter-not-trait "quarantined=true"
--filter-not-trait "outerloop=true"` | Passed: 698 tests, 1 skipped.
Includes integration scanning and Go export/codegen coverage. |
| `dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj
--no-launch-profile -- --filter-class "*.SdkExportCommandTests"
--filter-not-trait "quarantined=true" --filter-not-trait
"outerloop=true"` | Passed: 31 tests. |
| `dotnet build src\Aspire.Cli\Aspire.Cli.csproj --configuration Release
/p:SkipNativeBuild=true` | Passed, with the existing ILCompiler audit
warning. Managed Release build, not native AOT. |
| `.\.dotnet\dotnet.exe
artifacts\bin\Aspire.Cli\Release\net11.0\aspire.dll sdk export --help` |
Passed; help lists Go as an export language. |
| `git diff --check` | Passed. |

### Remaining policy and execution gaps

- Callback registry release still needs a host release signal and a
cross-language ownership contract. This PR does not unregister callbacks
when a registration capability returns, because the host can invoke them
later.
- Disconnect-driven `os.Exit(1)` is unchanged. Choosing an observable
shutdown contract requires a cross-language decision; no GA lifecycle
guarantee is introduced.
- The reported required-token path is currently unreachable because
`SplitParameters` places all cancellation tokens in Go options. Both
token-emission paths select the supplied token's context.
- A bundled current-main CLI export measuring Redis/Azure Storage
XML-summary coverage was not run. No documentation-copy policy was
changed based solely on project-built behavior.
- No new grouped export view was introduced; consumers still have
`capabilityId` for grouping. The aspire.dev consumer and its grouping
decision are outside this product-only change.
- Native AOT publishing, the full CLI suite, a many-integration live
AppHost, polyglot E2E, macOS, and the complete CI matrix were not run.
Go feature-flag-off validation is obsolete because #21183 removed that
flag.

### Security considerations

This changes handling of AppHost JSON-RPC messages and callback
payloads. Headers are limited to 16 entries and 8 KiB before body
allocation, in addition to the existing 64 MiB body cap. Invalid typed
callback arguments are rejected before user code is called; decoding no
longer silently substitutes invalid DTO fields. No authentication,
listener, or permission policy changes are made. A formal threat
model/security review has not been performed.

## 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?
  - [x] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [x] No
  - [ ] No

The additive APIs are Go `List.Err`/`Dict.Err` and JSON export metadata;
no public C# API was added. Go documentation comments describe the error
contract. Triple-slash XML elements do not apply to these Go members.
The fixes in this PR are complete; the explicitly deferred
cross-language policy and bundle-validation items remain tracked in the
related issues.

---------

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit e7ff435)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
…n empty file (#21932)

**What failed:** `[vscode] Aspire WinUI debug E2E > debugs an unpackaged
WinUI project through its generated apphost executable` failed on
attempt 1 in
[42448442647](https://github.com/microsoft/aspire/actions/runs/42448442647/job/128635064936)
(tracker #21600, unowned rank 1):

```
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /^ready:\d+$/. Input:
''
```

**Why:** The generated WinUI fixture app wrote its ready marker with
`File.WriteAllText(readyFile, …)`. That call creates the file before it
writes the content. `waitForReadyMarker` polls for the file and returns
its first successful read, so a poll that landed in that gap returned
`''` and failed the assertion. The app had started correctly; the test
read the file before the content was written.

**How fixed:** The fixture app (`extension/scripts/run-e2e.js`) now
writes `ready:<pid>` to `<marker>.tmp` and then `File.Move(…, overwrite:
true)` renames it into place. Because the rename is atomic, the marker
path is either missing or holds the full content, so the test's first
read is always complete. The assertion, timeouts and polling are
unchanged. The existing `e2eLaunchProfile` unit test now checks for the
atomic write and rejects a direct `File.WriteAllText(readyFile, …)`.

## Failure stats (14d, attempt 1)

| Scope | Attempt-1 test failures / runs where the job executed | Rate |
Passed on rerun |
|---|---|---|---|
| PR | 4 / 457 | 0.9% | 4 / 4 |
| main | 0 / 99 | 0% | n/a |

Main over 30 days: 0 test-level failures in 216 runs (0 / 99 in the last
14d plus 0 / 117 in the 16 days before). This job had 9 other attempt-1
failures that never reached the test and are excluded: 8 were "hosted
runner lost communication" and 1 was an `aspire-extension` artifact
download failure.

Test-level failures (all four):
-
[42448442647](https://github.com/microsoft/aspire/actions/runs/42448442647/job/128635064936)
(PR #21921, unrelated Java debug change): `The input did not match the
regular expression /^ready:\d+$/. Input: ''` ← **fixed by this PR**
-
[42257446455](https://github.com/microsoft/aspire/actions/runs/42257446455/job/128037952447)
(PR branch `aspireagent/fix-e2e-notification-dismiss-hover-race`):
`Timed out after 120000ms waiting for the C# language server to resolve
generated InitializeComponent … Last definitions: []` (the
`tree-actions` shard also failed in the same attempt)
-
[41532732531](https://github.com/microsoft/aspire/actions/runs/41532732531/job/125585902027)
(PR #20950): `Timed out after 240000ms waiting for the WinUI OnLaunched
marker.` AppHost hosting startup took 1m42s, and 4 other Windows shards
failed in the same attempt.
-
[41501727353](https://github.com/microsoft/aspire/actions/runs/41501727353/job/125481870825)
(PR #21183): `The C# definition probe for InitializeComponent … Timed
out after 129ms waiting for E2E control revision`. `dotnet
--list-runtimes` took 53s, Roslyn never started, and 6 other shards
failed in the same attempt.

All four are genuine flakes, not caused by their PRs. The last three
come from whole-runner slowness on Windows, which is tracked in #21570
with telemetry in #21644. This PR does not address them because fixing
them would mean raising timeouts.

**Local regression evidence:** A harness ran the fixture's exact
before/after C# writer against a Node reader that uses
`waitForReadyMarker`'s semantics (first successful read is asserted
against `/^ready:\d+$/`), polling tightly, with 500 marker publications
per run:
- Before (`File.WriteAllText(readyFile, …)`): **10/10 runs** saw an
empty marker (475–496 torn first reads out of about 500 per run).
- After (write `.tmp`, then `File.Move` with `overwrite: true`): **0/10
runs** saw an empty marker (0 torn reads out of about 4,980
publications).

The harness ran on Linux. On Windows, `File.Move(overwrite: true)` maps
to `MoveFileEx(MOVEFILE_REPLACE_EXISTING)` within the same directory,
which is also atomic for readers.

**PR CI** ([run
42472017876](https://github.com/microsoft/aspire/actions/runs/42472017876)):
`VS Code extension E2E (Windows, winui-debug)` and the Windows extension
unit tests (including the updated `e2eLaunchProfile` test) passed on
attempt 1. Three unrelated jobs failed on attempt 1: a GitHub 'Unicorn'
outage while downloading Deno in `launch-profiles`, and the known
`tree-actions` flakes (`Expected e2e-worker to expose an endpoint URL`,
addressed by #21914; `Timed out … waiting for running AppHost` on
Linux). After reruns, all 70 checks pass.

**Verdict: MODERATE.** The fixed race is proven deterministically (10/10
→ 0/10) and matches the newest failure's exact signature. However, it
accounts for only 1 of the 4 attempt-1 test failures in 14d. The other 3
belong to the Windows runner-slowness family in #21570.

## Confidence

High that this removes the empty-marker failure mode: the gap is
inherent to `File.WriteAllText` and the reader returns on its first
read. Low that it changes the C# language server / OnLaunched timeout
failures, which this PR does not target.

**How we stop this recurring:** Fixture processes that publish readiness
files for E2E polling should write a temp file and rename it into place.
The unit test now enforces this for the WinUI marker.

## 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>
(cherry picked from commit 8f00c66)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
…n empty file (#21932)

**What failed:** `[vscode] Aspire WinUI debug E2E > debugs an unpackaged
WinUI project through its generated apphost executable` failed on
attempt 1 in
[42448442647](https://github.com/microsoft/aspire/actions/runs/42448442647/job/128635064936)
(tracker #21600, unowned rank 1):

```
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /^ready:\d+$/. Input:
''
```

**Why:** The generated WinUI fixture app wrote its ready marker with
`File.WriteAllText(readyFile, …)`. That call creates the file before it
writes the content. `waitForReadyMarker` polls for the file and returns
its first successful read, so a poll that landed in that gap returned
`''` and failed the assertion. The app had started correctly; the test
read the file before the content was written.

**How fixed:** The fixture app (`extension/scripts/run-e2e.js`) now
writes `ready:<pid>` to `<marker>.tmp` and then `File.Move(…, overwrite:
true)` renames it into place. Because the rename is atomic, the marker
path is either missing or holds the full content, so the test's first
read is always complete. The assertion, timeouts and polling are
unchanged. The existing `e2eLaunchProfile` unit test now checks for the
atomic write and rejects a direct `File.WriteAllText(readyFile, …)`.

## Failure stats (14d, attempt 1)

| Scope | Attempt-1 test failures / runs where the job executed | Rate |
Passed on rerun |
|---|---|---|---|
| PR | 4 / 457 | 0.9% | 4 / 4 |
| main | 0 / 99 | 0% | n/a |

Main over 30 days: 0 test-level failures in 216 runs (0 / 99 in the last
14d plus 0 / 117 in the 16 days before). This job had 9 other attempt-1
failures that never reached the test and are excluded: 8 were "hosted
runner lost communication" and 1 was an `aspire-extension` artifact
download failure.

Test-level failures (all four):
-
[42448442647](https://github.com/microsoft/aspire/actions/runs/42448442647/job/128635064936)
(PR #21921, unrelated Java debug change): `The input did not match the
regular expression /^ready:\d+$/. Input: ''` ← **fixed by this PR**
-
[42257446455](https://github.com/microsoft/aspire/actions/runs/42257446455/job/128037952447)
(PR branch `aspireagent/fix-e2e-notification-dismiss-hover-race`):
`Timed out after 120000ms waiting for the C# language server to resolve
generated InitializeComponent … Last definitions: []` (the
`tree-actions` shard also failed in the same attempt)
-
[41532732531](https://github.com/microsoft/aspire/actions/runs/41532732531/job/125585902027)
(PR #20950): `Timed out after 240000ms waiting for the WinUI OnLaunched
marker.` AppHost hosting startup took 1m42s, and 4 other Windows shards
failed in the same attempt.
-
[41501727353](https://github.com/microsoft/aspire/actions/runs/41501727353/job/125481870825)
(PR #21183): `The C# definition probe for InitializeComponent … Timed
out after 129ms waiting for E2E control revision`. `dotnet
--list-runtimes` took 53s, Roslyn never started, and 6 other shards
failed in the same attempt.

All four are genuine flakes, not caused by their PRs. The last three
come from whole-runner slowness on Windows, which is tracked in #21570
with telemetry in #21644. This PR does not address them because fixing
them would mean raising timeouts.

**Local regression evidence:** A harness ran the fixture's exact
before/after C# writer against a Node reader that uses
`waitForReadyMarker`'s semantics (first successful read is asserted
against `/^ready:\d+$/`), polling tightly, with 500 marker publications
per run:
- Before (`File.WriteAllText(readyFile, …)`): **10/10 runs** saw an
empty marker (475–496 torn first reads out of about 500 per run).
- After (write `.tmp`, then `File.Move` with `overwrite: true`): **0/10
runs** saw an empty marker (0 torn reads out of about 4,980
publications).

The harness ran on Linux. On Windows, `File.Move(overwrite: true)` maps
to `MoveFileEx(MOVEFILE_REPLACE_EXISTING)` within the same directory,
which is also atomic for readers.

**PR CI** ([run
42472017876](https://github.com/microsoft/aspire/actions/runs/42472017876)):
`VS Code extension E2E (Windows, winui-debug)` and the Windows extension
unit tests (including the updated `e2eLaunchProfile` test) passed on
attempt 1. Three unrelated jobs failed on attempt 1: a GitHub 'Unicorn'
outage while downloading Deno in `launch-profiles`, and the known
`tree-actions` flakes (`Expected e2e-worker to expose an endpoint URL`,
addressed by #21914; `Timed out … waiting for running AppHost` on
Linux). After reruns, all 70 checks pass.

**Verdict: MODERATE.** The fixed race is proven deterministically (10/10
→ 0/10) and matches the newest failure's exact signature. However, it
accounts for only 1 of the 4 attempt-1 test failures in 14d. The other 3
belong to the Windows runner-slowness family in #21570.

## Confidence

High that this removes the empty-marker failure mode: the gap is
inherent to `File.WriteAllText` and the reader returns on its first
read. Low that it changes the C# language server / OnLaunched timeout
failures, which this PR does not target.

**How we stop this recurring:** Fixture processes that publish readiness
files for E2E polling should write a temp file and rename it into place.
The unit test now enforces this for the WinUI marker.

## 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>
(cherry picked from commit 8f00c66)
Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Nov 11, 2026
…overage (#22114)

## Description

Backport of #21806 to `release/17.0`, protecting Go AppHost
initialization, source preservation, generated SDK build/vet, and stable
restore package provenance. Test and contributing-documentation changes
only; no production behavior change.

This standalone replacement for closed #21998 cherry-picks the exact
final merged squash `1b946a70114eaf152778109bd0b86df19ae47006` with `git
cherry-pick -x`, without conflicts or adaptations, directly onto release
tip `cec195f2d0bf3f1d714badf74f205fa855fdf963`. It has no stack or PR
dependencies. It does not reopen or modify the previous stack, retry the
bot, merge, or enable auto-merge.

Relates to #21108 and #21110; neither issue is closed by this PR.

## 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?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

## Customer Impact

Adds coverage protecting Go AppHost initialization, existing application
source preservation, generated SDK build/vet, and stable-package restore
provenance. No production behavior change.

## Testing

### Release-branch validation performed for this PR

| Exact command | Result |
| --- | --- |
| `.\restore.cmd` | Passed (exit 0); dependency-advisory warnings
reported. |
| `dotnet build
tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj
--no-restore -m:2 -v:quiet` | Passed; 0 warnings, 0 errors. |
| `dotnet test --project
tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj
--no-launch-profile -- --filter-class '*.CliInstallStrategyTests'
--filter-not-trait 'quarantined=true' --filter-not-trait
'outerloop=true'` | Passed: 72 succeeded, 0 failed, 0 skipped. Tests the
changed archive/stable-version helpers without Docker. |
| `git diff --check upstream/release/17.0 HEAD` | Passed. |
| `git diff --binary 1b946a7^
1b946a7` compared with `git diff
--binary upstream/release/17.0 HEAD` | Exact diff text identical; all
five changed files also have identical source/backport Git blob IDs. |
| `git diff 1b946a7^
1b946a7 \| git patch-id --stable`
compared with `git diff upstream/release/17.0 HEAD \| git patch-id
--stable` | Matching patch ID:
`6dedbdbd911c022351e03d7b8fba822692d43b33`. |
| `git status --porcelain=v1` | Clean after validation; no accepted
snapshot drift. |

Release runtime validation of `GoCodegenValidationTests` /
`GoStarterTemplateTests` was **not run**: no `ASPIRE_E2E_ARCHIVE` is
configured and no existing archive is present under this worktree's
artifacts. No local-hive or native AOT build was initiated. The stable
restore case additionally requires a stable-shaped local-hive archive.
These runtime scenarios are not claimed as passed or as automated
stable-release gating.

### Source PR evidence only (not release-branch validation)

Source #21806 records a clean E2E-project build, passing
initialization/codegen and normal-channel startup cases, and one passing
stable restore/build case. Full stable native-bundle build/startup was
not validated.

| Exact source command | Source result |
| --- | --- |
| `.\restore.cmd` | Passed with dependency-advisory warnings. |
| `dotnet build
tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj
--no-restore -m:2 -v:quiet` | Passed; 0 warnings, 0 errors. |
| `dotnet test --project
tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj
--no-launch-profile -- --filter-class "*.GoCodegenValidationTests"
--filter-class "*.GoStarterTemplateTests" --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"` | Source initial
run: three initialization/codegen cases and normal-channel startup
passed. An initially broader stable scenario failed at startup after
restore/build/vet passed; the final patch separates stable restore/build
from startup. Not a claim of a final all-green class run. |
| `dotnet test --project
tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj
--no-launch-profile -- --filter-method
"*.RestoreAndBuildGoStarterFromStablePackages" --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"` | Source final
stable restore/build case passed: 1 succeeded, 0 skipped, with a special
consumer archive using the approved #21183 native CLI and real 17.0.99
packages. This setup is not available in this release worktree. |
| `.\localhive.ps1 -Version 17.0.99 -Output .\artifacts\go-stable-e2e
-Rid linux-x64 -Archive` | Source full stable archive attempt was
blocked by NU5104; a consumer-only retry then hit Windows-to-Linux
NativeAOT restrictions. No warning suppression or build-policy changes
are included. |

## Risk

Low, test-only changes, with possible effects limited to E2E execution.

## Regression?

Unknown; source does not identify a regressing release.

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <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

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Go AppHost preview] Remove the feature flag and expose Go templates

4 participants