Skip to content

fix: Normalize terminology in sample updates#1397

Open
IEvangelist wants to merge 2 commits into
mainfrom
dapine/fix-sample-terminology
Open

fix: Normalize terminology in sample updates#1397
IEvangelist wants to merge 2 commits into
mainfrom
dapine/fix-sample-terminology

Conversation

@IEvangelist

Copy link
Copy Markdown
Member

Summary

  • centralize Aspire terminology normalization for generated data
  • normalize sample titles, descriptions, README content, and AppHost code before writing samples.json
  • prevent future generated catalogs from reintroducing .NET Aspire or app host

This fixes the sample-update regression visible in #1393.

Tests

  • pnpm --dir ./src/frontend exec vitest run --config vitest.config.ts tests/unit/update-samples.vitest.test.ts tests/unit/update-integrations.vitest.test.ts
  • replayed the samples.json content from chore: Update integration data and GitHub stats (7/23/26) #1393 through the normalizer (8 deprecated occurrences reduced to 0)

Copilot AI review requested due to automatic review settings July 23, 2026 01:56

@aspire-repo-bot aspire-repo-bot Bot 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.

Automated wording suggestions from the forbidden-words check. Apply the suggestions to resolve them.

Comment thread src/frontend/scripts/aspire-terminology.ts Outdated
Comment thread src/frontend/scripts/aspire-terminology.ts Outdated
Comment thread src/frontend/tests/unit/update-samples.vitest.test.ts Outdated
Comment thread src/frontend/tests/unit/update-samples.vitest.test.ts Outdated
Comment thread src/frontend/tests/unit/update-samples.vitest.test.ts Outdated
Comment thread src/frontend/tests/unit/update-samples.vitest.test.ts Outdated
Comment thread src/frontend/tests/unit/update-samples.vitest.test.ts Outdated
Comment thread src/frontend/tests/unit/update-samples.vitest.test.ts Outdated

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.

Pull request overview

This PR centralizes terminology normalization (e.g., replacing “.NET Aspire” and “app host”) into a shared helper and applies it during data generation to keep samples.json and integration metadata consistent going forward, addressing the regression noted in #1393.

Changes:

  • Introduces normalizeAspireTerminology() and reuses it across generators.
  • Normalizes sample titles/descriptions/README text/AppHost code during update-samples generation and makes the script safe to import in tests by guarding the main() entrypoint.
  • Updates integration description normalization to use the shared helper and adds unit coverage (including asserting existing samples.json has no deprecated terms).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/frontend/tests/unit/update-samples.vitest.test.ts Adds unit tests for sample terminology normalization and validates generated samples.json is clean.
src/frontend/src/utils/samples.ts Updates documentation comment to reflect that readmeRaw is terminology-normalized upstream content.
src/frontend/scripts/update-samples.ts Centralizes sample field normalization and guards main() so the module can be imported safely.
src/frontend/scripts/update-integrations.ts Replaces ad-hoc regex normalization with the shared terminology helper.
src/frontend/scripts/aspire-terminology.ts Adds a shared terminology normalizer used by generator scripts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1397. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1397 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: febf329c-97d8-41aa-bd42-43273bc57fe7
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: febf329c-97d8-41aa-bd42-43273bc57fe7
@IEvangelist
IEvangelist force-pushed the dapine/fix-sample-terminology branch from 9bbb307 to ec1ec43 Compare July 23, 2026 13:32
@IEvangelist IEvangelist added the ci:skip-forbidden-words Allows maintainers to bypass false positives in the forbidden-word check. label Jul 23, 2026

@JamesNK JamesNK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review summary

Phase A source checkpoint: microsoft/aspire main at e6388016c6c4b90f47589c15e9714975dc4aebc4 (2026-07-24). Claims: 0 product API/config/CLI claims were introduced, so there are no source verdicts to report.

Phase B: No documentation route or rendered example changed; 0 critical issues and 0 warnings. The docs server was not started because there was no affected page to exercise and the requested review excluded a website build.

The generation-code review found two blocking normalization cases, documented inline.

Phase A - Claim verification

No changed file introduces a factual claim about Aspire APIs, runtime behavior, configuration, CLI surface, or package versions.

Verified and verified-with-nuance claims

None; the changed prose is implementation-local commentary rather than Aspire product documentation.

Phase B - Doc-tester results

Documentation Test Report

Focus Area: PR #1397 changed-file route mapping
Date: 2026-07-24
Tester: doc-tester agent
PR ref: ec1ec43481ddfce284d53cddf6c65859beb613c5
Local server: Not started - no documentation routes were affected.

Summary

Category Passed Failed Warnings
Content Accuracy 0 0 0
Code Examples 0 0 0
CLI Commands 0 0 0
Links 0 0 0

Critical Issues

None.

Warnings

None.

Passed Checks

  • Changed-file mapping confirmed that the PR only changes generator scripts, a sample utility comment, and unit tests; no rendered documentation page or route is modified.

Recommendations

None for rendered documentation.

Knowledge Gaps

None.

@@ -0,0 +1,19 @@
const horizontalWhitespace = String.raw`[ \t]+`;
const legacyAspirePattern = String.raw`\.NET${horizontalWhitespace}Aspire`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This pattern also matches the .NET Aspire substring inside a longer term. For example, ASP.NET Aspire application becomes ASPAspire application, and Microsoft.NET Aspire becomes MicrosoftAspire. Because this helper runs over arbitrary README and AppHost source text, a future input can be corrupted rather than merely normalized. Please require .NET not to be preceded by a word character and add regression cases for these inputs.

const legacyAspirePattern = String.raw`\.NET${horizontalWhitespace}Aspire`;
const legacyAppHostPattern = String.raw`\bapp${horizontalWhitespace}host\b`;

const aspireWithArticle = new RegExp(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The article correction only recognizes unformatted text, but readme and readmeRaw are raw Markdown. A **.NET Aspire** project currently becomes A **Aspire** project, and A [.NET Aspire](https://aspire.dev/) project becomes A [Aspire](https://aspire.dev/) project. That leaves the generated docs grammatically incorrect. Please handle Markdown wrappers/text nodes when correcting the article and cover bold/link cases in the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:skip-forbidden-words Allows maintainers to bypass false positives in the forbidden-word check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants