Skip to content

[Swagger Linter Migration] PutInOperationName + PatchInOperationName + DeleteInOperationName -> use-correct-verb - #5673

Merged
Yuchao Yan (msyyc) merged 29 commits into
mainfrom
promote-lintdiff-delete-in-operation-name
Oct 22, 2026
Merged

Yuchao Yan (msyyc) merged 29 commits into
mainfrom
promote-lintdiff-delete-in-operation-name

Conversation

@msyyc

@msyyc Yuchao Yan (msyyc) commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Consolidate PutInOperationName, PatchInOperationName, and DeleteInOperationName into @azure-tools/typespec-client-generator-core/use-correct-verb, as agreed in the review discussion.

This PR absorbs the PATCH promotion #5665 and replaces the already-merged PUT rule from #5457. Both open promotion histories are preserved by consolidation merge commit d12175650. Following the combined-migration presentation in #5663, #5556, #5294, and #5423, further review of these three SDK naming checks belongs here. Superseding #5665 does not imply CI or review approval; its branch and review history remain intact.

Combined behavior and legacy-rule mapping

Legacy Swagger validator Previous native rule/promotion Combined requirement
PutInOperationName use-create-for-put, merged #5457 PUT common SDK names start with create.
PatchInOperationName Proposed use-update-for-patch, #5665 PATCH common SDK names start with update.
DeleteInOperationName Proposed use-delete-for-delete, this PR DELETE common SDK names start with delete.
  • A native operation listener resolves HTTP metadata once per eligible concrete endpoint, using one common SDK-name resolver. Nested services produce one warning per offending operation. Explicit-service ancestors and the nonrecursive global fallback are preserved. Prefix matching remains case-insensitive; GET, POST, and HEAD are not checked.
  • getLibraryName(..., AllScopes) honors unscoped @clientName, exact names, and the supported friendly-name fallback. Language-specific overrides and explicit OpenAPI operation IDs do not replace the common name.
  • Diagnostics target original operations. Both ARM and data-plane service endpoints are supported without requiring provider metadata. Client-only declarations outside HTTP services are not checked.
  • The rule does not mutate namespaces, select emitters, project API versions, reconstruct historical renamed names, or import AutoRest.
  • The single client-sdk registration is explicitly disabled by default. Data-plane/resource-manager rulesets and C# defaults are unchanged.
  • Separate rule implementations, their single-consumer traversal helper, and duplicate per-verb documentation/test files are replaced by one canonical rule, documentation page, and parameterized behavior suite. The unnecessary package-level AutoRest import isolation test has been removed; the canonical rule suite owns behavior coverage.

Compatibility and migration

use-create-for-put is replaced, not retained as a second public alias. Update linter configuration and #suppress diagnostic codes to use-correct-verb. Anyone who had explicitly enabled PUT naming guidance will now opt into PATCH and DELETE checks as well. The proposed PATCH/DELETE rule names are likewise replaced.

Renaming an already-shipped SDK method can be breaking. The diagnostic and documentation retain this warning; approved compatibility exceptions can use operation-level suppression with a justification. This change does not itself rename generated methods.

The package has one feature Chronus entry describing the consolidated behavior and configuration migration, plus a separate rulesets registration entry. Generated linter references, the ARM migration table, and TCGC documentation knowledge use the combined name.

Consolidation and immutable source provenance

Check Recorded lintdiff source Native promotion incorporated
PUT #5455, feature/lintdiff-put-in-operation-name, recorded source 99cead8b6584f5cc1b0db3bf7810b53aa0eb221b Merged #5457; implementation already present on main.
PATCH #5664, source e009a4f53cc01eaa5c6a9ce85654fb1c4a8a6f4f #5665 at 8710828adc010571458235df8ff50e4019ce3107.
DELETE #5670, source a0b5e8d9a9edee978219c2490c72eac7cc79845b This PR at 5fc361c18b79cfdf8460565fc7e3123669cc394d, before consolidation.

The lintdiff sources, fixtures, snapshots, and migration evidence are not changed. The PUT source SHA is recorded historical provenance; its GitHub availability is not newly claimed.

The approved native SDK-name adaptation remains intentional: a valid unscoped SDK override can fix an invalid authored name, or invalidate an otherwise compliant authored name. Serialized operationId underscore/group-prefix/missing-ID exemptions are not reproduced. Historical source corpus counts are not fresh combined-rule results, and exact Swagger diagnostic/count parity is not claimed. The naming policy remains in TCGC rather than introducing SDK dependencies into Azure Core or ARM.

Regression coverage

The canonical suite keeps valid/invalid mappings for all three verbs and exercises shared casing/prefix boundaries, common/scoped/exact/friendly-name precedence, explicit OpenAPI IDs, authored targets, group/underscore contrasts, multiple endpoints, and service selection once. The redundant naming/verb Cartesian product and response-status matrix have been removed.

Standard ARM create/patch/delete aliases remain literal fixtures, including both common-name override directions. A mixed-verb regression requires three findings together while allowing GET/POST/HEAD. Nested explicit services require exactly one warning on the original operation; scope controls cover explicit-service descendants, excluded external declarations, nonrecursive global operations/direct interfaces, and concrete aliases versus templates. Public package registration/C# defaults have a separate registration suite; central ruleset coverage retains disabled-by-default activation and legacy-ID absence.

The bespoke Markdown reader/fence parser and raw suppression test are deleted, not relocated. Documentation uses short standard-template before/after snippets and one focused common-name fix, without a setup appendix. All four actual final snippets were compiled once in an explicit public ARM context with the rule enabled: incorrect 3 warnings, correct/common-name/suppression 0 diagnostics. This receipt is one-time evidence, not continuous documentation coverage. Released-ID migration and SDK compatibility guidance remain intact.

Validation (selected review fixes, October 21, 2026)

  • mise exec -- pnpm --filter @azure-tools/typespec-client-generator-core build: passed, including production TypeScript and TypeSpec library lint.
  • mise exec -- pnpm --filter @azure-tools/typespec-client-generator-core test test/rules/use-correct-verb.test.ts test/linter-registration.test.ts --maxWorkers=1: 30 tests passed in 2 files, unchanged test/hook timeouts.
  • mise exec -- pnpm --filter @azure-tools/typespec-azure-rulesets test test/validate-rules-defined.test.ts --maxWorkers=1: 6 tests passed.
  • TCGC docs regeneration, explicit native/generated Markdown formatting checks, root pnpm format and pnpm lint, Chronus status, and diff hygiene passed.
  • Docs regeneration retains existing missing-diagnostic-documentation and unused-parameter warnings on untouched APIs.
  • Initial focused-test collection found the admitted head's new examples dependency missing. Frozen-lockfile restoration linked JS dependencies but exited nonzero in unrelated Python preparation (pythonhosted TLS handshake failure); the dependency closure was then built sequentially. An initial target annotation error was corrected and the final target build passed. The install command is not reported as passing.

These are local results for the selected findings, not a claim that fresh GitHub CI or review is complete. No new full-package/full-monorepo tests, website build, full test-project typecheck, or lintdiff corpus comparison is claimed. New human documentation feedback outside the selected findings remains for separate review; this update does not claim whole-PR readiness.

Original DELETE promotion description before consolidation (historical)

Original Swagger linter

Checks:

  • Inspect DELETE operations selected from paths and x-ms-paths.
  • Read operationId, ignoring absent, empty or non-string values.
  • Ignore IDs without an underscore.
  • Accept the case-sensitive Delete prefix before the underscore or after a word-character group prefix.
  • Report a warning on the offending operationId when neither accepted form matches.

How the Swagger linter works

The Spectral function checks selected DELETE operation objects and applies serialized-ID regular expressions. It does not inspect SDK metadata or require ARM provider metadata. Its underscore/group-prefix exemptions can accept a Delete-prefixed group with a non-delete method, or ignore a standalone invalid method ID. Those serialization-dependent exemptions are intentionally not copied. Native endpoint selection also avoids warnings on declarations used only for client customization. The source migration evidence documents emitted-name overrides, historical version selection, one-sided projects and compilation failures rather than treating equal totals as proof of equivalence.

Source TypeSpec lintdiff rule

  • Validator ID: DeleteInOperationName; canonical slug: delete-in-operation-name.
  • Local rule: tsp-lintdiff-local-linter/delete-in-operation-name.
  • Original lintdiff source rule.
  • Canonical source repository: Azure/typespec-azure; source branch: feature/lintdiff-delete-in-operation-name.
  • Source draft PR: [WIP][Swagger Linter Development] DeleteInOperationName #5670.
  • Immutable source commit: a0b5e8d9a9edee978219c2490c72eac7cc79845b; development GitHub review clean after two Balanced rounds on this final pushed commit.
  • Source worktree: C:\dev\worktrees\lintdiff-delete-in-operation-name; clean, no uncommitted source changes.

The source was assumed done for this promotion run and was not modified. It checks authored names on concrete HTTP service endpoints, DELETE only, with a case-insensitive delete prefix and warning targets on the original operation. Initial source commit 8af7a71258c41b8ca10950023c62cc4633bb24fc is historical; the reviewed source above additionally fixes the harness's stale coverage-kind assertion without changing production behavior.

Destination analysis

The agent selected @azure-tools/typespec-client-generator-core because the approved naming-family promotion contract governs common SDK method names. Existing use-create-for-put and supported getLibraryName(..., AllScopes) establish that ownership and implementation pattern. The new public name is use-delete-for-delete.

Both applicability and compiler/HTTP-only authored-name semantics make Azure Core a plausible authored-domain alternative. Core's use-standard-names already checks authored DELETE names in data-plane rulesets, but not the common SDK override domain. An SDK resolver must not introduce TCGC dependencies into Core or ARM. ARM fixture origin alone does not establish ARM-only semantics; this rule requires neither provider metadata nor ARM helpers in production. Existing TCGC get-operation-name is GET-specific and is not equivalent DELETE coverage.

How the promoted TypeSpec linter works

The root listener uses getAllHttpServices and checks concrete service operations with verb delete. A TCGC context created with { mutateNamespace: false } resolves the common SDK name using getLibraryName(context, operation, AllScopes). This honors unscoped client names, exact-name normalization and supported friendly-name fallback, independently of positive language-specific overrides and explicit OpenAPI operation IDs. No emitter or API-version projection is selected, and historical renamed names are not reconstructed.

The prefix remains case-insensitive, severity remains warning and each finding targets the original operation, including when an override supplies the displayed SDK name. Group names do not mask an invalid method name. The authorized adaptation changes only the authored-name domain to common SDK names; source selection, DELETE condition, prefix policy and diagnostic targets remain intact. There is no hand-rolled resolver, serialized-reference inference, namespace mutation or emitter coupling.

The client-sdk ruleset registers the new rule with plain false; ARM/data-plane rulesets and C# default rules are unchanged. Separate Chronus entries classify destination availability as feature and disabled-only ruleset registration as internal.

Fixture-to-native test mapping

Original lintdiff fixture Native vitest case Coverage note
compliant-with-template it("reports a customized standard ARM delete endpoint") Actual source fixture contains a compliant delete and a violating remove despite its directory name. Replace legacy custom action/suppression with supported ArmResourceDeleteSync aliases; preserve prefix contrasts.
compliant-with-template it("accepts a standard ARM delete endpoint") Actual source fixture contains a compliant delete and a violating remove despite its directory name. Replace legacy custom action/suppression with supported ArmResourceDeleteSync aliases; preserve prefix contrasts.
remove-endpoint it("reports an invalid HTTP SDK name") Concrete remove endpoint warns; reduced generic HTTP operation preserves the method-name predicate.
delete-endpoint it("accepts a valid HTTP SDK name") Concrete delete-prefixed endpoint complies.
common-name-fixes-id it("accepts a common SDK name override") Authorized domain adaptation: unscoped valid SDK name fixes authored remove; source authored rule intentionally still warns.
common-name-invalidates-id it("reports an invalid unscoped client name on the authored operation") Authorized domain adaptation: invalid common override warns despite authored deleteWidget; target remains original declaration.
ungrouped-remove it("reports an invalid HTTP SDK name") Same minimal standalone endpoint proves no underscore/group exemption; shared native case is deliberate.
delete-group-remove it("does not let a Delete-prefixed group mask an invalid method name") Group prefix cannot hide invalid common method name.
N/A (documentation regression) it("reports the published incorrect template alias") Compile actual Markdown setup and incorrect ArmResourceDeleteSync alias; require one warning on remove.
N/A (documentation regression) it("accepts the published correct template alias") Compile actual Markdown correct alias with no target-rule diagnostics.
N/A (documentation regression) it("accepts the published template client name override") Compile actual Markdown common-name override with no target-rule diagnostics.
N/A (documentation regression) it("accepts the published template suppression") Compile actual Markdown suppression with the rule explicitly enabled through the compiler linter; require no diagnostics.

Additional native cases prove SDK override directions, language-specific and mixed names, exact names, friendly fallback, explicit-ID independence, original targets, multiple endpoint findings, non-DELETE controls, case-insensitive prefixes, source endpoint-selection regression, and a common client name on a supported standard ARM deletion alias. Framework-only import exclusion, ordinary inheritance/traversal, uninstantiated-template and suppression tests were not mechanically copied. No validator snapshots, fixtures or corpus payloads are included.

Migration evidence

See source migration.md for focused tests, representative services, full-corpus counts, one-sided project explanations, retained compile failures and uncertainty. Those counts describe the immutable authored-name source, not fresh SDK-domain equivalence or predicted impact. Promotion did not rerun the lintdiff harness or corpus.

Validation

  • Required target dependency-closure build, TCGC package build/lint: exit 0.
  • Final emitter-free native rule suite: 28/28, including four tests that read and compile the actual published Markdown examples; target rule also passes all 28 cases in the full package run.
  • Required TCGC docs regeneration and explicit formatting/check of all four native/generated Markdown paths with NUL ignore override: exit 0; generated ignored rule page remains unstaged.
  • Following template-first skill update Require template-first lint documentation examples #5678 (created before this documentation update), the incorrect/correct, common-name override, and suppression examples use ArmResourceDeleteSync<Widget> instead of raw routes. The standalone shared setup includes all imports/usings. Incorrect remove produces exactly the target warning; correct delete, common-name override, and compiler-enabled suppression produce none. Existing generic HTTP behavior tests remain intact.
  • Rulesets build/lint: exit 0; discovery tests: 5/5.
  • Separate feature/internal Chronus entries verified LF; plain pnpm chronus status: exit 0. Before commit, both change add attempts reported no changed package, so the documented fallback created only these two entries.
  • Full TCGC initial required run: 1660 passed, one 10000ms per-test timeout in arm client with sub clients, two existing skips; 1663 tests in 102 files, natural exit 1.
  • Single coordinator-granted diagnostic, exactly mise exec -- pnpm --filter @azure-tools/typespec-client-generator-core test --maxWorkers=1: 1661 passed, zero failures, same two skips and 1663 tests/102 files, natural exit 0. Same code, assertions, dependencies and 10000ms test/hook limits; no pool change. Timeout recovered with UNPROVEN original cause. The task-wide diagnostic allowance is exhausted (1/1); the scoped concurrency profile may persist for matching later package validation without granting another retry.
  • Latest full package run after template documentation/test changes: 1665 passed, two unchanged existing skips, 1667 total tests in 102 files, exit 0 using the same --maxWorkers=1 profile and unchanged test/hook timeouts. The four added tests account for the population increase.
  • Scoped TypeScript formatting/check and diff hygiene pass. The initial nine-file promotion patch previously passed read-only cached application check with an empty index; subsequent review/doc updates are scoped to the maintained rule documentation and native/rulesets tests.

Validation limitations

Required docs regeneration exits 0 with existing documentation warnings for unnecessary-emitter-option and unused API @param tags on untouched APIs; these unrelated warnings were retained, not repaired. The optional repository-wide wrapper was not warranted for this isolated rule and registration change. No local website/dependency-closure build was run; CI's Website job remains authoritative. The original full-suite timeout remains retained evidence, not an environmental diagnosis.

Promotion sync policy

The source remains immutable during promotion. A verified source-semantic gap blocks this PR and returns evidence to the owning queue, which alone may authorize its bounded source-repair cycle. Refresh native provenance incrementally only after a new clean reviewed source head; do not repair the source or silently alter its semantics in the promoted copy. The expressly approved common SDK naming adaptation is not source repair.

Review cleanup (October 19, 2026)

Renamed the groups to HTTP SDK names and standard ARM operations, preserving their separate SimpleTester and ARM/standalone setup. Removed the extra DELETE behavior file; focused package-level public-entry coverage retains the throwing AutoRest guard, now outside the PUT behavior suite as well. Removed redundant internal entries; feature and rulesets coverage remain.

Published in 50c4b74. Fresh focused validation: 68 tests passed, package production typecheck, root pnpm format, root pnpm lint, and diff hygiene passed. The full test TypeScript project retains pre-existing diagnostics (15 before, 15 after); the exact-head baseline comparison found no new diagnostics, accounting explicitly for moved tests and any removed duplicate fixture. This is not a claim that the full test TypeScript project is error-free or that pending CI has passed. These current file-layout/coverage statements supersede earlier descriptions of the removed test files; historical validation remains historical.

Yuchao Yan (msyyc) and others added 3 commits October 10, 2026 14:43
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8bf3420c-d859-4ac1-81e8-2081d1fded84
Follow the user-approved use-create-for-put pattern, keep client-sdk registration disabled, and remove the prior ARM introduction.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8bf3420c-d859-4ac1-81e8-2081d1fded84
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 832854b7-de67-4f1f-8fe1-6a3e9897aeee
@msyyc Yuchao Yan (msyyc) added the int:azure-specs Run integration tests against azure-rest-api-specs label Oct 12, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added lib:tcgc Issues for @azure-tools/typespec-client-generator-core library meta:website TypeSpec.io updates linter Issues related to linter rules labels Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @azure-tools/typespec-azure-rulesets
  • ✅ @azure-tools/typespec-client-generator-core
Show changes

@azure-tools/typespec-azure-rulesets - internal ✏️

Replace the separate SDK verb naming registrations with @azure-tools/typespec-client-generator-core/use-correct-verb, disabled by default in the client-sdk ruleset.

@azure-tools/typespec-client-generator-core - feature ✏️

Consolidate use-create-for-put, PATCH naming guidance, and DELETE naming guidance into the opt-in use-correct-verb lint rule. Common SDK method names must start with create for PUT, update for PATCH, and delete for DELETE, case-insensitively. Replace use-create-for-put in linter configuration and suppressions with use-correct-verb; enabling it also checks PATCH and DELETE. Renaming an already-shipped SDK method may be a breaking change.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

📦 Package size report

✅ No notable package size changes compared to the base branch.

14 package(s) with no notable change
Package Packed (base → head) Δ Packed Unpacked (base → head) Δ Unpacked
@azure-tools/typespec-client-generator-core 250.01 KB → 249.45 KB -577 B (-0.2%) 1.33 MB → 1.32 MB -3.79 KB (-0.3%)
@azure-tools/typespec-azure-rulesets 6.00 KB → 5.94 KB -64 B (-1.0%) 35.20 KB → 35.11 KB -88 B (-0.2%)
@azure-tools/azure-http-specs 143.53 KB → 143.53 KB — 1.20 MB → 1.20 MB —
@azure-tools/typespec-autorest 87.87 KB → 87.87 KB — 424.17 KB → 424.17 KB —
@azure-tools/typespec-autorest-canonical 7.42 KB → 7.42 KB — 26.00 KB → 26.00 KB —
@azure-tools/typespec-azure-core 136.55 KB → 136.55 KB — 733.30 KB → 733.30 KB —
@azure-tools/typespec-azure-examples 80.15 KB → 80.15 KB — 383.36 KB → 383.36 KB —
@azure-tools/typespec-azure-portal-core 36.26 KB → 36.26 KB — 242.62 KB → 242.62 KB —
@azure-tools/typespec-azure-resource-manager 192.89 KB → 192.89 KB — 1.15 MB → 1.15 MB —
@azure-tools/typespec-go 264.28 KB → 264.28 KB — 1.35 MB → 1.35 MB —
@azure-tools/typespec-java 20.22 MB → 20.22 MB — 22.52 MB → 22.52 MB —
@azure-tools/typespec-metadata 15.88 KB → 15.88 KB — 62.08 KB → 62.08 KB —
@azure-tools/typespec-python 42.59 KB → 42.59 KB — 166.02 KB → 166.02 KB —
@azure-tools/typespec-ts 550.66 KB → 550.66 KB — 2.75 MB → 2.75 MB —

Packed = gzipped .tgz published to npm. Unpacked = total extracted size. 🆕 added, 🗑️ removed. Packages from the core/ submodule are not included.
🔴 grew · 🟢 shrank — only changes of at least 512 B and 0.5% are marked.

@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@azure-tools/typespec-azure-rulesets@5673
npm i https://pkg.pr.new/@azure-tools/typespec-client-generator-core@5673

commit: 91e0a0f

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

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 disabled ruleset registration lacks a regression assertion, and the suppression guidance is incomplete.

2 open findings
What changed in this PR

Adds an opt-in TCGC linter rule requiring DELETE SDK method names to begin with delete.

Changes:

  • Implements and registers the rule.
  • Adds comprehensive rule tests and documentation.
  • Registers it as disabled by default with Chronus entries.
File Description
.chronus/​changes/​register-use-delete-for-delete.md Records ruleset registration.
.chronus/​changes/​use-delete-for-delete.md Records the new feature.
packages/​typespec-azure-rulesets/​src/​rulesets/​client-sdk.ts Registers the rule as disabled.
packages/​typespec-client-generator-core/​README.md Lists the new rule.
packages/​typespec-client-generator-core/​src/​linter.ts Adds the rule to TCGC’s linter.
packages/​typespec-client-generator-core/​src/​rules/​use-delete-for-delete.md Documents usage and suppression.
packages/​typespec-client-generator-core/​src/​rules/​use-delete-for-delete.ts Implements DELETE endpoint validation.
packages/​typespec-client-generator-core/​test/​rules/​use-delete-for-delete.test.ts Tests naming and override behavior.
website/​src/​content/​docs/​docs/​libraries/​typespec-client-generator-core/​reference/​linter.md Adds the website reference entry.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/typespec-azure-rulesets/src/rulesets/client-sdk.ts Outdated
Comment thread packages/typespec-client-generator-core/src/rules/use-delete-for-delete.md Outdated
Add regression coverage for the disabled SDK naming rule registration and complete the suppression example.

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

Copilot-Session: 832854b7-de67-4f1f-8fe1-6a3e9897aeee

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 ARM reviewer guide is missing the required entry for this ARM-applicable migrated rule.

0 open findings

2 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Add ARM reviewer guide entry for this rule

packages/​typespec-client-generator-core/​src/​rules/​use-delete-for-delete.md:7

Because this rule explicitly applies to ARM services, it also needs a manual entry in the ARM reviewer guide at website/src/content/docs/docs/howtos/ARM/arm-rules.md. That guide requires a documentation link, LintDiff mapping, and impact for applicable rules (arm-rules.md:54-56) and already lists the analogous TCGC use-create-for-put rule at line 144; docs regeneration does not update this table.

🧠 Review effort: Balanced

Yuchao Yan (msyyc) added a commit that referenced this pull request Oct 13, 2026
## Why

The documentation in #5673 used raw HTTP routes for its
incorrect/correct examples even though supported `ArmResourceDeleteSync`
aliases demonstrate the same diagnostic contrast. The previous policy
required ARM templates only after selecting an ARM audience, allowing a
generic HTTP audience to bypass available templates.

The user requested a template-first requirement in
`/do-linter-development-task-one-by-one` and its related skills, with
this skill-only PR targeting the current branch,
`feature/lintdiff-migration-new`. The promotion documentation will be
updated separately after this PR is created.

## Changes

- Forward the template-first requirement in the queue's promotion
handoff.
- Require supported templates whenever they can demonstrate both
incorrect and correct behavior; inspect customization points before
choosing handwritten routes.
- Preserve audience-appropriate authoring and diagnostic contrast, and
require a documented template limitation for handwritten exceptions.
- Enforce the same requirement in promotion documentation/review and
documentation-example validation.

## Validation

Formatted and checked only the four changed skill Markdown files with
the existing Prettier installation; `git diff --check` passed. Reviewed
the complete four-file diff and existing cross-references. No helper,
package, dependency, submodule, or rule changes; no package builds or
tests are needed.

Copilot-Session: 832854b7-de67-4f1f-8fe1-6a3e9897aeee
Replace raw routes with ArmResourceDeleteSync aliases and validate the actual published examples, including compiler-enabled suppression.

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

Copilot-Session: 832854b7-de67-4f1f-8fe1-6a3e9897aeee
…te-in-operation-name

# Conflicts:
#	website/src/content/docs/docs/howtos/ARM/arm-rules.md

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>

Copilot AI commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

Merged main and resolved the ARM guide conflict in merge commit e0ee4cd9c.

Comment thread packages/typespec-client-generator-core/src/rules/use-correct-verb.md Outdated
Comment thread packages/typespec-client-generator-core/src/rules/use-correct-verb.md Outdated
Comment thread packages/typespec-client-generator-core/src/rules/use-correct-verb.md Outdated
Address selected review findings 37-41 with native endpoint traversal, focused tests, registration coverage, and concise ARM examples.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Yuchao Yan (msyyc) and others added 2 commits October 21, 2026 17:45
…verb.md

Co-authored-by: Mark Cowlishaw <1054056+markcowl@users.noreply.github.com>
Simplify implementation notes, retain opt-in and released-rule migration guidance, and keep migration provenance in the PR description.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@msyyc
Yuchao Yan (msyyc) added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 22, 2026
@msyyc
Yuchao Yan (msyyc) added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 22, 2026
@msyyc
Yuchao Yan (msyyc) added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 17e077f Oct 22, 2026
43 checks passed
@msyyc
Yuchao Yan (msyyc) deleted the promote-lintdiff-delete-in-operation-name branch October 22, 2026 09:09
github-merge-queue Bot pushed a commit that referenced this pull request Oct 22, 2026
## Summary

Add concise review guidance for **all linter PRs** to the existing
`.github/skills/code-review/SKILL.md`:

- Prefer supported APIs and focused changes; keep rule behavior and
enablement consistent.
- Keep tests lean and scoped to rule-owned behavior, using
representative cases and distinct boundaries without redundant
permutations or unrelated assertions.
- Write author-facing documentation and minimal incorrect/correct
examples; validate the published excerpts.
- Instruct reviewing agents to check for redundant changelog entries and
ensure entries describe the final changes, not revision history or
intermediate review cleanup.

The guidance applies to all linter PRs. Changelog guidance is directed
at reviewing agents; general entry-creation instructions are not
repeated. The existing review skill is preserved, and
`.github/copilot-instructions.md` is restored to its pre-PR content.

## Review evidence

Representative feedback: [test
ownership](#5294 (comment)),
[representative
coverage](#5294 (comment)),
[author-facing
docs](#5673 (comment)),
[focused
examples](#5271 (comment)),
and [changelog
noise](#5502 (comment)).

## Validation

Formatting, final-file Prettier check, root lint, and whitespace checks
passed. Unrelated formatter-only output was excluded. Verified that the
existing review skill is preserved, the moved authoring-guide link
resolves, and general Copilot instructions are restored to their pre-PR
content. Documentation-only; no package release entry required.

Source branch: `Azure/typespec-azure:docs/linter-review-instructions`;
target: `main`.

---------

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

Labels

eng int:azure-specs Run integration tests against azure-rest-api-specs lib:tcgc Issues for @azure-tools/typespec-client-generator-core library linter Issues related to linter rules meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants