Repository navigation
Manage and search global template sources in the CLI - #21329
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac380eac-c60d-4f83-9ad8-0416e791cdba
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21329Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21329" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Search omits actual template descriptions, and repeated queries accumulate retained template-engine sessions.
2 open issues
1 file not reviewed
src/Aspire.Cli/Resources/NewCommandStrings.Designer.cs: Generated file
What changed in this PR
This spike adds discovery of globally configured local template directories to aspire new, reusing the existing local-template generation pipeline.
Changes:
- Adds lazy source discovery, search filtering, source labels, and per-source warnings.
- Introduces interactive search, retry, and back navigation while preserving explicit-source and non-interactive flows.
- Adds configuration and generation tests, output snapshots, documentation, and localization resources.
| File | Description |
|---|---|
| tests/Aspire.Cli.Tests/Utils/CliTestHelper.cs | Registers the configured-source service for tests. |
| tests/Aspire.Cli.Tests/TestServices/TestNewCommandPrompter.cs | Adapts the shared prompter to the new selection contract. |
| tests/Aspire.Cli.Tests/Templating/DotNetTemplateFactoryTests.cs | Updates the prompter test implementation. |
| tests/Aspire.Cli.Tests/Snapshots/NewCommandLocalTemplateTests.ConfiguredSources_SelectsExactTemplateWithDuplicateNamesAndPromptsForParameters_noBuiltIns=True.verified.txt | Records duplicate-name selection output without built-ins. |
| tests/Aspire.Cli.Tests/Snapshots/NewCommandLocalTemplateTests.ConfiguredSources_SelectsExactTemplateWithDuplicateNamesAndPromptsForParameters_noBuiltIns=False.verified.txt | Records duplicate-name selection output with built-ins. |
| tests/Aspire.Cli.Tests/Snapshots/NewCommandLocalTemplateTests.ConfiguredSources_NoMatchesCanSearchAgainAndGenerate.verified.txt | Records generation after retrying a search. |
| tests/Aspire.Cli.Tests/Commands/NewCommandLocalTemplateTests.ConfiguredSources.cs | Tests configuration, search, navigation, and generation. |
| src/Aspire.Cli/Templating/ConfiguredTemplateSourceService.cs | Reads global sources and discovers matching templates. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.zh-Hant.xlf | Adds Traditional Chinese localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.zh-Hans.xlf | Adds Simplified Chinese localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.tr.xlf | Adds Turkish localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.ru.xlf | Adds Russian localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.pt-BR.xlf | Adds Brazilian Portuguese localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.pl.xlf | Adds Polish localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.ko.xlf | Adds Korean localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.ja.xlf | Adds Japanese localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.it.xlf | Adds Italian localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.fr.xlf | Adds French localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.es.xlf | Adds Spanish localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.de.xlf | Adds German localization entries. |
| src/Aspire.Cli/Resources/xlf/NewCommandStrings.cs.xlf | Adds Czech localization entries. |
| src/Aspire.Cli/Resources/NewCommandStrings.resx | Defines search prompts, navigation labels, and diagnostics. |
| src/Aspire.Cli/Resources/NewCommandStrings.Designer.cs | Exposes the new resource strings. |
| src/Aspire.Cli/README.md | Documents source registration and interactive search. |
| src/Aspire.Cli/Program.cs | Registers the configured-source service. |
| src/Aspire.Cli/Commands/NewCommand.cs | Integrates search navigation and selected-template generation. |
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac380eac-c60d-4f83-9ad8-0416e791cdba
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Unsupported language filters can leave interactive invocations in a picker with no usable template choices.
2 open issues
1 resolved since last review
1 file not reviewed
src/Aspire.Cli/Resources/NewCommandStrings.Designer.cs: Generated file
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac380eac-c60d-4f83-9ad8-0416e791cdba
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
The new interactive workflow lacks terminal-level validation, and live authentication and template trust boundaries remain unvalidated.
3 open issues
1 file not reviewed
src/Aspire.Cli/Resources/NewCommandStrings.Designer.cs: Generated file
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac380eac-c60d-4f83-9ad8-0416e791cdba
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Duplicate template labels within a configured source can prevent the VS Code search picker from opening.
4 open issues
1 file not reviewed
src/Aspire.Cli/Resources/NewCommandStrings.Designer.cs: Generated file
Review effort: Balanced
Use object-only global template sources, validate edits before saving, and add template source add/remove commands. Discover static or searchable HTTPS catalogs without cloning until selection. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac380eac-c60d-4f83-9ad8-0416e791cdba
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
An explicit null templateSources section is treated as absent, causing interactive aspire new to show the built-in-only picker instead of reporting malformed configuration.
1 open issue
1 file not reviewed
src/Aspire.Cli/Resources/NewCommandStrings.Designer.cs: Generated file
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Disable four ProcessGuestLauncher methods and the TemporaryWorkspace post-start-failure theory on macOS only while investigating the stopped-child runtime hang. Preserve execution on Windows and Linux. Addresses #21259. This is a containment experiment, not a confirmed runtime fix. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac380eac-c60d-4f83-9ad8-0416e791cdba
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
The changes disable macOS cancellation and post-start failure regression coverage despite the linked issue requiring tests to remain enabled and providing no evidence of deterministic failures.
3 open issues
1 file not reviewed
src/Aspire.Cli/Resources/NewCommandStrings.Designer.cs: Generated file
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Tests selector57 / 100 PR test projects · 7 PR jobs, from 71 changed files. Selected PR test projects (57 / 100)
Selected PR jobs (7)
How these were chosen — grouped by what changed
🔧 show 53
📦 affected project 📦 affected project 📦 affected project 📦 affected project 🔧 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because an unpublished finding indicates that searches may miss templates when matching secondary short-name aliases.
2 resolved since last review
1 file not reviewed
src/Aspire.Cli/Resources/NewCommandStrings.Designer.cs: Generated file
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Pull request created: #1974
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1974 targeting Added docs for Note This draft PR needs human review before merging. |
## Description Enterprises can distribute template sources through their existing init-config repository without asking each developer to register those sources globally. This follows the template-source commands merged in #21329. When `ASPIRE_INIT_SOURCE_URL` is explicitly set, interactive `aspire new` search combines that repository's `templateSources` with the user's global sources. Source listing has a separate consent contract: - Human-readable `aspire template source list` uses the same candidate selection and consent prompt as `aspire new`. Accepting includes inherited sources; declining lists only global definitions. An employee-detected candidate can be offered through this consent flow. Non-interactive listing with an available candidate requires `--use-config-source` to accept or `--use-config-source false` to decline. - `aspire template source list --format json` never prompts and defaults to global-only output without resolving, validating, or fetching an init source. Add `--use-config-source` to acquire and include inherited definitions; Git authentication is unattended and diagnostics remain on stderr. - On every command exposing it (`new`, `init`, and template-source listing), bare `--use-config-source` means `true`. Explicit `true`/`false` values remain accepted for compatibility. Omitting the option retains nullable, unspecified consent rather than silently opting in. - Global aliases win case-insensitively as **complete definitions**, without inheriting repository/ref/path fields from an overridden source. - Non-colliding sources coexist, including branch-pinned Git sources and personal local-directory sources. - Inherited sources are runtime-only: they are never written to user or project configuration. Project-level template sources remain ignored, and listing never materializes project files. - Add/remove continue editing only global definitions. Removing a global override reveals the inherited source again when inheritance is enabled. - Existing project-materialization consent remains unchanged. For template discovery/search, an explicit environment URL authorizes runtime template-config acquisition; employee detection alone does not enable discovery inheritance. The implementation reuses init-config validation, Git authentication, cancellation, timeout, and immutable snapshot acquisition. Search and opted-in listing share collision behavior, and repeated reads reuse the invocation's snapshot. Attempted source acquisition failures remain explicit rather than returning a successful global-only result. ### User-facing usage For an init repository containing: ```json { "templateSources": { "enterprise": { "repository": "https://git.acme.example/platform/templates", "ref": "template-preview", "path": "templates" } } } ``` ```bash export ASPIRE_INIT_SOURCE_URL=https://git.acme.example/platform/aspire-init export ASPIRE_INIT_SOURCE_REF=config-preview # Global-only JSON; no init-source acquisition or consent prompt. aspire template source list --format json # Include inherited sources without prompting. aspire template source list --format json --use-config-source # Prompt whether to include the proposed configuration source. aspire template source list aspire new # Skip source consent with a bare opt-in on new/init as well. aspire new aspire-starter --use-config-source aspire init --use-config-source ``` The existing **Search for more templates** flow searches both enterprise and personal global sources. Unsetting `ASPIRE_INIT_SOURCE_URL` removes the explicit inherited source from subsequent invocations; human-readable listing may still offer an employee-detected candidate through its normal consent flow. ### Security considerations An explicitly set environment variable authorizes fetching template configuration during discovery/search without another consent prompt. Listing instead requires consent: human-readable output prompts when unspecified, while JSON requires explicit `--use-config-source` (or its compatible `true` form). Acquisition can make outbound Git connections and publish snapshots under Aspire home using the existing source-validation, authentication, timeout, locking, and cache infrastructure. JSON opt-in disables interactive Git authentication. Only `templateSources` is overlaid, and project-file materialization still requires its existing consent. No separate threat model or security review has been performed. ### Validation Passed after the bare-flag change: **782 tests**, **0 skipped**, **0 failures**: ```bash MSBUILDTERMINALLOGGER=false DiffEngine_Disabled=true \ dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- \ --filter-class '*.NewCommandLocalTemplateTests' \ --filter-class '*.ConfigSourceServiceTests' \ --filter-class '*.ConfigSourceCommandTests' \ --filter-class '*.InitCommandTests' \ --filter-class '*.TemplateSourceStartupTests' \ --filter-not-trait 'quarantined=true' \ --filter-not-trait 'outerloop=true' ``` Final parser validation passed **9 tests** after removing an unnecessary async test signature: ```bash MSBUILDTERMINALLOGGER=false DiffEngine_Disabled=true \ dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- \ --filter-method '*.TemplateSourceList_ConfigSourceOption*' \ --filter-not-trait 'quarantined=true' \ --filter-not-trait 'outerloop=true' ``` Passed: `MSBUILDTERMINALLOGGER=false dotnet build /t:UpdateXlf src/Aspire.Cli/Aspire.Cli.csproj --no-restore -v:quiet` and `git diff --check`. Passed: `MSBUILDTERMINALLOGGER=false dotnet build tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj --no-restore -v:quiet` with 0 warnings/errors. Existing E2E helper invocations now use the bare flag; the Linux-only Docker E2E suite was not executed locally. Behavioral command-invocation tests cover interactive accept/decline, omitted/bare/explicit true/false options, invalid values, following-option parsing, JSON no-prompt/no-fetch defaults, non-interactive consent, absent/detected candidates, alias precedence, preserved refs, output snapshots, and unchanged configuration files. `new` and `init` materialization tests now exercise bare acceptance. An isolated actual-CLI proof against a generic local Git fixture verified bare opt-in before/after `--format json`, compatible explicit/inline true, global-plus-inherited parseable JSON, ref/path preservation, unchanged settings, default/false no-fetch behavior, help on all three commands, invalid Boolean rejection, and bare new/init selecting the source without consuming subsequent options. Earlier real authenticated remote init/template proof covered combined interactive search, generation, overrides, non-persistence, environment removal, and unavailable-ref failure. Private fixture contents and screenshots are not included in this public PR. The full repository suite was not run. Fixes # (issue) ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - If yes, did you have an API Review for it? - [ ] Yes - [ ] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [ ] No - [x] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Description Show templates from configured Git and directory sources alongside built-in templates in interactive `aspire new`, without a separate source submenu. This builds on #21329, #21388, and #21420; it does not close those already-merged issues/PRs. The terminal picker uses nonselectable source headings, retains built-in ordering and defaults, and selects the exact discovered template object even when names collide. Leaves use `Template Name (Template Description)` without repeating the source or short name; missing descriptions leave just the name. The separate search action has been removed from the initial picker; explicit template search/invocation support is unchanged. Template source objects support optional `displayName` in global and accepted init-source configuration, for example: ```json { "templateSources": { "company": { "repository": "https://github.com/example/templates", "displayName": "Company templates" } } } ``` Missing, null, empty, or space-only display names use the alias. Other types and control characters fail existing strict configuration validation. `aspire config set templateSources.company.displayName "Company templates" --global` edits an existing source; no new flag is added. Typed load/save, source listing, configuration edits and runtime inheritance preserve the field. Global-over-inherited alias collisions replace the entire definition, including the display name. Inherited values are never persisted to global or generated-project configuration. Aliases remain the stable group identity, command reference and source-disambiguating flat label; identical display names do not merge sources or select a different source. Headings now use bold/default foreground, following existing CLI section headings such as `aspire doctor`, rather than Spectre's faded disabled grey. Leaf-only navigation is unchanged. Grouped console labels normalize multiline whitespace and truncate the combined name/description with an ellipsis to the available terminal-cell width, reserving arrow, indentation and padding. Source headings and the selected-value echo also fit the width. Spectre's cell-aware cropping preserves grapheme clusters, wide characters and combining sequences; metadata is safely escaped. Full template metadata is retained. The pinned Spectre.Console 0.57.2 uses the same converter for display and search and has no separate search predicate. Following the explicit UX decision to keep Spectre and truncate in the CLI, case-insensitive search matches only the visible prefix of a truncated label, not its hidden tail. No dependency update or custom prompt is introduced. Type-to-search moves to a matching choice; it does not filter the list. Grouping and terminal display labels are optional interaction-service metadata. VS Code retains the unchanged flat `string[]` RPC and complete unique source-qualified labels; extension grouping and description search remain deferred. Existing inherited-source consent/no-fetch boundaries, explicit and noninteractive flows, source acquisition warnings, cached snapshots, authentication protections, and post-action authorization remain intact. Validation for the latest friendly-heading revision: ```bash dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.ConsoleInteractionServiceTests' --filter-class '*.ExtensionInteractionServiceTests' --filter-class '*.NewCommandLocalTemplateTests' --filter-class '*.TemplateSourceConfigurationTests' --filter-class '*.AspireConfigFileTests' --filter-class '*.ConfigSourceServiceTests' --filter-class '*.SettingsSchemaBuilderTests' --filter-class '*.ConfigCommandTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` Result: **1048 passed, 0 failed, 1 skipped**. Covers typed serialization and schema, strict field validation, source updates/listing, inherited display names without persistence, complete global alias precedence, duplicate friendly headings and exact template generation, consent/no-fetch, unchanged extension fallback, terminal cell-width thresholds and narrow terminals, Unicode/combining sequences, escaped markup, normalized multiline labels and visible-prefix-only search. Rendering and configuration snapshots were reviewed and the suite rerun successfully. ```bash dotnet build /t:UpdateXlf src/Aspire.Cli/Aspire.Cli.csproj -v:q git diff --check ``` Result: **both passed**. Localized display-name validation and allowed-field diagnostics regenerated. A refreshed screenshot of the actual repository-built CLI, with friendly source names, bold/default headings and a long description cropped with an ellipsis, is provided in the associated Copilot handoff, not uploaded GitHub media. Earlier screenshots and the description-search recording predate these latest formatting changes. No cloud resources or external account changes were used. ## 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: Copilot App <223556219+Copilot@users.noreply.github.com>


Description
Add named global template sources so users can discover reusable templates from local directories and Git repositories. HTTP catalogs, searchable endpoints, substitutions, and pagination have been removed from this PR to keep the scope focused.
Interactive
aspire newretains the built-in template list and adds Search for more templates when global sources are configured and compatible command options are used. Searches match short names, display names, and actualtemplate.jsondescriptions case-insensitively; an empty search lists everything. Results show the configured source name. Users can search again or return to built-in templates. Validly configured sources that fail discovery warn independently so healthy sources remain usable; malformed configuration fails through normal command error handling rather than being silently skipped.Sources use objects only, registered under the global
templateSourceskey.aspire template source add,remove, andlistmanage global configuration. Add and configuration editing share typed validation. Unknown source fields are ignored when reading configuration for compatibility with newer CLI versions, and edits to known fields preserve existing unknown fields. Source names are compared case-insensitively using the shared source-name comparer. Source-management commands require modernaspire.config.json; legacy-only configuration reports an error directing users toaspire config infoto migrate it. No template-specific legacy migration is added.source listuses bold table headers and dashes for empty cells.source list --format jsonwrites a sorted object keyed by source name to stdout, preserving configured fields without adding defaults. It includes incomplete definitions without discovering templates or contacting repositories. Configuration edits require the existing lock and publish validated edits atomically; rejected operations preserve configuration bytes.Configured Git sources reuse existing ref resolution, commit-keyed checkouts, path validation, parameter prompts, and generation. Template-engine sessions are cached by concrete directory for the CLI invocation, so aliases share discovery without losing source labels. Git ref changes create a new checkout/session while already selected templates remain pinned.
Existing explicit
--template-path,--template-repository, and--template-repository-refoptions remain unchanged. No external dependencies were added. Disabling built-in templates is deferred. Source-qualified naming is tracked separately in #21363.User-facing usage
Global
~/.aspire/aspire.config.json:{ "templateSources": { "company": { "path": "/absolute/path/to/company-templates" }, "release": { "repository": "https://github.com/microsoft/aspire-templates", "ref": "release/17.0", "path": "templates" } } }Use absolute local paths. Git
repositoryaccepts HTTPS/SSH URLs; omittedref/pathmeanHEAD/.. SCP shorthand and embedded credentials are not accepted. Source names cannot contain dots, colons, or control characters. Project-leveltemplateSourcessettings are not used. Help/default template selection do not discover sources. Configured templates cannot be combined with--source,--version,--channel, or--language.Example
source list --format jsonoutput for one local source:{ "company": { "path": "/absolute/path/to/company-templates" } }Screenshots / Recordings
TODO: Attach a reviewer-facing recording of source add/list/remove and
aspire new→ Search for more templates → query → source-labelled results → template parameter prompts. The terminal E2E scenario passed and records locally; no public recording is attached. Retry/back navigation, Git progress, and unavailable-source warnings also merit demonstration.Validation
./restore.sh— passed earlier in this session.dotnet build /t:UpdateXlf src/Aspire.Cli/Aspire.Cli.csproj— passed; CLI XLF files regenerated after catalog removal and again after thetemplateSourcesrename.MSBUILDTERMINALLOGGER=false FORCE_COLOR=1 dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.NewCommandLocalTemplateTests' --filter-class '*.TemplateSourceStartupTests' --filter-class '*.AspireConfigFileTests' --filter-class '*.ConfigurationServiceTests' --filter-class '*.TemplateSourceConfigurationTests' --filter-class '*.NewCommandTests' --filter-class '*.DotNetTemplateFactoryTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed on a0925ca: 668 passed, 5 skipped, no failures. Covers the global-key rename, forward-compatible loading, preservation of unknown fields during edits, and existing malformed/invalid-value failures.dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.ConsoleInteractionServiceTests' --filter-class '*.NewCommandTests' --filter-class '*.NewCommandLocalTemplateTests' --filter-class '*.NewCommandTemplateConfigPersistenceTests' --filter-class '*.DotNetTemplateFactoryTests' --filter-class '*.TemplateSourceConfigurationTests' --filter-class '*.ConfigCommandTests' --filter-class '*.ConfigurationServiceTests' --filter-class '*.ConfigurationHelperTests' --filter-class '*.AspireConfigFileTests' --filter-class '*.TemplateSourceStartupTests' --filter-class '*.RootCommandTests' --filter-class '*.CompletionsCommandTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed before the final naming/compatibility follow-up: 1,100 passed, 6 skipped, no failures.dotnet publish src/Aspire.Cli/Aspire.Cli.csproj -c Debug -r linux-arm64 --self-contained /p:PublishAot=false /p:BundlePayloadPath="$PWD/artifacts/bundle/aspire-17.0.0-local.20261020.t031859-linux-arm64.tar.gz" -o "$PWD/artifacts/pr21329-ci/catalog-removal-hive/bin"— passed before the final naming/compatibility follow-up; published the Linux CLI into an existing isolated test hive.tar -czf artifacts/pr21329-ci/catalog-removal-e2e.tar.gz -C artifacts/pr21329-ci/catalog-removal-hive .— passed; repackaged the hive.ASPIRE_E2E_ARCHIVE="$PWD/artifacts/pr21329-ci/catalog-removal-e2e.tar.gz" dotnet test --project tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj --no-launch-profile -- --filter-method '*.ConfiguredTemplateSourceCommandsAndSearchWithoutDotNetSdk' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed, 1 terminal E2E test, before the final naming/compatibility follow-up. Exercises source add/list/remove, table/JSON output, rejected edits without byte changes, local/Git search, description-only case-insensitive search, retry/back navigation, and actual template prompts/output without a .NET SDK in the container. Not rerun locally for a0925ca.git diff --check— passed before commit.The full
./localhive.shpackaging attempt was blocked by missing hostpwshin unrelated npm packaging. Reusing the existing hive and publishing the CLI enabled terminal validation without changing dependencies or build scripts. Native AOT publishing and live authenticated remote repositories were not validated locally. CI for the latest pushed commit is being monitored; the preceding commit reached green after a macOS retry for the recurring test-host hangs tracked in #21259 and #21335.Security considerations
Users must trust configured directories, repositories, and templates; this is not a sandbox for untrusted templates. Configured Git repositories may be resolved/fetched during search. Existing non-interactive Git acquisition, sanitized failures, immutable checkouts, pre-fetch traversal checks, and post-checkout symlink checks are reused. HTTP catalog requests are not part of this change.
Source add/remove and config set/delete require the configuration lock and publish validated edits atomically. Rejected edits preserve original bytes. Invalid known-field types, conflicting locations, escaping repository paths, and edits to unknown source fields are rejected. Existing unknown source fields are allowed for forward compatibility. Only explicitly selected templates are generated.
No threat model or security review has been performed for this spike.
Checklist
<remarks />and<code />elements on your triple slash comments?