Skip to content

perf: optimize linter event emission and diagnostic reporting - #2

Closed
iscai-msft wants to merge 2155 commits into
mainfrom
iscai-msft-linter-perf-improvements
Closed

perf: optimize linter event emission and diagnostic reporting#2
iscai-msft wants to merge 2155 commits into
mainfrom
iscai-msft-linter-perf-improvements

Conversation

@iscai-msft

@iscai-msft iscai-msft commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

Add compilation stage tracking and a generic caching mechanism to the Program interface, enabling libraries to cache computed results in a stage-aware manner.

Changes

Compiler infrastructure (@typespec/compiler):

  • CompilationStage type: 'parsing' | 'checking' | 'validating' | 'linting' | 'emitting'
  • program.currentStage: read-only getter for the current compilation pipeline stage
  • program.setCurrentStage(): @internal setter for compiler pipeline transitions
  • program.useCache(key, type, compute): stage-gated caching (only active during 'emitting' stage)
  • Stage is set at each pipeline transition: parsing → checking → validating → linting → emitting

Build fix (@typespec/http-canonicalization):

  • Added @typespec/http and @typespec/compiler as devDependencies (matching the pattern used by @typespec/rest, @typespec/openapi, etc.) to ensure proper turbo build ordering

Motivation

Based on feedback about linter performance on large ARM spec conversions. Profiling identified getHttpOperation() redundant recomputation as the root cause. This PR establishes the compiler infrastructure for stage-aware caching per @timotheeguerin's review feedback. The actual HTTP operation caching will be added in a follow-up PR once the interaction with ARM singleton operation tests is fully understood.

Performance context

Real-world benchmarks (from earlier profiling):

  • Compute RP (66 .tsp files, 31,831 types, 74 linter rules): ~11% faster linting
  • Network RP (161 .tsp files, 58,267 types): ~30% faster linting

These gains will be realized when the HTTP operation caching is enabled in a follow-up PR.

Testing

  • All 9501+ core tests pass
  • All Azure/typespec-azure integration tests pass
  • All CI checks green

Copilot AI and others added 30 commits May 29, 2026 17:59
Bumps `@azure-tools/typespec-client-generator-core` from `0.68.2` to
[`0.68.3`](https://github.com/Azure/typespec-azure/blob/main/packages/typespec-client-generator-core/CHANGELOG.md#0683)
for the `http-client-csharp` package.

- **Dependency bump** — updated peer (`>=0.68.3 <0.69.0 || ~0.69.0-0`)
and dev (`0.68.3`) ranges in `packages/http-client-csharp/package.json`
and refreshed `package-lock.json`.
- **Regeneration** — re-ran `eng/scripts/Generate.ps1`; no fixture
deltas, as 0.68.3 is a patch with no surface changes affecting the C#
emitter outputs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: iscai-msft <isabellavcai@gmail.com>
… types (microsoft#10832)

A TypeSpec `duration` encoded as integer milliseconds/seconds with a
wire type other than `int32` (e.g. `integer`, `int64`, `safeint`,
`uint*`) was serialized as a `double` via `TimeSpan.TotalMilliseconds` /
`TotalSeconds`, producing fractional JSON output that violates the
integer contract. Additionally, for wire types larger than `int32` (e.g.
`int64`, `uint32`, `uint64`, `safeint`, unbounded `integer`), using
`Int32`-based ser/deser would overflow/truncate large values.

```typespec
@encode(DurationKnownEncoding.milliseconds, integer)
audio_end_ms: duration;
```

Previously generated:

```csharp
writer.WriteNumberValue(AudioEndMs.TotalMilliseconds); // double, may emit 123.45
```

Now generates (for `int32`-sized wire types):

```csharp
writer.WriteNumberValue(Convert.ToInt32(Math.Round(AudioEndMs.TotalMilliseconds)));
```

And for wire types larger than `int32` (`int64`, `uint32`, `uint64`,
`safeint`, unbounded `integer`):

```csharp
writer.WriteNumberValue(Convert.ToInt64(Math.Round(AudioEndMs.TotalMilliseconds)));
```

The `Math.Round` wrapper makes the rounding behavior explicit so
fractional values (e.g. `1500.7ms`) are rounded to the nearest integer
(`1501`) rather than relying on `Convert.ToInt32`/`ToInt64`'s implicit
rounding.

### Changes

- **`TypeFactory.GetSerializationFormat`**: The
`DurationKnownEncoding.Seconds` / `Milliseconds` switches only matched
`InputPrimitiveTypeKind.Int32` for the integer arm; every other integer
kind fell through the `_` default into `Duration_*_Double`. Extended
both arms to cover the full integer-kind set, splitting based on .NET
range:
- `Int8`, `Int16`, `Int32`, `UInt8`, `UInt16` → `Duration_Seconds` /
`Duration_Milliseconds` (uses `Int32`).
- `Int64`, `UInt32`, `UInt64`, `SafeInt`, unbounded `Integer` → new
`Duration_Seconds_Int64` / `Duration_Milliseconds_Int64` (uses `Int64`).
- `Float` / `Float32` still map to `_Float`, and `Float64` / others to
`_Double`.
- **New `SerializationFormat` values**: Added `Duration_Seconds_Int64`
and `Duration_Milliseconds_Int64` to the input enum and to the generated
`SerializationFormat` enum (`SerializationFormatDefinition`).
- **`MrwSerializationTypeDefinition`**: Handles the new Int64 formats by
emitting `JsonElement.GetInt64()` for deserialization and
`Convert.ToInt64(Math.Round(...))` for JSON serialization. The Int32
formats now also wrap in `Math.Round` for explicit rounding.
- **`TypeFormattersDefinition`**: Handles the new Int64 formats in the
URI/query-string `ConvertToString` path with
`Convert.ToInt64(Math.Round(...)).ToString(...)`. The Int32 formats now
also wrap in `Math.Round`.
- **`ConvertSnippets`**: Added `InvokeToInt64` helper.
- **`MathSnippets`** (new): Added `InvokeRound` helper that emits
`Math.Round(arg)`.
- **Tests**:
- `TypeFactoryTests.DurationIntegerWireTypeSerializationFormat` and
`DurationFloatWireTypeSerializationFormat` cover every integer and float
wire-type kind for both encodings, asserting Int32 vs Int64 routing.
- `MrwSerializationTypeDefinitionTests`
`TestTimeSpanDeserializeExpression` and `TestTimeSpanSerializeStatement`
extended with the new Int64 format cases and the `Math.Round` wrapping.
- `JsonModelCoreTests.DurationMillisecondsIntegerWireTypeWritesAsInt` /
`DurationMillisecondsFloatWireTypeWritesAsDouble` and
`DeserializationTests.TestDeserializationOfDurationMillisecondsIntegerWireType`
build a model with a `duration` property and compare the full generated
output against per-case `TestData` files (Int32 emits
`GetInt32`/`Convert.ToInt32(Math.Round(...))`; Int64 and unbounded
`integer` emit `GetInt64`/`Convert.ToInt64(Math.Round(...))`).

### Validation

- Full C# generator unit-test suites (Generator, Generator.Input,
Generator.ClientModel, TestProjects.Local): all passing.
- `eng/scripts/Generate.ps1` ran to completion; the only regenerated
changes are the expected updates to
`TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/SerializationFormat.cs`
and `TypeFormatters.cs` reflecting the new Int64 enum members, switch
arms, and `Math.Round` wrapping.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
## Summary
- Add package-local Turbo configs for website, astro-utils, and Visual
Studio extension builds
- Preserve real website outputs while writing a deterministic skip
marker for TYPESPEC_SKIP_WEBSITE_BUILD=true
- Simplify astro-utils by disabling Turbo caching for its no-output skip
path instead of adding a wrapper/marker
- Declare typespec-vs .NET/VSIX build outputs instead of inheriting the
generic dist/** output

## Validation
- pnpm chronus verify
- pnpm prettier --check
.chronus/changes/fix-turbo-warnings-2026-4-29-13-1-44.md
packages/astro-utils/package.json packages/astro-utils/turbo.json
website/.scripts/build.ts website/turbo.json
packages/typespec-vs/turbo.json
- pnpm --filter @typespec/astro-utils build
- TYPESPEC_SKIP_WEBSITE_BUILD=true pnpm turbo run build --filter
@typespec/astro-utils --filter @typespec/website
--output-logs=errors-only
- pnpm turbo run build --filter typespec-vs --output-logs=errors-only

Note: repo-wide pnpm format:check currently reports unrelated formatting
issues in typespec-vscode template snapshots, and repo-wide pnpm lint
reports an unrelated no-console warning in
packages/samples/scratch/test.js.
Right now, if the language server just crash it wouldn't log the error
correctly
…helpers (microsoft#10839)

The `TryResolve{Property}Array` helpers were emitting
`ModelReaderWriter.Write(collection, options)` without the
`ModelReaderWriterContext` argument, breaking AOT-trimmed builds (e.g.
OpenAI) where the context-less overload isn't preserved.

## Changes

- **`ModelReaderWriterOptionsSnippets.cs`**: Added a new
`JsonFormatProperty` snippet that returns the
`ModelReaderWriterOptions.Json` static property.
- **`MrwSerializationTypeDefinition.Dynamic.cs`**: In
`BuildTryResolveArrayMethod`, append
`ModelReaderWriterContextSnippets.Default` to the
`ModelReaderWriter.Write` invocation, mirroring the pattern already used
in `BuildPersistableModelWriteCoreMethodBody` and the XML serialization
path. Also simplified the options argument to use the new
`ModelReaderWriterOptionsSnippets.JsonFormatProperty` snippet instead of
`new ModelReaderWriterOptions("J")`.
- **Test baseline**: Update `PropagateModelListPropertyHelperMethods.cs`
to expect the third argument and the `ModelReaderWriterOptions.Json`
static.

Generated output now matches the rest of the emitter:

```csharp
global::System.BinaryData data = global::System.ClientModel.Primitives.ModelReaderWriter.Write(
    ActiveP1(),
    global::System.ClientModel.Primitives.ModelReaderWriterOptions.Json,
    global::Sample.SampleContext.Default);
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Only override packages already referenced in the project to avoid npm
arborist issues.
The playground wasn't fading out unused `using` declarations the way the
VS Code extension does, even though the language server was already
detecting them correctly.

**Root cause:** The language server running in the playground (for
completions, hover, semantic tokens, etc.) was sending LSP diagnostics
with `DiagnosticTag.Unnecessary` for unused `using` statements, but
`sendDiagnostics` in `services.ts` was a no-op — those tags were never
forwarded to Monaco.

## Changes

- **`packages/playground/src/services.ts`** — Implement
`sendDiagnostics` to filter diagnostics that carry visual tags and apply
them as Monaco `Hint`-severity markers under a separate `"lsp-tags"`
owner. Using `Hint` avoids duplicating the error/warning squiggles
already managed by the playground's own compilation pass.
`DiagnosticTag` values from LSP map directly to `MarkerTag` values in
Monaco (`Unnecessary = 1`, `Deprecated = 2`).

- **`packages/playground/src/react/playground.tsx`** — Fix a
pre-existing bug where `CompletionItemTag.Deprecated` (value `1`, from
`vscode-languageserver`) was used as a Monaco marker tag. This
coincidentally equals `MarkerTag.Unnecessary` (faded text) rather than
the intended `MarkerTag.Deprecated` (strikethrough). Replaced with
`MarkerTag.Deprecated` and removed the `vscode-languageserver` import.

<img width="469" height="200" alt="image"
src="https://github.com/user-attachments/assets/587567b3-6c1d-4243-8257-93fb6a6fc977"
/>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
…ed $functions exports (microsoft#10773)

## Summary

Fixes microsoft#10748

When a JS file exports `$functions` without a corresponding `extern fn`
declaration in TypeSpec, calling that function silently produces
incorrect results (no error, no parameters).

## Changes

- **New diagnostic**: `missing-extern-declaration` fires at program
check time for ALL orphaned function implementations (regardless of
whether the function is called)
- **Checker**: Added `checkOrphanedFunctionImplementations()` in
`checkProgram()` that walks JS source file symbols looking for
`Function` symbols without a matching `FunctionDeclarationStatementNode`
- **Tests**: Refactored `functions.test.ts` to use per-function JS file
testers (avoiding orphan diagnostics in tests)
- **Semantic walker**: Updated to use `compileAndDiagnose` to handle the
new diagnostic

## Diagnostic message

```
Function implementation "<name>" is exported in JS via $functions but has no corresponding 'extern fn' declaration in TypeSpec.
```
fix Azure/autorest.java#3340

manual tested on
https://github.com/Azure/typespec-azure/blob/main/packages/azure-http-specs/specs/azure/client-generator-core/exact-name/main.tsp
need its release to write e2e

---

Impl is relatively simple. If `isExactName`, set the name directly to
`language.java.name`. And later in Java code this name will not get
transformed (otherwise, Java code will do a transform from
`language.default.name` to `language.java.name`).

---

It is not complete though. There is `isExactName` missing from some
types. TCGC fixed but not released.
Azure/typespec-azure#4480

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…t#10782)

Bumps [qs](https://github.com/ljharb/qs) from 6.15.0 to 6.15.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ljharb/qs/blob/main/CHANGELOG.md">qs's
changelog</a>.</em></p>
<blockquote>
<h2><strong>6.15.2</strong></h2>
<ul>
<li>[Fix] <code>stringify</code>: skip null/undefined entries in
<code>arrayFormat: 'comma'</code> + <code>encodeValuesOnly</code>
instead of crashing in <code>encoder</code></li>
<li>[Fix] <code>stringify</code>: use configured <code>delimiter</code>
after <code>charsetSentinel</code> (<a
href="https://redirect.github.com/ljharb/qs/issues/555">#555</a>)</li>
<li>[Fix] <code>stringify</code>: apply <code>formatter</code> to
encoded key under <code>strictNullHandling</code> (<a
href="https://redirect.github.com/ljharb/qs/issues/554">#554</a>)</li>
<li>[Fix] <code>stringify</code>: skip null/undefined filter-array
entries instead of crashing in <code>encoder</code> (<a
href="https://redirect.github.com/ljharb/qs/issues/551">#551</a>)</li>
<li>[Fix] <code>parse</code>: handle nested bracket groups and add
regression tests (<a
href="https://redirect.github.com/ljharb/qs/issues/530">#530</a>)</li>
<li>[readme] fix grammar (<a
href="https://redirect.github.com/ljharb/qs/issues/550">#550</a>)</li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code></li>
<li>[Tests] add regression tests for keys containing percent-encoded
bracket text</li>
</ul>
<h2><strong>6.15.1</strong></h2>
<ul>
<li>[Fix] <code>parse</code>: <code>parameterLimit: Infinity</code> with
<code>throwOnLimitExceeded: true</code> silently drops all
parameters</li>
<li>[Deps] update <code>@ljharb/eslint-config</code></li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code>,
<code>iconv-lite</code></li>
<li>[Tests] increase coverage</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ljharb/qs/commit/9aca4076fe788338c67cf7e115f0be6bc58d85a8"><code>9aca407</code></a>
v6.15.2</li>
<li><a
href="https://github.com/ljharb/qs/commit/5e33d33447ed0bf1ddab9abc41d27dea4687d992"><code>5e33d33</code></a>
[Dev Deps] update <code>@ljharb/eslint-config</code></li>
<li><a
href="https://github.com/ljharb/qs/commit/21f80b33e5c8b3f7eba1034fff0da4a4a37a1d41"><code>21f80b3</code></a>
[Fix] <code>stringify</code>: skip null/undefined entries in
<code>arrayFormat: 'comma'</code> + `e...</li>
<li><a
href="https://github.com/ljharb/qs/commit/a0a81ea2071acce3eff41a040f719ac8f5c4f64c"><code>a0a81ea</code></a>
[Fix] <code>stringify</code>: use configured <code>delimiter</code>
after <code>charsetSentinel</code></li>
<li><a
href="https://github.com/ljharb/qs/commit/e3062f78f5233b338ceeb8e8dfa5a07dea4b32a8"><code>e3062f7</code></a>
[Fix] <code>stringify</code>: apply <code>formatter</code> to encoded
key under <code>strictNullHandling</code></li>
<li><a
href="https://github.com/ljharb/qs/commit/0c180a40adb8c6703fffc85b2ff06ca209f5c1e0"><code>0c180a4</code></a>
[Fix] <code>stringify</code>: skip null/undefined filter-array entries
instead of crashi...</li>
<li><a
href="https://github.com/ljharb/qs/commit/3a8b94aec19bd664720f6f6b1e66c4a0dfe4b656"><code>3a8b94a</code></a>
[Tests] add regression tests for keys containing percent-encoded bracket
text</li>
<li><a
href="https://github.com/ljharb/qs/commit/96755abd357c0e534dd3442a84a04d08864bfe0d"><code>96755ab</code></a>
[readme] fix grammar</li>
<li><a
href="https://github.com/ljharb/qs/commit/a419ce5bbfcdb98a299f1a0bb47ea055baef20e6"><code>a419ce5</code></a>
[Fix] <code>parse</code>: handle nested bracket groups and add
regression tests</li>
<li><a
href="https://github.com/ljharb/qs/commit/3f5e1c528c967d915096787efbffa73cf6044170"><code>3f5e1c5</code></a>
v6.15.1</li>
<li>Additional commits viewable in <a
href="https://github.com/ljharb/qs/compare/v6.15.0...v6.15.2">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…t#10824)

The Visual Studio extension was carrying explicit NuGet references that
were only needed to suppress older transitive vulnerability and NU1603
issues. Those overrides are no longer necessary with the currently
resolved Visual Studio package set.

- **Dependency cleanup**
  - Remove explicit `PackageReference`s for:
    - `MessagePack`
    - `Microsoft.VisualStudio.Composition`
    - `Microsoft.VisualStudio.Shell.15.0`

- **Project file simplification**
- Drop the associated explanatory/TODO comments tied to those temporary
overrides.
- Keep the direct Visual Studio SDK/workspace dependencies unchanged so
the extension continues to pick up these packages transitively.

- **Result**
- `typespec-vs` now relies on the Visual Studio packages to supply these
dependencies instead of pinning them redundantly in the project file.

```xml
<!-- removed -->
<PackageReference Include="MessagePack" Version="2.5.192" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="17.13.41" />
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="17.14.40264" />
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
…ression aliases (microsoft#10684)

Model-to-model spread cycles were not being validated correctly (`Foo`
spreads `Bar`, `Bar` spreads `Foo`), which led to unresolved checker
state instead of a proper diagnostic. At the same time, alias recursion
through model expressions was being flagged too aggressively.

- **Spread cycle validation**
- Adds explicit cycle detection for model spread chains in the checker.
- Mutual spreads now surface the intended `spread-model` self-spread
diagnostic instead of ending in pending-resolution failure.

- **Alias recursion behavior**
- Narrows circular-alias handling for aliases whose value is a model
expression.
- Allows recursive object-shape aliases (via model expressions) to
resolve without emitting `circular-alias-type`.

- **Targeted test coverage**
- Unskips and enforces the mutual spread regression case in
`spread.test.ts`.
- Adds a regression case in `alias.test.ts` for recursive aliases
through model expressions.

```typespec
model Foo { ...Bar }
model Bar { ...Foo } // now diagnosed as spread-model self-spread

alias A = { a: B };
alias B = { a: A }; // now allowed (no circular-alias-type)
```

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `telemetry.astro.build`
> - Triggering command: `/opt/hostedtoolcache/node/22.22.2/x64/bin/node
node
/home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/bin/astro.mjs
build node s/.b�� run --local de_modules/pnpm/dist/node-gyp-bin/node
import @typespecsh --production reams/reference node sion�� build.json
dotnet k/typespec/typespec/node_modules/.bin/node --no-emit node
rsioning/referendoc sh` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/microsoft/typespec/settings/copilot/coding_agent)
(admins only)
>
> </details>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Co-authored-by: Mark Cowlishaw <1054056+markcowl@users.noreply.github.com>
Adding it as a skill so you can just do `/minimal-repro <url>/<code>` to
have it work on trying to reduce a repro into the smallest possible
…position for bare file inputs (microsoft#10843)

## Problem

When callers pass bare `bytes`/`str`/`IO` (the `FileContent` variant of
`FileType`) for multipart file fields, the generated
`prepare_multipart_form_data` helper creates `(field_name,
bare_content)`. The HTTP library interprets this as
`Content-Disposition: form-data; name="field_name"` with **no
`filename=` attribute**.

Many servers require `filename=` in the `Content-Disposition` header to
recognize file uploads (e.g., servers that use the file extension to
detect package type will reject with "At least one file must be
uploaded").

The tuple variants `(filename, content)` and `(filename, content,
content_type)` already work correctly since they produce `filename=` in
the header.

## Fix

Added `_normalize_multipart_file_entry` helper in `utils.py.jinja2` that
wraps bare content into a `(filename, content)` tuple:

- **IO objects with `.name`**: derives filename via `os.path.basename()`
(e.g., `open('path/to/image.jpg')` → `filename="image.jpg"`)
- **Bare bytes/str**: falls back to the field name (e.g.,
`"profileImage"`) or `"field_0"`, `"field_1"` for list entries
- **Existing tuples**: pass through unchanged

Also changed `elif multipart_entry:` to `elif multipart_entry is not
None:` to allow empty bytes (`b""`) to be uploaded.

## Files Changed

- `generator/pygen/codegen/templates/utils.py.jinja2`: Added
`_normalize_multipart_file_entry` helper, updated
`prepare_multipart_form_data`
- `generator/pygen/codegen/serializers/general_serializer.py`: Added
`import os` to generated utils imports

---------

Co-authored-by: iscai-msft <isabellavcai@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
…e etag headers (microsoft#10816)

# Problem

PR microsoft#10494 (which added support for custom etag wire names) broke
operations that have **more than one `Azure.Core.eTag`-typed header**.
The Azure Storage Blob `copyFromUrl` operation is a concrete example —
it carries:

- standard `If-Match` / `If-None-Match`
- custom `x-ms-source-if-match` / `x-ms-source-if-none-match`

The emitter in `http.ts` stamps `etagRole = "ifMatch"` / `"ifNoneMatch"`
onto **every** one of those headers. Then in `preprocess/__init__.py`,
`update_parameter` blindly applies `headers_convert(ETAG_MATCH_DATA)` /
`ETAG_NONE_MATCH_DATA` to every parameter with that role — overwriting
`clientName` to `"etag"` and `"match_condition"` on **both** pairs. The
operation ends up with two parameters named `etag` and two named
`match_condition`.

The slot-picker in `update_client` already chose one ifMatch/ifNoneMatch
slot per operation, but it did nothing to prevent the per-parameter
rename on the others.

# Fix

In `preprocess/__init__.py` `update_client`:

1. Collect **all** `ifMatch` and `ifNoneMatch` candidates per operation,
not just the first.
2. New `_pick_etag_slot` helper prefers the standard `If-Match` /
`If-None-Match` wire names over custom etag headers (matches
pre-PR-10494 behaviour when both are present).
3. Strip `etagRole` from non-selected candidates so `update_parameter`
leaves their natural `clientName` intact (e.g. `source_if_match`,
`source_if_none_match`).

# Result

For `copyFromUrl`:
- `If-Match` / `If-None-Match` → promoted to the `etag` /
`match_condition` pair (unchanged behaviour vs. pre-PR-10494).
- `x-ms-source-if-match` / `x-ms-source-if-none-match` → keep their
natural `source_if_match` / `source_if_none_match` client names.

No more clientName collisions.

# Tests

Adds `tests/unit/test_preprocess_etag.py` with six tests:

- `test_etag_role_preserved_when_only_standard_pair_present`
- `test_etag_role_preserved_when_only_custom_pair_present`
- `test_standard_etag_wins_over_custom_when_both_present` (regression)
- `test_first_custom_pair_chosen_when_multiple_custom_pairs_present`
- `test_synthetic_partner_still_works_with_only_one_custom_etag`
- `test_full_update_yaml_does_not_collide_client_names` (end-to-end)

Verified the three multi-etag tests **fail** on `upstream/main` and pass
with this change. All existing unit tests still pass.

# Spec referenced

The original repro is `copyFromUrl` in
`specification/storage/Microsoft.BlobStorage/routes.tsp` of
`Azure/azure-rest-api-specs`, which composes `SourceIfMatchParameter`,
`SourceIfNoneMatchParameter`, `IfMatchParameter`, and
`IfNoneMatchParameter` (all `Azure.Core.eTag`).

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ages/http-client-csharp (microsoft#10857)

Bumps
[vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest),
[@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8)
and
[@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui).
These dependencies needed to be updated together.
Updates `vitest` from 3.2.4 to 4.1.8
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitest-dev/vitest/releases">vitest's
releases</a>.</em></p>
<blockquote>
<h2>v4.1.8</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>browser</strong>:
<ul>
<li>Disable client <code>cdp</code> API when <code>allowWrite/allowExec:
false</code> [backport to v4]  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> and
<strong>Codex</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10450">vitest-dev/vitest#10450</a>
<a href="https://github.com/vitest-dev/vitest/commit/e4067b3b1"><!-- raw
HTML omitted -->(e4067)<!-- raw HTML omitted --></a></li>
<li>Remove orphaned Playwright route when same module is mocked via
multiple ids [backport to v4]  -  by <a
href="https://github.com/toxik"><code>@​toxik</code></a> and <a
href="https://github.com/Zelys-DFKH"><code>@​Zelys-DFKH</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10474">vitest-dev/vitest#10474</a>
<a href="https://github.com/vitest-dev/vitest/commit/675b4343f"><!-- raw
HTML omitted -->(675b4)<!-- raw HTML omitted --></a></li>
</ul>
</li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.7...v4.1.8">View
changes on GitHub</a></h5>
<h2>v4.1.7</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>runner</strong>: Limit concurrency per task branch in
addition to per leaf callbacks (backport)  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10384">vitest-dev/vitest#10384</a>
<a href="https://github.com/vitest-dev/vitest/commit/4f0f2a1ee"><!-- raw
HTML omitted -->(4f0f2)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.6...v4.1.7">View
changes on GitHub</a></h5>
<h2>v4.1.6</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>browser</strong>: Provide project reference in
<code>ToMatchScreenshotResolvePath</code>  -  by <a
href="https://github.com/macarie"><code>@​macarie</code></a> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10138">vitest-dev/vitest#10138</a>
<a href="https://github.com/vitest-dev/vitest/commit/31882607c"><!-- raw
HTML omitted -->(31882)<!-- raw HTML omitted --></a></li>
<li>Global <code>sequence.concurrent: true</code> with top-level
<code>test(..., { concurrent: false })</code> + depreacte
<code>sequential</code> test API and options  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a>,
<strong>Codex</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10196">vitest-dev/vitest#10196</a>
<a href="https://github.com/vitest-dev/vitest/commit/2847dfa2a"><!-- raw
HTML omitted -->(2847d)<!-- raw HTML omitted --></a></li>
<li><strong>browser</strong>: Simplify orchestrator otel carrier  -  by
<a href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10285">vitest-dev/vitest#10285</a>
<a href="https://github.com/vitest-dev/vitest/commit/18af98cee"><!-- raw
HTML omitted -->(18af9)<!-- raw HTML omitted --></a></li>
</ul>
<h3>   🏎 Performance</h3>
<ul>
<li>Stringify diff objects only once  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10276">vitest-dev/vitest#10276</a>
<a href="https://github.com/vitest-dev/vitest/commit/9f7b1528c"><!-- raw
HTML omitted -->(9f7b1)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.5...v4.1.6">View
changes on GitHub</a></h5>
<h2>v4.1.5</h2>
<h3>   🚀 Experimental Features</h3>
<ul>
<li><strong>coverage</strong>: Istanbul to support
<code>instrumenter</code> option  -  by <a
href="https://github.com/BartWaardenburg"><code>@​BartWaardenburg</code></a>
and <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10119">vitest-dev/vitest#10119</a>
<a href="https://github.com/vitest-dev/vitest/commit/0e0ff41c7"><!-- raw
HTML omitted -->(0e0ff)<!-- raw HTML omitted --></a></li>
</ul>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li>--project negation excludes browser instances  -  by <a
href="https://github.com/felamaslen"><code>@​felamaslen</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10131">vitest-dev/vitest#10131</a>
<a href="https://github.com/vitest-dev/vitest/commit/9423dc084"><!-- raw
HTML omitted -->(9423d)<!-- raw HTML omitted --></a></li>
<li>Project color label on html reporter  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10142">vitest-dev/vitest#10142</a>
<a href="https://github.com/vitest-dev/vitest/commit/596f73986"><!-- raw
HTML omitted -->(596f7)<!-- raw HTML omitted --></a></li>
<li>Fix <code>vi.defineHelper</code> called as object method  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10163">vitest-dev/vitest#10163</a>
<a href="https://github.com/vitest-dev/vitest/commit/122c25b5b"><!-- raw
HTML omitted -->(122c2)<!-- raw HTML omitted --></a></li>
<li>Alias <code>agent</code> reporter to <code>minimal</code>  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10157">vitest-dev/vitest#10157</a>
<a href="https://github.com/vitest-dev/vitest/commit/663b99fe3"><!-- raw
HTML omitted -->(663b9)<!-- raw HTML omitted --></a></li>
<li>Respect diff config options in soft assertions  -  by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a>,
<strong>sheremet-va</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/8696">vitest-dev/vitest#8696</a>
<a href="https://github.com/vitest-dev/vitest/commit/9787dedad"><!-- raw
HTML omitted -->(9787d)<!-- raw HTML omitted --></a></li>
<li>Respect diff config options in soft assertions &quot;  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/8696">vitest-dev/vitest#8696</a>
<a href="https://github.com/vitest-dev/vitest/commit/7dc6d54fd"><!-- raw
HTML omitted -->(7dc6d)<!-- raw HTML omitted --></a></li>
<li><strong>ast-collect</strong>: Recognize _<em>vi_import</em> prefix
in static test discovery  -  by <a
href="https://github.com/Yejneshwar"><code>@​Yejneshwar</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10129">vitest-dev/vitest#10129</a>
<a href="https://github.com/vitest-dev/vitest/commit/325463ab2"><!-- raw
HTML omitted -->(32546)<!-- raw HTML omitted --></a></li>
<li><strong>coverage</strong>: Descriptive error message when reports
directory is removed during test run  -  by <a
href="https://github.com/DaveT1991"><code>@​DaveT1991</code></a> and <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10117">vitest-dev/vitest#10117</a>
<a href="https://github.com/vitest-dev/vitest/commit/1413382e1"><!-- raw
HTML omitted -->(14133)<!-- raw HTML omitted --></a></li>
<li><strong>snapshot</strong>: Increase default snapshot max output
length  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> and
<strong>Codex</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10150">vitest-dev/vitest#10150</a>
<a href="https://github.com/vitest-dev/vitest/commit/21e66ff63"><!-- raw
HTML omitted -->(21e66)<!-- raw HTML omitted --></a></li>
<li><strong>ui</strong>: Fix jsx/tsx syntax highlight  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10152">vitest-dev/vitest#10152</a>
<a href="https://github.com/vitest-dev/vitest/commit/f1b1f6c7b"><!-- raw
HTML omitted -->(f1b1f)<!-- raw HTML omitted --></a></li>
<li><strong>web-worker</strong>: Support MessagePort objects referenced
inside postMessage data  -  by <a
href="https://github.com/whitphx"><code>@​whitphx</code></a> and
<strong>Claude Opus 4.6 (1M context)</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9927">vitest-dev/vitest#9927</a>
and <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10124">vitest-dev/vitest#10124</a>
<a href="https://github.com/vitest-dev/vitest/commit/7ad7d39af"><!-- raw
HTML omitted -->(7ad7d)<!-- raw HTML omitted --></a></li>
<li><strong>api</strong>: Make test-specification options writable  - 
by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10154">vitest-dev/vitest#10154</a>
<a href="https://github.com/vitest-dev/vitest/commit/6abd557b7"><!-- raw
HTML omitted -->(6abd5)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.4...v4.1.5">View
changes on GitHub</a></h5>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e61f2dd2a0ba0a266c1c5e0334aad3799fee527f"><code>e61f2dd</code></a>
chore: release v4.1.8</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e4067b3b150005fd42cf75f994300119245806b9"><code>e4067b3</code></a>
fix(browser): disable client <code>cdp</code> API when
<code>allowWrite/allowExec: false</code> [ba...</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/a09d47236e19fd3151351080c667036ca6164dc4"><code>a09d472</code></a>
chore: release v4.1.7</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/a8fd24c1cad2320b19fcc651413c7d928423bdc1"><code>a8fd24c</code></a>
chore: release v4.1.6</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/18af98cee1830604d57f6a02bf28f8067cdffc06"><code>18af98c</code></a>
fix(browser): simplify orchestrator otel carrier (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/10285">#10285</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/31882607cc67c7bf52ead13a606321ffdb06a857"><code>3188260</code></a>
feat(browser): provide project reference in
<code>ToMatchScreenshotResolvePath</code> (#...</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e399846850fedf10b8228cbe46a419628998acd9"><code>e399846</code></a>
chore: release v4.1.5</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/7dc6d54fd9dda0fe6fee2fb6451d0611a9ecb6e7"><code>7dc6d54</code></a>
Revert &quot;fix: respect diff config options in soft assertions (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/8696">#8696</a>)&quot;</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/9787dedade9896a6d3eeed7739177d6c583a68a7"><code>9787ded</code></a>
fix: respect diff config options in soft assertions (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/8696">#8696</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/325463ab292c45c3ef27aa21ec7da380c307052c"><code>325463a</code></a>
fix(ast-collect): recognize _<em>vi_import</em> prefix in static test
discovery (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/10">#10</a>...</li>
<li>Additional commits viewable in <a
href="https://github.com/vitest-dev/vitest/commits/v4.1.8/packages/vitest">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~GitHub%20Actions">GitHub Actions</a>, a new
releaser for vitest since your current version.</p>
</details>
<br />

Updates `@vitest/coverage-v8` from 3.2.4 to 4.1.8
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitest-dev/vitest/releases">@​vitest/coverage-v8's
releases</a>.</em></p>
<blockquote>
<h2>v4.1.8</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>browser</strong>:
<ul>
<li>Disable client <code>cdp</code> API when <code>allowWrite/allowExec:
false</code> [backport to v4]  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> and
<strong>Codex</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10450">vitest-dev/vitest#10450</a>
<a href="https://github.com/vitest-dev/vitest/commit/e4067b3b1"><!-- raw
HTML omitted -->(e4067)<!-- raw HTML omitted --></a></li>
<li>Remove orphaned Playwright route when same module is mocked via
multiple ids [backport to v4]  -  by <a
href="https://github.com/toxik"><code>@​toxik</code></a> and <a
href="https://github.com/Zelys-DFKH"><code>@​Zelys-DFKH</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10474">vitest-dev/vitest#10474</a>
<a href="https://github.com/vitest-dev/vitest/commit/675b4343f"><!-- raw
HTML omitted -->(675b4)<!-- raw HTML omitted --></a></li>
</ul>
</li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.7...v4.1.8">View
changes on GitHub</a></h5>
<h2>v4.1.7</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>runner</strong>: Limit concurrency per task branch in
addition to per leaf callbacks (backport)  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10384">vitest-dev/vitest#10384</a>
<a href="https://github.com/vitest-dev/vitest/commit/4f0f2a1ee"><!-- raw
HTML omitted -->(4f0f2)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.6...v4.1.7">View
changes on GitHub</a></h5>
<h2>v4.1.6</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>browser</strong>: Provide project reference in
<code>ToMatchScreenshotResolvePath</code>  -  by <a
href="https://github.com/macarie"><code>@​macarie</code></a> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10138">vitest-dev/vitest#10138</a>
<a href="https://github.com/vitest-dev/vitest/commit/31882607c"><!-- raw
HTML omitted -->(31882)<!-- raw HTML omitted --></a></li>
<li>Global <code>sequence.concurrent: true</code> with top-level
<code>test(..., { concurrent: false })</code> + depreacte
<code>sequential</code> test API and options  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a>,
<strong>Codex</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10196">vitest-dev/vitest#10196</a>
<a href="https://github.com/vitest-dev/vitest/commit/2847dfa2a"><!-- raw
HTML omitted -->(2847d)<!-- raw HTML omitted --></a></li>
<li><strong>browser</strong>: Simplify orchestrator otel carrier  -  by
<a href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10285">vitest-dev/vitest#10285</a>
<a href="https://github.com/vitest-dev/vitest/commit/18af98cee"><!-- raw
HTML omitted -->(18af9)<!-- raw HTML omitted --></a></li>
</ul>
<h3>   🏎 Performance</h3>
<ul>
<li>Stringify diff objects only once  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10276">vitest-dev/vitest#10276</a>
<a href="https://github.com/vitest-dev/vitest/commit/9f7b1528c"><!-- raw
HTML omitted -->(9f7b1)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.5...v4.1.6">View
changes on GitHub</a></h5>
<h2>v4.1.5</h2>
<h3>   🚀 Experimental Features</h3>
<ul>
<li><strong>coverage</strong>: Istanbul to support
<code>instrumenter</code> option  -  by <a
href="https://github.com/BartWaardenburg"><code>@​BartWaardenburg</code></a>
and <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10119">vitest-dev/vitest#10119</a>
<a href="https://github.com/vitest-dev/vitest/commit/0e0ff41c7"><!-- raw
HTML omitted -->(0e0ff)<!-- raw HTML omitted --></a></li>
</ul>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li>--project negation excludes browser instances  -  by <a
href="https://github.com/felamaslen"><code>@​felamaslen</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10131">vitest-dev/vitest#10131</a>
<a href="https://github.com/vitest-dev/vitest/commit/9423dc084"><!-- raw
HTML omitted -->(9423d)<!-- raw HTML omitted --></a></li>
<li>Project color label on html reporter  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10142">vitest-dev/vitest#10142</a>
<a href="https://github.com/vitest-dev/vitest/commit/596f73986"><!-- raw
HTML omitted -->(596f7)<!-- raw HTML omitted --></a></li>
<li>Fix <code>vi.defineHelper</code> called as object method  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10163">vitest-dev/vitest#10163</a>
<a href="https://github.com/vitest-dev/vitest/commit/122c25b5b"><!-- raw
HTML omitted -->(122c2)<!-- raw HTML omitted --></a></li>
<li>Alias <code>agent</code> reporter to <code>minimal</code>  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10157">vitest-dev/vitest#10157</a>
<a href="https://github.com/vitest-dev/vitest/commit/663b99fe3"><!-- raw
HTML omitted -->(663b9)<!-- raw HTML omitted --></a></li>
<li>Respect diff config options in soft assertions  -  by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a>,
<strong>sheremet-va</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/8696">vitest-dev/vitest#8696</a>
<a href="https://github.com/vitest-dev/vitest/commit/9787dedad"><!-- raw
HTML omitted -->(9787d)<!-- raw HTML omitted --></a></li>
<li>Respect diff config options in soft assertions &quot;  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/8696">vitest-dev/vitest#8696</a>
<a href="https://github.com/vitest-dev/vitest/commit/7dc6d54fd"><!-- raw
HTML omitted -->(7dc6d)<!-- raw HTML omitted --></a></li>
<li><strong>ast-collect</strong>: Recognize _<em>vi_import</em> prefix
in static test discovery  -  by <a
href="https://github.com/Yejneshwar"><code>@​Yejneshwar</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10129">vitest-dev/vitest#10129</a>
<a href="https://github.com/vitest-dev/vitest/commit/325463ab2"><!-- raw
HTML omitted -->(32546)<!-- raw HTML omitted --></a></li>
<li><strong>coverage</strong>: Descriptive error message when reports
directory is removed during test run  -  by <a
href="https://github.com/DaveT1991"><code>@​DaveT1991</code></a> and <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10117">vitest-dev/vitest#10117</a>
<a href="https://github.com/vitest-dev/vitest/commit/1413382e1"><!-- raw
HTML omitted -->(14133)<!-- raw HTML omitted --></a></li>
<li><strong>snapshot</strong>: Increase default snapshot max output
length  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> and
<strong>Codex</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10150">vitest-dev/vitest#10150</a>
<a href="https://github.com/vitest-dev/vitest/commit/21e66ff63"><!-- raw
HTML omitted -->(21e66)<!-- raw HTML omitted --></a></li>
<li><strong>ui</strong>: Fix jsx/tsx syntax highlight  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10152">vitest-dev/vitest#10152</a>
<a href="https://github.com/vitest-dev/vitest/commit/f1b1f6c7b"><!-- raw
HTML omitted -->(f1b1f)<!-- raw HTML omitted --></a></li>
<li><strong>web-worker</strong>: Support MessagePort objects referenced
inside postMessage data  -  by <a
href="https://github.com/whitphx"><code>@​whitphx</code></a> and
<strong>Claude Opus 4.6 (1M context)</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9927">vitest-dev/vitest#9927</a>
and <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10124">vitest-dev/vitest#10124</a>
<a href="https://github.com/vitest-dev/vitest/commit/7ad7d39af"><!-- raw
HTML omitted -->(7ad7d)<!-- raw HTML omitted --></a></li>
<li><strong>api</strong>: Make test-specification options writable  - 
by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10154">vitest-dev/vitest#10154</a>
<a href="https://github.com/vitest-dev/vitest/commit/6abd557b7"><!-- raw
HTML omitted -->(6abd5)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.4...v4.1.5">View
changes on GitHub</a></h5>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e61f2dd2a0ba0a266c1c5e0334aad3799fee527f"><code>e61f2dd</code></a>
chore: release v4.1.8</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e4067b3b150005fd42cf75f994300119245806b9"><code>e4067b3</code></a>
fix(browser): disable client <code>cdp</code> API when
<code>allowWrite/allowExec: false</code> [ba...</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/a09d47236e19fd3151351080c667036ca6164dc4"><code>a09d472</code></a>
chore: release v4.1.7</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/a8fd24c1cad2320b19fcc651413c7d928423bdc1"><code>a8fd24c</code></a>
chore: release v4.1.6</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e399846850fedf10b8228cbe46a419628998acd9"><code>e399846</code></a>
chore: release v4.1.5</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/ac04bac206f49d793e7277084f707aee718aa936"><code>ac04bac</code></a>
chore: release v4.1.4</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/2dc0d62eaf08d8acb1f5042fdb8ac5b4a19fdc73"><code>2dc0d62</code></a>
chore: release v4.1.3</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/fc6f482f4c54bf6a766a0ff502b9843994af5bf5"><code>fc6f482</code></a>
chore: release v4.1.2</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/1f2d318493363855b66a22caaf7c1c10579029d5"><code>1f2d318</code></a>
chore: release v4.1.1</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/aaf9f18ae70e52b6e67aaf85f7f784d9dabd0acc"><code>aaf9f18</code></a>
fix(coverage): simplify provider types (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8/issues/9931">#9931</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vitest-dev/vitest/commits/v4.1.8/packages/coverage-v8">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~GitHub%20Actions">GitHub Actions</a>, a new
releaser for <code>@​vitest/coverage-v8</code> since your current
version.</p>
</details>
<br />

Updates `@vitest/ui` from 3.2.4 to 4.1.8
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitest-dev/vitest/releases">@​vitest/ui's
releases</a>.</em></p>
<blockquote>
<h2>v4.1.8</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>browser</strong>:
<ul>
<li>Disable client <code>cdp</code> API when <code>allowWrite/allowExec:
false</code> [backport to v4]  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> and
<strong>Codex</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10450">vitest-dev/vitest#10450</a>
<a href="https://github.com/vitest-dev/vitest/commit/e4067b3b1"><!-- raw
HTML omitted -->(e4067)<!-- raw HTML omitted --></a></li>
<li>Remove orphaned Playwright route when same module is mocked via
multiple ids [backport to v4]  -  by <a
href="https://github.com/toxik"><code>@​toxik</code></a> and <a
href="https://github.com/Zelys-DFKH"><code>@​Zelys-DFKH</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10474">vitest-dev/vitest#10474</a>
<a href="https://github.com/vitest-dev/vitest/commit/675b4343f"><!-- raw
HTML omitted -->(675b4)<!-- raw HTML omitted --></a></li>
</ul>
</li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.7...v4.1.8">View
changes on GitHub</a></h5>
<h2>v4.1.7</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>runner</strong>: Limit concurrency per task branch in
addition to per leaf callbacks (backport)  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10384">vitest-dev/vitest#10384</a>
<a href="https://github.com/vitest-dev/vitest/commit/4f0f2a1ee"><!-- raw
HTML omitted -->(4f0f2)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.6...v4.1.7">View
changes on GitHub</a></h5>
<h2>v4.1.6</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li><strong>browser</strong>: Provide project reference in
<code>ToMatchScreenshotResolvePath</code>  -  by <a
href="https://github.com/macarie"><code>@​macarie</code></a> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10138">vitest-dev/vitest#10138</a>
<a href="https://github.com/vitest-dev/vitest/commit/31882607c"><!-- raw
HTML omitted -->(31882)<!-- raw HTML omitted --></a></li>
<li>Global <code>sequence.concurrent: true</code> with top-level
<code>test(..., { concurrent: false })</code> + depreacte
<code>sequential</code> test API and options  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a>,
<strong>Codex</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10196">vitest-dev/vitest#10196</a>
<a href="https://github.com/vitest-dev/vitest/commit/2847dfa2a"><!-- raw
HTML omitted -->(2847d)<!-- raw HTML omitted --></a></li>
<li><strong>browser</strong>: Simplify orchestrator otel carrier  -  by
<a href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10285">vitest-dev/vitest#10285</a>
<a href="https://github.com/vitest-dev/vitest/commit/18af98cee"><!-- raw
HTML omitted -->(18af9)<!-- raw HTML omitted --></a></li>
</ul>
<h3>   🏎 Performance</h3>
<ul>
<li>Stringify diff objects only once  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10276">vitest-dev/vitest#10276</a>
<a href="https://github.com/vitest-dev/vitest/commit/9f7b1528c"><!-- raw
HTML omitted -->(9f7b1)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.5...v4.1.6">View
changes on GitHub</a></h5>
<h2>v4.1.5</h2>
<h3>   🚀 Experimental Features</h3>
<ul>
<li><strong>coverage</strong>: Istanbul to support
<code>instrumenter</code> option  -  by <a
href="https://github.com/BartWaardenburg"><code>@​BartWaardenburg</code></a>
and <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10119">vitest-dev/vitest#10119</a>
<a href="https://github.com/vitest-dev/vitest/commit/0e0ff41c7"><!-- raw
HTML omitted -->(0e0ff)<!-- raw HTML omitted --></a></li>
</ul>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li>--project negation excludes browser instances  -  by <a
href="https://github.com/felamaslen"><code>@​felamaslen</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10131">vitest-dev/vitest#10131</a>
<a href="https://github.com/vitest-dev/vitest/commit/9423dc084"><!-- raw
HTML omitted -->(9423d)<!-- raw HTML omitted --></a></li>
<li>Project color label on html reporter  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10142">vitest-dev/vitest#10142</a>
<a href="https://github.com/vitest-dev/vitest/commit/596f73986"><!-- raw
HTML omitted -->(596f7)<!-- raw HTML omitted --></a></li>
<li>Fix <code>vi.defineHelper</code> called as object method  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10163">vitest-dev/vitest#10163</a>
<a href="https://github.com/vitest-dev/vitest/commit/122c25b5b"><!-- raw
HTML omitted -->(122c2)<!-- raw HTML omitted --></a></li>
<li>Alias <code>agent</code> reporter to <code>minimal</code>  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10157">vitest-dev/vitest#10157</a>
<a href="https://github.com/vitest-dev/vitest/commit/663b99fe3"><!-- raw
HTML omitted -->(663b9)<!-- raw HTML omitted --></a></li>
<li>Respect diff config options in soft assertions  -  by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a>,
<strong>sheremet-va</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/8696">vitest-dev/vitest#8696</a>
<a href="https://github.com/vitest-dev/vitest/commit/9787dedad"><!-- raw
HTML omitted -->(9787d)<!-- raw HTML omitted --></a></li>
<li>Respect diff config options in soft assertions &quot;  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/8696">vitest-dev/vitest#8696</a>
<a href="https://github.com/vitest-dev/vitest/commit/7dc6d54fd"><!-- raw
HTML omitted -->(7dc6d)<!-- raw HTML omitted --></a></li>
<li><strong>ast-collect</strong>: Recognize _<em>vi_import</em> prefix
in static test discovery  -  by <a
href="https://github.com/Yejneshwar"><code>@​Yejneshwar</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10129">vitest-dev/vitest#10129</a>
<a href="https://github.com/vitest-dev/vitest/commit/325463ab2"><!-- raw
HTML omitted -->(32546)<!-- raw HTML omitted --></a></li>
<li><strong>coverage</strong>: Descriptive error message when reports
directory is removed during test run  -  by <a
href="https://github.com/DaveT1991"><code>@​DaveT1991</code></a> and <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10117">vitest-dev/vitest#10117</a>
<a href="https://github.com/vitest-dev/vitest/commit/1413382e1"><!-- raw
HTML omitted -->(14133)<!-- raw HTML omitted --></a></li>
<li><strong>snapshot</strong>: Increase default snapshot max output
length  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> and
<strong>Codex</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10150">vitest-dev/vitest#10150</a>
<a href="https://github.com/vitest-dev/vitest/commit/21e66ff63"><!-- raw
HTML omitted -->(21e66)<!-- raw HTML omitted --></a></li>
<li><strong>ui</strong>: Fix jsx/tsx syntax highlight  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10152">vitest-dev/vitest#10152</a>
<a href="https://github.com/vitest-dev/vitest/commit/f1b1f6c7b"><!-- raw
HTML omitted -->(f1b1f)<!-- raw HTML omitted --></a></li>
<li><strong>web-worker</strong>: Support MessagePort objects referenced
inside postMessage data  -  by <a
href="https://github.com/whitphx"><code>@​whitphx</code></a> and
<strong>Claude Opus 4.6 (1M context)</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9927">vitest-dev/vitest#9927</a>
and <a
href="https://redirect.github.com/vitest-dev/vitest/issues/10124">vitest-dev/vitest#10124</a>
<a href="https://github.com/vitest-dev/vitest/commit/7ad7d39af"><!-- raw
HTML omitted -->(7ad7d)<!-- raw HTML omitted --></a></li>
<li><strong>api</strong>: Make test-specification options writable  - 
by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/10154">vitest-dev/vitest#10154</a>
<a href="https://github.com/vitest-dev/vitest/commit/6abd557b7"><!-- raw
HTML omitted -->(6abd5)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/vitest-dev/vitest/compare/v4.1.4...v4.1.5">View
changes on GitHub</a></h5>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e61f2dd2a0ba0a266c1c5e0334aad3799fee527f"><code>e61f2dd</code></a>
chore: release v4.1.8</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/a09d47236e19fd3151351080c667036ca6164dc4"><code>a09d472</code></a>
chore: release v4.1.7</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/a8fd24c1cad2320b19fcc651413c7d928423bdc1"><code>a8fd24c</code></a>
chore: release v4.1.6</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/e399846850fedf10b8228cbe46a419628998acd9"><code>e399846</code></a>
chore: release v4.1.5</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/596f73986abe2161a9a06f0ca03df68e82690b21"><code>596f739</code></a>
fix: project color label on html reporter (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui/issues/10142">#10142</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/f1b1f6c7b053381f1d9ae184298240a4faa581b0"><code>f1b1f6c</code></a>
fix(ui): fix jsx/tsx syntax highlight (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui/issues/10152">#10152</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/ac04bac206f49d793e7277084f707aee718aa936"><code>ac04bac</code></a>
chore: release v4.1.4</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/d4fbb5cc931754d05327264baaf7b4364ed02f84"><code>d4fbb5c</code></a>
feat(experimental): support aria snapshot (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui/issues/9668">#9668</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/2dc0d62eaf08d8acb1f5042fdb8ac5b4a19fdc73"><code>2dc0d62</code></a>
chore: release v4.1.3</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/89ca0e2549db38a35e8c996beba45716ffb35a5a"><code>89ca0e2</code></a>
feat(experimental): add <code>TestAttachment.bodyEncoding</code> (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui/issues/9969">#9969</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vitest-dev/vitest/commits/v4.1.8/packages/ui">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~GitHub%20Actions">GitHub Actions</a>, a new
releaser for <code>@​vitest/ui</code> since your current version.</p>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/typespec/network/alerts).

</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
…@error (microsoft#10555)

Using `@defaultResponse` on a model that already has `@statusCode` or
`@error` produces duplicate `$ref` entries in OpenAPI output (e.g.,
`anyOf` with two identical refs). Rather than silently generating
invalid output, emit a diagnostic warning at the source.

### Changes

- **`packages/openapi/src/lib.ts`** — New
`default-response-with-status-code` diagnostic with `statusCode` and
`error` message variants
- **`packages/openapi/src/decorators.ts`** — `$defaultResponse` now
checks the target model for existing `@statusCode` properties and
`@error` decoration before setting the wildcard status code
- **`packages/openapi/test/decorators.test.ts`** — Tests for both
warning cases and the clean no-warning path

### Example

```typespec
// This now emits a warning:
@error
@defaultResponse
model DefaultError is Error<500>;

// Recommended alternatives:
@error
model MyError { message: string; }
op read(): Data | MyError;

// Or split concerns:
@error model Error500 is Error<500>;
@error @defaultResponse model DefaultError { message: string; }
alias Result<T> = T | Error500 | DefaultError;
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
…icrosoft#10856)

TypeSpec linter docs explain how to define rules but did not provide
guidance for naming rule IDs beyond examples, which made non-`no-*`
rules less predictable. This PR adds concise naming conventions next to
`createRule({ name })` so authors can choose consistent, user-readable
rule names.

- **Added rule naming guidance in linter authoring docs**
- Updated `website/src/content/docs/docs/extending-typespec/linters.md`
with a new **“Naming convention”** section.
  - Documented:
    - short `kebab-case` names
    - excluding package/library prefix from `name`
    - `no-<thing>` for prohibitions
    - `use-<preferred-thing>` for preferred patterns
- subject-oriented forms for domain checks (e.g.
`<subject>-missing-<thing>`, `<subject>-invalid-<condition>`)

- **Clarified user-facing context for rule IDs**
- Explicitly notes rule names are surfaced in diagnostics,
`tspconfig.yaml`, docs URLs, and suppression comments, guiding authors
toward concise readable IDs.

```ts
export const rule = createRule({
  name: "use-standard-resource-model",
  // ...
});
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
The `internal` access modifier has been stable with no issues, so it no
longer needs the experimental warning. This removes the
`experimental-feature` diagnostic emitted on every use of `internal` and
cleans up all associated suppressions.

## Changes

- **`modifiers.ts`** — Remove the block that emitted
`experimental-feature` (`messageId: "internal"`) whenever the `internal`
modifier was used
- **`messages.ts`** — Remove the `internal` messageId from the
`experimental-feature` diagnostic definition
- **`prototypes.tsp`** — Remove `#suppress "experimental-feature"` from
`internal extern dec` (decorator declarations were never independently
experimental; the suppress was only needed for `internal`)
- **`visibility.tsp`, `private.decorators.tsp`** — Retain existing
`#suppress "experimental-feature"` on `internal extern fn` declarations
— function declarations (`fn`) remain experimental
- **`internal.test.ts`** — Update tests to reflect `internal` no longer
emits any diagnostic; previously-allowed usages that only expected
`experimental-feature` now expect clean compilation
- **`access-modifiers.md`** — Remove the "Suppressing the experimental
warning" section

### Before / After

```typespec
// Before: emits experimental-feature warning, requires suppression
#suppress "experimental-feature" "suppress internal warning"
internal model MyInternalModel {}

// After: no warning, no suppression needed
internal model MyInternalModel {}
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
…lient-python (microsoft#10850)

Bumps
[vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)
from 4.0.18 to 4.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitest-dev/vitest/releases">vitest's
releases</a>.</em></p>
<blockquote>
<h2>v4.1.0</h2>
<p>Vitest 4.1 is out!</p>
<p>This release page lists all changes made to the project during the
4.1 beta. To get a review of all the new features, read our <a
href="https://vitest.dev/blog/vitest-4-1">blog post</a>.</p>
<h3>   🚀 Features</h3>
<ul>
<li>Return a disposable from doMock()  -  by <a
href="https://github.com/kirkwaiblinger"><code>@​kirkwaiblinger</code></a>
in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9332">vitest-dev/vitest#9332</a>
<a href="https://github.com/vitest-dev/vitest/commit/e3e659a96"><!-- raw
HTML omitted -->(e3e65)<!-- raw HTML omitted --></a></li>
<li>Added chai style assertions  -  by <a
href="https://github.com/ronnakamoto"><code>@​ronnakamoto</code></a> and
<a href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a>
in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/8842">vitest-dev/vitest#8842</a>
<a href="https://github.com/vitest-dev/vitest/commit/841df9ac5"><!-- raw
HTML omitted -->(841df)<!-- raw HTML omitted --></a></li>
<li>Update to sinon/fake-timers v15 and add <code>setTickMode</code> to
timer controls  -  by <a
href="https://github.com/atscott"><code>@​atscott</code></a> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/8726">vitest-dev/vitest#8726</a>
<a href="https://github.com/vitest-dev/vitest/commit/4b480aaed"><!-- raw
HTML omitted -->(4b480)<!-- raw HTML omitted --></a></li>
<li>Expose matcher types  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9448">vitest-dev/vitest#9448</a>
<a href="https://github.com/vitest-dev/vitest/commit/3e4b913b1"><!-- raw
HTML omitted -->(3e4b9)<!-- raw HTML omitted --></a></li>
<li>Add <code>toTestSpecification</code> to reported tasks  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9464">vitest-dev/vitest#9464</a>
<a href="https://github.com/vitest-dev/vitest/commit/1a4705da9"><!-- raw
HTML omitted -->(1a470)<!-- raw HTML omitted --></a></li>
<li>Show a warning if <code>vi.mock</code> or <code>vi.hoisted</code>
are declared outside of top level of the module  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9387">vitest-dev/vitest#9387</a>
<a href="https://github.com/vitest-dev/vitest/commit/5db54a468"><!-- raw
HTML omitted -->(5db54)<!-- raw HTML omitted --></a></li>
<li>Track and display expectedly failed tests (.fails) in UI and CLI  - 
by <a href="https://github.com/Copilot"><code>@​Copilot</code></a>,
<strong>sheremet-va</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9476">vitest-dev/vitest#9476</a>
<a href="https://github.com/vitest-dev/vitest/commit/77d75fd34"><!-- raw
HTML omitted -->(77d75)<!-- raw HTML omitted --></a></li>
<li>Support tags  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9478">vitest-dev/vitest#9478</a>
<a href="https://github.com/vitest-dev/vitest/commit/de7c8a521"><!-- raw
HTML omitted -->(de7c8)<!-- raw HTML omitted --></a></li>
<li>Implement <code>aroundEach</code> and <code>aroundAll</code> hooks
 -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9450">vitest-dev/vitest#9450</a>
<a href="https://github.com/vitest-dev/vitest/commit/2a8cb9dc2"><!-- raw
HTML omitted -->(2a8cb)<!-- raw HTML omitted --></a></li>
<li>Stabilize experimental features  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9529">vitest-dev/vitest#9529</a>
<a href="https://github.com/vitest-dev/vitest/commit/b5fd2a16a"><!-- raw
HTML omitted -->(b5fd2)<!-- raw HTML omitted --></a></li>
<li>Accept <code>new</code> or <code>all</code> in <code>--update</code>
flag  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9543">vitest-dev/vitest#9543</a>
<a href="https://github.com/vitest-dev/vitest/commit/a5acf28a5"><!-- raw
HTML omitted -->(a5acf)<!-- raw HTML omitted --></a></li>
<li>Support <code>meta</code> in test options  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9535">vitest-dev/vitest#9535</a>
<a href="https://github.com/vitest-dev/vitest/commit/7d622e3d1"><!-- raw
HTML omitted -->(7d622)<!-- raw HTML omitted --></a></li>
<li>Support type inference with a new <code>test.extend</code> syntax
 -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9550">vitest-dev/vitest#9550</a>
<a href="https://github.com/vitest-dev/vitest/commit/e53854fcc"><!-- raw
HTML omitted -->(e5385)<!-- raw HTML omitted --></a></li>
<li>Support vite 8 beta, fix type issues in the config with different
vite versions  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9587">vitest-dev/vitest#9587</a>
<a href="https://github.com/vitest-dev/vitest/commit/990281dfd"><!-- raw
HTML omitted -->(99028)<!-- raw HTML omitted --></a></li>
<li>Add assertion helper to hide internal stack traces  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> and
<strong>Claude Opus 4.6</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9594">vitest-dev/vitest#9594</a>
<a href="https://github.com/vitest-dev/vitest/commit/eeb0ae2f8"><!-- raw
HTML omitted -->(eeb0a)<!-- raw HTML omitted --></a></li>
<li>Store failure screenshots using artifacts API  -  by <a
href="https://github.com/macarie"><code>@​macarie</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9588">vitest-dev/vitest#9588</a>
<a href="https://github.com/vitest-dev/vitest/commit/24603e3c4"><!-- raw
HTML omitted -->(24603)<!-- raw HTML omitted --></a></li>
<li>Allow <code>vitest list</code> to statically collect tests instead
of running files to collect them  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9630">vitest-dev/vitest#9630</a>
<a href="https://github.com/vitest-dev/vitest/commit/7a8e7fc20"><!-- raw
HTML omitted -->(7a8e7)<!-- raw HTML omitted --></a></li>
<li>Add <code>--detect-async-leaks</code>  -  by <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9528">vitest-dev/vitest#9528</a>
<a href="https://github.com/vitest-dev/vitest/commit/c594d4af3"><!-- raw
HTML omitted -->(c594d)<!-- raw HTML omitted --></a></li>
<li>Implement <code>mockThrow</code> and <code>mockThrowOnce</code>  - 
by <a
href="https://github.com/thor-juhasz"><code>@​thor-juhasz</code></a> and
<a href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a>
in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9512">vitest-dev/vitest#9512</a>
<a href="https://github.com/vitest-dev/vitest/commit/619179fb7"><!-- raw
HTML omitted -->(61917)<!-- raw HTML omitted --></a></li>
<li>Support <code>update: &quot;none&quot;</code> and add docs about
snapshots behavior on CI  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9700">vitest-dev/vitest#9700</a>
<a href="https://github.com/vitest-dev/vitest/commit/05f1854e2"><!-- raw
HTML omitted -->(05f18)<!-- raw HTML omitted --></a></li>
<li>Support playwright <code>launchOptions</code> with
<code>connectOptions</code>  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9702">vitest-dev/vitest#9702</a>
<a href="https://github.com/vitest-dev/vitest/commit/f0ff1b2a0"><!-- raw
HTML omitted -->(f0ff1)<!-- raw HTML omitted --></a></li>
<li>Add <code>page/locator.mark</code> API to enhance playwright trace
 -  by <a href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a>
in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9652">vitest-dev/vitest#9652</a>
<a href="https://github.com/vitest-dev/vitest/commit/d0ee546fe"><!-- raw
HTML omitted -->(d0ee5)<!-- raw HTML omitted --></a></li>
<li><strong>api</strong>:
<ul>
<li>Support tests starting or ending with <code>test</code> in
<code>experimental_parseSpecification</code>  -  by <a
href="https://github.com/jgillick"><code>@​jgillick</code></a> and
<strong>Jeremy Gillick</strong> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9235">vitest-dev/vitest#9235</a>
<a href="https://github.com/vitest-dev/vitest/commit/2f367fad3"><!-- raw
HTML omitted -->(2f367)<!-- raw HTML omitted --></a></li>
<li>Add filters to <code>createSpecification</code>  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9336">vitest-dev/vitest#9336</a>
<a href="https://github.com/vitest-dev/vitest/commit/c8e6c7fbf"><!-- raw
HTML omitted -->(c8e6c)<!-- raw HTML omitted --></a></li>
<li>Expose <code>runTestFiles</code> as alternative to
<code>runTestSpecifications</code>  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9443">vitest-dev/vitest#9443</a>
<a href="https://github.com/vitest-dev/vitest/commit/43d761821"><!-- raw
HTML omitted -->(43d76)<!-- raw HTML omitted --></a></li>
<li>Add <code>allowWrite</code> and <code>allowExec</code> options to
<code>api</code>  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9350">vitest-dev/vitest#9350</a>
<a href="https://github.com/vitest-dev/vitest/commit/20e00ef78"><!-- raw
HTML omitted -->(20e00)<!-- raw HTML omitted --></a></li>
<li>Allow passing down test cases to <code>toTestSpecification</code>
 -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9627">vitest-dev/vitest#9627</a>
<a href="https://github.com/vitest-dev/vitest/commit/6f17d5ddf"><!-- raw
HTML omitted -->(6f17d)<!-- raw HTML omitted --></a></li>
</ul>
</li>
<li><strong>browser</strong>:
<ul>
<li>Add <code>userEvent.wheel</code> API  -  by <a
href="https://github.com/macarie"><code>@​macarie</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9188">vitest-dev/vitest#9188</a>
<a href="https://github.com/vitest-dev/vitest/commit/660801979"><!-- raw
HTML omitted -->(66080)<!-- raw HTML omitted --></a></li>
<li>Add <code>filterNode</code> option to prettyDOM for filtering
browser assertion error output  -  by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a>,
<strong>sheremet-va</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9475">vitest-dev/vitest#9475</a>
<a href="https://github.com/vitest-dev/vitest/commit/d3220fcd8"><!-- raw
HTML omitted -->(d3220)<!-- raw HTML omitted --></a></li>
<li>Support playwright persistent context  -  by <a
href="https://github.com/hi-ogawa"><code>@​hi-ogawa</code></a>,
<strong>Claude Opus 4.6</strong> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9229">vitest-dev/vitest#9229</a>
<a href="https://github.com/vitest-dev/vitest/commit/f865d2ba4"><!-- raw
HTML omitted -->(f865d)<!-- raw HTML omitted --></a></li>
<li>Added <code>detailsPanelPosition</code> option and button  -  by <a
href="https://github.com/shairez"><code>@​shairez</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9525">vitest-dev/vitest#9525</a>
<a href="https://github.com/vitest-dev/vitest/commit/c8a31147c"><!-- raw
HTML omitted -->(c8a31)<!-- raw HTML omitted --></a></li>
<li>Use BlazeDiff instead of pixelmatch  -  by <a
href="https://github.com/macarie"><code>@​macarie</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9514">vitest-dev/vitest#9514</a>
<a href="https://github.com/vitest-dev/vitest/commit/309362089"><!-- raw
HTML omitted -->(30936)<!-- raw HTML omitted --></a></li>
<li>Add <code>findElement</code> and enable strict mode in webdriverio
and preview  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9677">vitest-dev/vitest#9677</a>
<a href="https://github.com/vitest-dev/vitest/commit/c3f37721c"><!-- raw
HTML omitted -->(c3f37)<!-- raw HTML omitted --></a></li>
</ul>
</li>
<li><strong>cli</strong>:
<ul>
<li>Add <a href="https://github.com/bomb"><code>@​bomb</code></a>.sh/tab
completions  -  by <a
href="https://github.com/AmirSa12"><code>@​AmirSa12</code></a> and <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/8639">vitest-dev/vitest#8639</a>
<a href="https://github.com/vitest-dev/vitest/commit/200f31704"><!-- raw
HTML omitted -->(200f3)<!-- raw HTML omitted --></a></li>
</ul>
</li>
<li><strong>coverage</strong>:
<ul>
<li>Support <code>ignore start/stop</code> ignore hints  -  by <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9204">vitest-dev/vitest#9204</a>
<a href="https://github.com/vitest-dev/vitest/commit/e59c94ba6"><!-- raw
HTML omitted -->(e59c9)<!-- raw HTML omitted --></a></li>
<li>Add <code>coverage.changed</code> option to report only changed
files  -  by <a
href="https://github.com/kykim00"><code>@​kykim00</code></a> and <a
href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in <a
href="https://redirect.github.com/vitest-dev/vitest/issues/9521">vitest-dev/vitest#9521</a>
<a href="https://github.com/vitest-dev/vitest/commit/1d9392c67"><!-- raw
HTML omitted -->(1d939)<!-- raw HTML omitted --></a></li>
</ul>
</li>
<li><strong>experimental</strong>:
<ul>
<li>Add <code>onModuleRunner</code> hook to <code>worker.init</code>  - 
by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9286">vitest-dev/vitest#9286</a>
<a href="https://github.com/vitest-dev/vitest/commit/e977f3deb"><!-- raw
HTML omitted -->(e977f)<!-- raw HTML omitted --></a></li>
<li>Option to disable the module runner  -  by <a
href="https://github.com/sheremet-va"><code>@​sheremet-va</code></a> and
<a href="https://github.com/AriPerkkio"><code>@​AriPerkkio</code></a> in
<a
href="https://redirect.github.com/vitest-dev/vitest/issues/9210">vitest-dev/vitest#9210</a>
<a href="https://github.com/vitest-dev/vitest/commit/9be6121ee"><!-- raw
HTML omitted -->(9be61)<!-- raw HTML omitted --></a></li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitest-dev/vitest/commit/4150b913171bda3971a4a4c47c633c26d0c6ae45"><code>4150b91</code></a>
chore: release v4.1.0</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/1de0aa22dd6311a93546a75a3c58a6be519c1baf"><code>1de0aa2</code></a>
fix: correctly identify concurrent test during static analysis (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/9846">#9846</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/c3cac1c1b5a91d921942e9391fbd94841717363f"><code>c3cac1c</code></a>
fix: use isAgent check, not just TTY, for watch mode (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/9841">#9841</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/eab68ba2b8ea6f89717c0b885c573579659d7c3b"><code>eab68ba</code></a>
chore(deps): update all non-major dependencies (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/9824">#9824</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/031f02a89be34491c441b4da9c4e2bacb7db71df"><code>031f02a</code></a>
fix: allow catch/finally for async assertion (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/9827">#9827</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/3e9e096a231fa0ec6475da82e36cbd6fcc9bc8f9"><code>3e9e096</code></a>
feat(reporters): add <code>agent</code> reporter to reduce ai agent
token usage (<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/9779">#9779</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/0c2c01361a95dd26d0d7fd7bc38bcca8dbc6e5d2"><code>0c2c013</code></a>
chore: release v4.1.0-beta.6</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/8181e06e765f4d043818b244c76795022fa78ff6"><code>8181e06</code></a>
fix: <code>hideSkippedTests</code> should not hide
<code>test.todo</code> (fix <a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/9562">#9562</a>)
(<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/9781">#9781</a>)</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/a8216b0014b83612e40ef49f919d5293b68717b3"><code>a8216b0</code></a>
fix: manual and redirect mock shouldn't <code>load</code> or
<code>transform</code> original module...</li>
<li><a
href="https://github.com/vitest-dev/vitest/commit/689a22a1b8c79595f6f4ae82d2b43c895d7f1c50"><code>689a22a</code></a>
fix(browser): types of <code>getCDPSession</code> and <code>cdp()</code>
(<a
href="https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest/issues/9716">#9716</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vitest-dev/vitest/commits/v4.1.0/packages/vitest">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vitest&package-manager=npm_and_yarn&previous-version=4.0.18&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/typespec/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com>
## Summary
- add project-only `features` support in `tspconfig.yaml` with
validation for known compiler feature names
- gate internal modifier and function declaration experimental warnings
behind compiler feature flags for project code
- add `tsp info features` to list available compiler features and
enabled state

## Validation
- `pnpm --filter @typespec/compiler test`
- `pnpm --filter @typespec/compiler build`
- `pnpm --filter @typespec/compiler lint`
- touched-file `prettier --check`
- `pnpm chronus verify`
Closes microsoft#10767

This keeps the OpenAPI extension-key validation tied to the metadata
object literal, so invalid keys such as `custom` are reported on the
offending property instead of the tag name.

Verification:
- `npx pnpm --filter @typespec/openapi build`
- `npx pnpm --filter @typespec/openapi test -- decorators.test.ts`

Signed-off-by: kiwigitops <kiwisclubco@gmail.com>
…vscode (microsoft#10847)

# Improve telemetry instrumentation and error diagnostics

## Summary

Based on analysis of 2 weeks of telemetry data (71K+ events, 2,327
unique users), this PR improves telemetry instrumentation gaps and error
diagnostics across the typespec-vscode extension and the compiler LSP
server.

## Changes

### Extension telemetry improvements (`packages/typespec-vscode`)

**`install-tsp-compiler.ts`** — Added `lastStep` tracking and
`logOperationDetailTelemetry` for failure/timeout cases. Previously, all
3 install failures in the dataset had `lastStep=undefined` and zero
error detail.

**`openapi3-preview.ts`** — Refactored `getOpenApi3OutputFilePath` to
return `Result<string>` instead of `string | undefined` to properly
distinguish compile failures from user cancellations. Added `lastStep`
for the success path (`"Preview panel opened"`). Added compile error
details to telemetry.

**`extension.ts` (start-server)** — Added `lastStep` for the "compiler
not found" state before the install prompt, and for the
cancelled-install path. These covered 66 events (34 fail + 32 cancelled)
that previously had `lastStep=undefined`.

**`extension.ts` (server-path-changed)** — Added `lastStep` for the
config change handler. All 30 events previously had
`lastStep=undefined`.

### Better error message for node/tsp not on PATH
(`packages/typespec-vscode`)

**`tsp-executable-resolver.ts`** — When the compiler is found locally
but neither `node` nor `tsp` is available on PATH, the extension now
shows an actionable error message explaining the likely cause
(nvm/fnm/volta PATH not inherited) and three concrete fixes. Previously,
this silently fell through to `spawn tsp ENOENT`. This was the #1 root
cause of blocked users — 107 failure events from users who never
recovered.

### Server-side error detail preservation (`packages/compiler`)

**`serverlib.ts`** — Added `wrapUnhandledError` wrapper around all LSP
server handlers. When a handler crashes, the wrapper catches the error
and re-throws with the full server-side stack trace in the error message
(via `inspect(e)`). Previously, the JSON-RPC layer only forwarded
`error.message` to the client, so the server-side crash location was
completely lost in telemetry. This addresses the 297 `Cannot read
properties of undefined (reading 'kind')` errors that were previously
opaque.

## Telemetry data highlights

- **2,327 total users** in the 2-week window
- **101 users (4.3%) completely blocked** — never had a successful
`start-server` in 2 weeks
- **#1 root cause**: `spawn tsp ENOENT` (node not on PATH) — 107 events
from never-recovered users, disproportionately macOS (60%)
- **#2 root cause**: compiler not found — 50 events
- **297 `reading 'kind'` unhandled errors** — now will include
server-side stack for future diagnosis

---------

Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
…osoft#10455)

- [x] Identify root cause in
`packages/playground/src/react/standalone.tsx` where `emitter` was being
explicitly cleared when a `sampleName` was set
- [x] Remove `emitter: undefined` from the save logic so the emitter
query param is retained alongside `?sample=...`
- [x] Add changelog entry under `.chronus/changes`
- [x] Apply prettier formatting

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
…d-server (microsoft#10718)

The playground's C# `/generate` endpoint spawns a fresh `dotnet`
subprocess on every request, with no caching anywhere in the pipeline.
Identical replays (undo/redo, share-link reloads, demo specs hit by many
users) pay the full cost. This implements Item 3, Tier 1 of the perf
plan: a container-local in-memory response cache.

### Changes

- **`playground-server/GenerationCache.cs` (new)** — `IGenerationCache`
+ `MemoryGenerationCache` backed by `IMemoryCache`.
`ComputeKey(generatorName, codeModel, configuration, generatorVersion)`
returns a SHA-256 hex over a length-prefixed concatenation (avoids
cross-boundary collisions like `"Foo"+"Bar"` vs `"FooBar"+""`). Entry
`Size` = body byte length; backing cache `SizeLimit = 256 MB`. Entries
are bounded by `SizeLimit`-driven compaction only — there is no TTL,
since a new generator binary deploy implicitly invalidates the cache via
the version-keyed entries.
- **`playground-server/Program.cs`** — registers `AddMemoryCache` +
`IGenerationCache` singleton. Reads the generator DLL's
`FileVersionInfo.FileVersion` once at startup and folds it into the key,
so a deploy of a new binary implicitly invalidates every entry.
`/generate` short-circuits on hit (returns cached bytes, skips the
subprocess) and serializes-once-then-caches on miss. Responses carry
`X-Cache: HIT|MISS`. Cache hits are recorded in telemetry: a hit emits
the `PlaygroundGenerate` event with outcome `cache_hit`, and every
request carries a `cacheStatus` (`hit`|`miss`) property through the
existing telemetry pipeline.
- **`playground-server.Tests/` (new NUnit project, 14 tests)** — key
determinism &amp; format; sensitivity to each of the four components
(including version → invalidation); length-prefix unambiguity;
null-argument guards; get/miss/set/overwrite round-trip; `SizeLimit`
compaction.

### Cache flow

```csharp
var cacheKey = MemoryGenerationCache.ComputeKey(generatorName, body.CodeModel!, body.Configuration!, generatorVersion);
if (cache.TryGet(cacheKey, out var cached) && cached is not null)
{
    request.HttpContext.Response.Headers["X-Cache"] = "HIT";
    telemetryProperties["cacheStatus"] = "hit";
    TrackGenerateEvent("cache_hit");
    return Results.Bytes(cached.Body, cached.ContentType); // skips dotnet subprocess
}
request.HttpContext.Response.Headers["X-Cache"] = "MISS";
telemetryProperties["cacheStatus"] = "miss";
// ...run generator, then:
var responseBytes = JsonSerializer.SerializeToUtf8Bytes(new GenerateResponse(files), GenerateJsonContext.Default.GenerateResponse);
cache.Set(cacheKey, new CachedGenerationResponse(responseBytes, "application/json"));
return Results.Bytes(responseBytes, "application/json");
```

### Out of scope

Tier 2 file-based cache and Items 1/2/4/5 of the issue. Generator
internals are untouched; production `tsp` codegen is unaffected.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: jolov <jolov@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tellnes and others added 21 commits July 16, 2026 17:34
…icrosoft#11154)

Extends `enum-strategy: annotated` (microsoft#10892, which fixed microsoft#5721) to unions
of literals. That option previously stopped at `enum` declarations, so
unions of literals still collapsed to a flat `enum`, dropping variant
names, `@summary`, and docs.

```typespec
/** Set of known error types. */
union ErrorType {
  /** Common error for a bad request. */
  @summary("CommonBadRequest")
  commonBadRequest: "https://example.com/errors/bad-request",
}
```

Before: `{ type: string, enum:
["https://example.com/errors/bad-request"] }`

After (with `enum-strategy: annotated`):

```yaml
ErrorType:
  description: Set of known error types.
  anyOf:
    - const: https://example.com/errors/bad-request
      title: CommonBadRequest
      description: Common error for a bad request.
```

## Behavior

- Opt-in via the existing option; `default` output unchanged.
- 3.1.0/3.2.0 only; 3.0.0 falls back and reports the existing
`enum-strategy-not-supported` warning.
- `oneOf` when the union has `@oneOf`, else `anyOf`.
- `title` from `@summary`, `description` from `@doc`, both omitted when
absent, matching the enum handling.
- Non-literal variants (models/scalars) stay as their own members;
discriminated unions untouched.

## Open question

The option is named `enum-strategy` but now also covers unions of
literals (both are "enumerated types" in OpenAPI terms). I broadened its
description rather than renaming it. Happy to add an alias if preferred.
…icrosoft#11269)

## Summary
- match fixed enum members against the last contract while ignoring
underscores
- preserve the published member name when the underscore-insensitive
match is unique
- avoid applying ambiguous underscore-insensitive matches

## Validation
- npm run build
- dotnet test packages/http-client-csharp/generator
- npm run cop

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… 1.1.411, pylint-guidelines-checker 0.5.9 (microsoft#11197)

bumping check versions
Azure/azure-sdk-for-python#47920

also bump pylint guideline checker version from 0.5.2 to the latest
0.5.9

updates emitter for new rules
- disable `no-cross-package-private-import` because it has false
positives
- suppress `docstring-keyword-should-match-keyword-only` for now,
because we have some params like `api_version` that are in the docstring
but not explicit parameters and only in kwargs
- build keyword param lines for docstring
- suppress `docstring-missing-param` check which flags undocumented args
in signatures like `init(self, *args, **kwargs)`
microsoft#11277)

In `packages/http-client-csharp/eng/pipeline/publish.yml`, manual runs
currently downgrade step failures to warnings (`SucceededWithIssues`)
and still open a PR in `azure-sdk-for-net`, giving reviewers a false
positive. Manual runs should instead fail the pipeline.

### Changes

- **`Submit-AzureSdkForNetPr.ps1`**
- Added `-BuildReason` parameter; sets `$FailOnError` when it equals
`'Manual'`.
- Added `Register-StepFailure` helper that records each downgraded
failure and preserves the existing `##vso[task.complete
result=SucceededWithIssues;]` signal.
- Routed all previously swallowed failures through it — npm
install/build, `Generate.ps1`, sparse-checkout expansion, Azure/mgmt
generator builds, and per-service code generation (including their
`catch` counterparts).
- Before commit/PR creation, throws a summary of failures when
`$FailOnError` is set; the existing outer `catch` converts this to `exit
1`, so **no PR is opened**.
- **`publish.yml`**: passes `-BuildReason '$(Build.Reason)'`.

Automated (scheduled/CI/main) runs are unchanged — they continue
reporting `SucceededWithIssues` and proceed.

```powershell
$FailOnError = $BuildReason -eq 'Manual'
# ...steps use Register-StepFailure instead of Write-Warning + SucceededWithIssues...
if ($FailOnError -and $script:StepFailures.Count -gt 0) {
    $failureSummary = ($script:StepFailures | ForEach-Object { "- $_" }) -join [Environment]::NewLine
    throw "One or more steps failed during a manual run; not creating a pull request:$([Environment]::NewLine)$failureSummary"
}
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
…ft#11286)

## Fixes per-client `ServiceVersion` regression

### Problem

For a package containing multiple TypeSpec clients, the emitter is
supposed to generate a **single shared `ServiceVersion` enum** (named
after the package/service) when all clients use the same api-versions,
and only fall back to a **per-client `<ClientName>ServiceVersion`** when
the clients genuinely have different api-versions.

Recently, multi-client packages started generating a separate
`ServiceVersion` enum per client even when all clients share the same
api-versions, e.g.:

- `azure-search-documents`: `SearchServiceVersion` →
`SearchIndexServiceVersion`, `SearchIndexerServiceVersion`,
`KnowledgeBaseRetrievalServiceVersion`
- `azure-developer-devcenter`: `DevCenterServiceVersion` →
`DevCenterServiceVersion`, `DevBoxesServiceVersion`,
`DeploymentEnvironmentsServiceVersion`
- `azure-communication-messages`, `eventgrid-namespaces`, etc.

### Root cause

In `code-model-builder.ts`, the "same api-versions for all clients"
check was changed in microsoft#11134 (replacing `lodash.isEqual` with a built-in
comparison):

```ts
// before
apiVersionSameForAllClients = isEqual(sharedApiVersions, apiVersions);
// after
apiVersionSameForAllClients =
  sharedApiVersions.length === apiVersions.length &&
  sharedApiVersions.every((it, index) => it === apiVersions[index]);
```

`apiVersions` is `ApiVersion[]` (objects), not `string[]`. Each client
builds its **own** `ApiVersion` instances:

```ts
const apiVersion = new ApiVersion();
apiVersion.version = version.value;
codeModelClient.apiVersions.push(apiVersion);
```

`lodash.isEqual` did a deep value comparison (equal versions → treated
as equal), but `===` compares object references, which is always `false`
for distinct instances. As a result `apiVersionSameForAllClients` became
`false` for every multi-client package, triggering the per-client
`ServiceVersion` branch.

### Fix

Compare the api-version **strings** instead of the `ApiVersion` object
references:

```ts
apiVersionSameForAllClients =
  sharedApiVersions.length === apiVersions.length &&
  sharedApiVersions.every((it, index) => it.version === apiVersions[index].version);
```

This restores a single shared `ServiceVersion` for multi-client packages
whose clients use the same api-versions, while still producing
per-client `ServiceVersion` enums when the api-versions actually differ.

### Notes

- Draft: end-to-end generation/regression tests still to be run.
- Related downstream regeneration: Azure/azure-sdk-for-java#49842.
fix Azure/typespec-azure#4911

use local test, will add azure-http-specs next week

also switched to devfeed to lock, dev may need to run `npx
artifacts-npm-credprovider -c .npmrc`
The model now accepts an optional `Scopes` template parameter so
operations can declare required scopes. The OpenAPI3 emitter emits those
scopes on each operation's security requirement while the scheme object
itself remains unchanged. Existing usages without scopes are unaffected.
## Summary

This PR introduces `@typespec/graphql`, a new emitter that generates
GraphQL SDL (Schema Definition Language) from TypeSpec definitions.

  ### Features

- **Schema generation**: Emit complete GraphQL schemas from TypeSpec
models and operations
- **Operation types**: Support for `@query`, `@mutation`, and
`@subscription` decorators
- **Interface composition**: Use `@graphqlInterface` and `@compose` for
GraphQL interface inheritance
  patterns
- **Visibility filtering**: Automatic input/output type generation based
on `@visibility` decorators
- **Custom scalars**: `@specifiedBy` decorator for custom scalar URL
specifications
- **Schema customization**: `@schema` decorator for multi-schema
scenarios

  ### Architecture

  The emitter uses a two-phase approach:
1. **Mutation phase**: Transforms TypeSpec types into GraphQL-compatible
structures using the mutator framework, handling visibility filtering,
naming conventions, and type deduplication
2. **Render phase**: Uses `@pinterest/alloy-graphql` components to emit
the final SDL output

  ### Example

  ```typespec
  import "@typespec/graphql";

  using TypeSpec.GraphQL;

  @query
  op getUser(id: string): User;

  @mutation
  op createUser(user: User): User;

  model User {
    name: string;
    email: string;
  }
```

  Generates:

```graphql
  type Query {
    getUser(id: String!): User!
  }

  type Mutation {
    createUser(user: UserInput!): User!
  }

  type User {
    name: String!
    email: String!
  }

  input UserInput {
    name: String!
    email: String!
  }
```

  ### Test plan

  - Unit tests for all decorators and components 
  - E2E tests covering schema generation scenarios
  - Mutation engine tests for type transformation logic

  ### Notes

  - This emitter depends on [@pinterest/alloy-graphql](https://github.com/pinterest/alloy-graphql)
  - Tracked in GitHub issue microsoft#4933

---------

Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Co-authored-by: Swati Kumar <swati.kumar.a@gmail.com>
Co-authored-by: swatikumar <swatikumar@pinterest.com>
Co-authored-by: Steve Rice <srice@pinterest.com>
Co-authored-by: Angel <angelvargas@pinterest.com>
Co-authored-by: Swati Kumar <swatkatz@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
Backmerges `release/july-2026` into `main` to bring hotfix commits back
to the development branch.

## Changes from release/july-2026
- **fix(typespec-vscode):** prevent shell injection in tsp compile task
(microsoft#11275)
- **fix(spector):** prevent unauthenticated remote server stop (microsoft#11274)
- **chore:** version bumps for hotfixes (microsoft#11281)

---------

Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…11295)

## Summary

Node has shipped native source-map support for stack traces since v14.6
via `process.setSourceMapsEnabled(true)`, and every workspace package
now requires Node `>=22`. The third-party `source-map-support`
dependency is therefore no longer needed.

This replaces the `source-map-support/register.js` import with the
native API in the CLI entrypoints and drops the dependency.

## Changes

- Replace `source-map-support/register.js` with
`process.setSourceMapsEnabled(true)` in the CLI entrypoints (removing
the associated `try/catch` + `@ts-ignore`/eslint-disable):
  - `packages/compiler/src/core/cli/cli.ts`
  - `packages/pack/src/cli.ts`
  - `packages/tspd/src/cli.ts`
  - `packages/bundler/src/cli.ts`
  - `packages/spector/src/cli/cli.ts`
- Remove `source-map-support` from the `pnpm-workspace.yaml` catalog and
from the `package.json` of `@typespec/compiler`, `@typespec/pack`,
`@typespec/tspd`, and `@typespec/spector`.
- Refresh `pnpm-lock.yaml`.

## Out of scope

`packages/http-client-*/package-lock.json` reference
`source-map-support` only transitively via the **published**
`@typespec/spector`; those npm-managed lockfiles regenerate separately
when spector is republished.

## Validation

- All affected packages build.
- Lint (oxlint) and format (prettier) clean on touched files.
- Remaining `pnpm-lock.yaml` hits are legitimate transitive deps
(`@babel/register`, chronus tooling), not a direct dependency.
…ests (microsoft#11298)

## Summary

- add C# Spector coverage for exploded model query parameters
- add C# Spector coverage for lossy integer duration encodings
- regenerate the affected routes and duration clients

## Validation

- `Test-Spector.ps1 -filter http/routes` (18 passed, 9 skipped)
- `Test-Spector.ps1 -filter http/encode/duration` (58 passed)
- `npm run build`
- `npm run cop`

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Summary
- add an `InternalHelperProvider` base that registers itself with
`AddTypeToKeep(..., isRoot: false)`
- default helper declarations to `internal static`, with direct modifier
overrides for non-static helpers
- preserve generic non-root helpers during post-processing and
regenerate the local sample

## Validation
- `npm run build`
- `npm test`
- `npm run cop`
- focused helper retention tests
- formatting completed; emitter lint is currently blocked by the
repository's missing ESLint 10 flat config

---------

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

## Summary

The `parameters.query.QueryTests#testDollarSign` test in
`http-client-generator-clientcore-test` was disabled pending the
`@typespec/http-specs` dollar-sign route fix. That fix is now published
(http-specs `0.1.0-alpha.38`), and the already-generated
`SpecialCharClient.dollarSign` code matches the current spec (route
`/parameters/query/special-char/dollar-sign`, `@QueryParam("$filter")`).

This PR removes the `@Disabled` annotation (and its now-unused import)
to enable the test.

## Validation

`mvn test -Dtest=parameters.query.QueryTests` against the spector mock
server: **2 run, 0 failures, 0 skipped**.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…icrosoft#11221)

Fixes microsoft#11141

Auto-generate a reference documentation page per **linter rule** and per
**diagnostic** with `tspd`, so these pages stop being hand-written and
drift-prone.

> [!NOTE]
> This PR is scoped to the `tspd` documentation generation. The
`referenceDocs.baseUrl` url auto-generation and the language server
hover that surfaces these docs at a reported error are split into a
follow-up PR.

## Compiler

- **`docs` field on diagnostics and linter rules.** Both `createRule`
and diagnostic definitions accept a `docs` field for extended
documentation:

  ```ts
  export const myRule = createRule({
    name: "my-rule",
    severity: "warning",
    description: "Short description.",
    docs: fileRef.fromPackageRoot("src/rules/my-rule.md"),
    messages: {
      /* ... */
    },
  });
  ```

The value is `string | FileRef`: either inline markdown, or a `FileRef`
created via `fileRef.fromPackageRoot("...")`. A `FileRef` is a plain `{
kind, path }` data object read **lazily** by tooling, so it is safe to
include in code bundled for the browser (e.g. the playground). Because
the docs live on the definition, they are available at compile time, not
just to `tspd`.

## tspd

`tspd doc` now renders:
- one page per rule -> `reference/rules/<name>.md`
- one page per diagnostic -> `reference/diagnostics/<code>.md` (each
shows its severity)
- a `documentation-missing` warning for every rule/diagnostic without
`docs`.

## Pilots

Content is faithfully migrated from the hand-written pages, which are
then deleted:
- **`@typespec/http`** — the `op-reference-container-route` rule.
- **`@typespec/openapi3`** — 6 diagnostics (`path-query`,
`duplicate-header`, `inline-cycle`, `invalid-schema`,
`invalid-server-variable`, `union-null`); the old hand-written
`emitters/openapi3/diagnostics.md` is replaced by the generated pages
under `reference/diagnostics/`.

## Validation

- Built `compiler`, `tspd`, `http`, `openapi3`; regen is stable (running
it twice produces no diff).
- `lint` green for the touched packages; the
`op-reference-container-route` rule tests pass.

---------

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

The OpenAPI `License` object supports an `identifier` field (SPDX
expression) since spec v3.1, but TypeSpec's `@info` decorator was
missing it — causing a spurious "unknown prop" warning.

## Changes

### `@typespec/openapi`
- Added `identifier?: string` to the `License` model and TypeScript
interfaces
- Added `license-url-identifier-conflict` diagnostic: `url` and
`identifier` are mutually exclusive (per spec); both being set is now a
compile-time error
- Validation enforced in the `$info` decorator

### `@typespec/openapi3` — Emitter
- **OpenAPI 3.1 / 3.2**: `identifier` emits as the native `identifier`
field
- **OpenAPI 3.0**: `identifier` is emitted as the
`x-oai-license-identifier` extension

### `@typespec/openapi3` — Converter (OpenAPI → TypeSpec)
- `identifier` in 3.1 documents maps directly to `identifier`
- `x-oai-license-identifier` in 3.0 documents is promoted to
`identifier`

## Example

```typespec
@info(#{
  license: #{ name: "MIT", identifier: "MIT" },
})
namespace MyService;
```

Emits for OpenAPI 3.1:
```json
"license": { "name": "MIT", "identifier": "MIT" }
```

Emits for OpenAPI 3.0:
```json
"license": { "name": "MIT", "x-oai-license-identifier": "MIT" }
```

closes microsoft#11302

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…11297)

This updates dependency resolution to enforce `sigstore@4.1.1`,
addressing vulnerability exposure from earlier transitive versions. The
lockfile is refreshed so installs consistently resolve to the pinned
version.

- **Dependency resolution hardening**
- Added a workspace-level pnpm override for `sigstore` in
`pnpm-workspace.yaml`.
  - Ensures all transitive resolution paths converge on `4.1.1`.

- **Deterministic install output**
- Regenerated `pnpm-lock.yaml` to apply the override in resolved package
graph.
- Removed prior lockfile resolution paths that pulled older `sigstore`
versions.

```yaml
# pnpm-workspace.yaml
overrides:
  sigstore: 4.1.1
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Co-authored-by: Mike Harder <mharder@microsoft.com>
fixes microsoft#6870

---------

Co-authored-by: iscai-msft <isabellavcai@gmail.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…microsoft#11303)

Extracts the self-contained `tsp init` template-loading refactor out of
microsoft#11299 into its own PR.

## What

Replaces `getExecutionRoot()`-based template resolution in `tsp init`
with a first-class `TemplateSource` abstraction, with three
implementations behind one interface:

- **`FileSystemTemplateSource`** — the default (installed/`node`) path;
reads `templates/` from the compiler package root. No
`getExecutionRoot()` dependency.
- **`InMemoryTemplateSource`** — serves the index and every template
file from an in-memory map (used by the standalone single-executable to
serve templates offline).
- **`RemoteTemplateSource`** — `--templates-url`; keeps the
untrusted-source confirmation and relative-file resolution.

## Why

Template loading previously went through the `CompilerHost` filesystem
contract anchored at `getExecutionRoot()`, which also serves the stdlib.
Serving templates from an embedded/offline source required masquerading
an in-memory map as a real filesystem and overloading
`getExecutionRoot()`. This refactor decouples template resolution from
the host FS contract so each context supplies its own source, and leaves
`getExecutionRoot()` solely for the stdlib.

## Notes

- No behavior change on the normal path: `init` defaults to
`FileSystemTemplateSource`.
- Language server (`getTypeSpecCoreTemplates` / `scaffoldNewProject`)
and the VS Code extension keep working; the extension threads a
`TemplateSource` through `create-tsp-project`.
- Backward-compatible: `serverlib.ts` / `server/types.ts` are unchanged.
- This is the first of a split of microsoft#11299; the standalone
single-executable feature remains in microsoft#11299 and builds on top of this.
…osoft#11312)

## Summary

Removes the unused `backupPath` fallback argument from the internal
`runScript` helper (`packages/compiler/src/runner.ts`) and its two
callers.

`runScript(relativePath, backupPath)` used to fall back to `backupPath`
when `relativePath` did not exist under the resolved package root. Both
call sites (`cmd/tsp.js`, `cmd/tsp-server.js`) always pass a
`relativePath` that exists, so the fallback (and its `checkFileExists`
helper + `access` import) is dead code.

This is a pure, self-contained cleanup extracted out of microsoft#11299
(standalone SEA rewrite) so that PR stays focused on the feature. The
standalone CLI does not use `runScript`.

## History / why it is safe to remove

The `backupPath` fallback was added in microsoft#1410 and shipped in
`@cadl-lang/compiler` **0.38.2** (Dec 2022) as a patch: _"Revert
breaking change to global cli usage."_

That PR introduced the stable indirection entrypoints
`entrypoints/cli.js` and `entrypoints/server.js`. Before 0.38.2 the
global CLI booted the compiler directly at `dist/core/cli/cli.js` (and
`dist/server/server.js`). Because a **globally-installed** CLI resolves
and runs the **locally-installed** compiler, a global 0.38.2 CLI could
hit an older local compiler that did not yet have the `entrypoints/`
files. The `backupPath` (`dist/core/cli/cli.js` /
`dist/server/server.js`) was the fallback so the global CLI could still
boot those pre-0.38.2 local installs.

Every supported compiler version has shipped `entrypoints/cli.js` /
`entrypoints/server.js` since 0.38.2, so the fallback branch is now
unreachable dead code.

## Changes
- `runner.ts`: `runScript(relativePath)` — dropped `backupPath` param,
`checkFileExists`, and the now-unused `access` import.
- `cmd/tsp.js` / `cmd/tsp-server.js`: drop the second argument.

## Validation
- `tsc -p packages/compiler/tsconfig.build.json` passes.
…ation (microsoft#11316)

## Summary

Adds a `--rules-dir` option (and matching `rulesDir` API option) to
`tspd doc` to control the directory where the per-rule reference pages
are written.

Since the tspd change that auto-generates one reference page per linter
rule, those pages are always emitted under `<output-dir>/rules/`. Some
consumers (e.g. `typespec-azure`) generate their reference docs into a
`reference/` output dir but want the rule pages to keep their historical
location one level up (`libraries/<lib>/rules/<name>`), so that existing
rule URLs stay stable.

This adds a small, backwards-compatible knob to control that location.

## Details

- New CLI flag `--rules-dir <dir>` on `tspd doc`.
- New `rulesDir` option on `GenerateLibraryDocsOptions` and
`RenderToStarlightMarkdownOptions`.
- Defaults to `"rules"` (relative to `--output-dir`) — **no change** to
existing behavior.
- Can be set to a path that escapes the output dir (e.g. `"../rules"`)
to place rule pages outside the generated reference folder.
- The `StarlightRenderer.linterRuleLink` (used by `linter.md`) honors
the configured dir so cross-links resolve correctly.

## Example

```bash
# default (unchanged): pages at <output-dir>/rules/<name>.md
tspd doc . --enable-experimental --output-dir ./reference

# keep rule pages outside the reference folder: <output-dir>/../rules/<name>.md
tspd doc . --enable-experimental --output-dir ./reference --rules-dir ../rules
```
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/asset-emitter
  • @typespec/events
  • @typespec/html-program-viewer
  • @typespec/http-canonicalization
  • @typespec/http-client-js
  • @typespec/http-client
  • @typespec/http-server-csharp
  • @typespec/http-server-js
  • @typespec/internal-build-utils
  • @typespec/json-schema
  • @typespec/library-linter
  • @typespec/mutator-framework
  • @typespec/playground
  • @typespec/prettier-plugin-typespec
  • @typespec/protobuf
  • @typespec/rest
  • @typespec/spec-coverage-sdk
  • @typespec/sse
  • @typespec/streams
  • tmlanguage-generator
  • @typespec/versioning
  • @typespec/xml

The following packages have already been documented:

  • @typespec/bundler
  • @typespec/compiler
  • @typespec/emitter-framework
  • @typespec/graphql
  • @typespec/http-client-java
  • @typespec/http-client-python
  • @typespec/http-specs
  • @typespec/http
  • @typespec/openapi
  • @typespec/openapi3
  • @typespec/spec-api
  • @typespec/spector
  • @typespec/tspd
Show changes

@typespec/http-client-java - dependencies ✏️

Update http-client-java Node.js dependencies

@typespec/http-client-java - internal ✏️

Ignore modifications to META-INF metadata.json files

@typespec/emitter-framework - feature ✏️

Add Python Pydantic helpers to the emitter framework: PydanticClassDeclaration, PydanticSettingsClassDeclaration, and PydanticRootModelDeclaration components, along with field_validator, model_validator, field_serializer, and computed_field decorator helpers.

@typespec/compiler - feature ✏️

Add setAutoDecorator API to programmatically apply an auto decorator to a target, mirroring what the synthesized auto dec implementation does when the decorator is written in source. This lets emitters and mutators mark synthetic types without reaching into the program state map directly.,> ,> ts,> import { setAutoDecorator } from "@typespec/compiler";,> ,> setAutoDecorator(program, "MyLib.myFlag", target);,>

@typespec/http-client-java - internal ✏️

Formatting

@typespec/http-client-java - internal ✏️

Add service/multiple-services generation and end-to-end test coverage in http-client-generator-test.

@typespec/http-client-java - internal ✏️

Add e2e tests

@typespec/http-client-java - internal ✏️

Add SpecialChars e2e test, encode/boolean test (disabled), and type/union/discriminated e2e tests

@typespec/http-client-java - dependencies ✏️

Update http-client-java Node.js dependencies and regenerate Java test assets

@typespec/openapi3 - internal ✏️

Provide extended documentation for several diagnostics (path-query, duplicate-header, inline-cycle, invalid-schema, invalid-server-variable, union-null) via co-located markdown files.

@typespec/http-client-java - feature ✏️

Support clientApiVersions

@typespec/graphql - internal ✏️

Add @typespec/graphql emitter for generating GraphQL SDL from TypeSpec definitions

@typespec/http-client-java - internal ✏️

Reformat augment decorator arguments in test files to match updated formatter style.

@typespec/http-client-java - internal ✏️

Reformat a test spec affected by the compiler formatter change keeping is/extends inline for multi-argument template references (whitespace only, no semantic change).

@typespec/http-client-java - internal ✏️

Reformat union template arguments in test files to match updated formatter style.

@typespec/http-client-java - fix ✏️

Fix null LRO error response body handling in generated management clients.

@typespec/http-client-java - fix ✏️

Fix multi-client packages generating a separate ServiceVersion enum per client when all clients share the same api-versions. The api-version comparison now compares version strings instead of ApiVersion object references, restoring a single shared ServiceVersion for such packages.

typespec-vscode - fix ✏️

Fix a shell command injection in the tsp compile task provider. Tasks now run via vscode.ProcessExecution with arguments passed as an array instead of vscode.ShellExecution, so workspace file paths and task arguments are no longer interpreted by the OS shell. The task args is now specified as an array of arguments.

@typespec/http-client-python - fix ✏️

Fix a bug where a TypedDict literal value that coincides with a Python builtin type name (e.g. type: "type") was corrupted into Literal["builtins.type"] in the generated types.py. The builtin-shadowing workaround now ignores identifiers inside string literals (literal values and quoted forward references are left untouched) and detects shadowing against the actually-emitted annotation, so genuine sibling-builtin shadowing is still qualified while spurious import builtins statements are no longer emitted.

@typespec/http-client-java - internal ✏️

Add e2e tests for parameters/body-root, parameters/query special char, type/model/inheritance/single-discriminator no-subtypes, azure/resourcemanager/common-properties arm-resource-identifiers, and azure/resourcemanager/management-group scenarios

@typespec/http-client-java - internal ✏️

Enable the parameters.query.QueryTests dollar-sign test in the clientcore test module now that the @typespec/http-specs dollar-sign route fix is published.

@typespec/http-client-java - dependencies ✏️

Bump Node.js dependencies for http-client-java and align dependency ranges in test package overrides.

@typespec/http-client-java - internal ✏️

Replace js-yaml with yaml for code-model serialization and drop lodash in favor of a built-in array comparison.

@typespec/http-client-java - dependencies ✏️

Update Node.js dependencies to latest (compiler 1.13.0, TCGC 0.69.0, azure-core 0.69.0) and bump version to 0.9.0

@typespec/http-client-java - dependencies ✏️

Update Node.js dependencies

@typespec/http-client-java - dependencies ✏️

Update Node.js dependencies

@typespec/http-client-java - fix ✏️

Overload async client method was not generated for advanced-versioning.

@typespec/http-client-java - fix ✏️

Do not throw on a per-service api-version map; treat it as undefined so a client with a single api-version can still be generated.

@typespec/http-client-java - fix ✏️

Fix duplicate method in generated samples, when advanced-versioning=true

@typespec/http-client-java - dependencies ✏️

Update Node.js dependencies: @azure-tools/typespec-autorest 0.69.1, @azure-tools/typespec-azure-resource-manager 0.69.1, @azure-tools/typespec-azure-rulesets 0.69.1, @microsoft/api-extractor 7.58.9, @types/node 25.9.3, @vitest/coverage-v8 4.1.9, @vitest/ui 4.1.9, vitest 4.1.9

@typespec/http-client-java - fix ✏️

Follow-up on exact name feature, after TCGC bug fix.

@typespec/http-client-java - fix ✏️

fix bug that nullable not handled correctly

@typespec/http-client-java - feature ✏️

Support advanced-versioning for mixed api-version client

@typespec/http-client-java - feature ✏️

Support crossLanguageVersion

@typespec/http-client-java - feature ✏️

Support exact name from TCGC.

@typespec/http-client-python - fix ✏️

Add an IO[bytes] overload alongside bytes for binary bytes bodies, keeping backward compatibility for services migrating from swagger whose binary bodies were typed as IO.

@typespec/http - fix ✏️

Cache HTTP operation resolution at the program level so multiple callers (validators, linter rules, emitters) share results without redundant recomputation. On large specs this reduces linter time by ~48%.

@typespec/compiler - internal ✏️

Refactor tsp init template loading around a URI-based TemplateSource abstraction. A UriTemplateSource handles local and remote templates (paths and URLs), while built-in ("core") templates are addressed through an internal: scheme that resolves to an injectable provider. This lets alternative hosts (e.g. an offline single-executable compiler) serve bundled templates via an InMemoryTemplateSource without coupling template loading to the CompilerHost filesystem.

@typespec/openapi - feature ✏️

Add identifier field to the License model in @typespec/openapi. This is an SPDX license expression for the API (e.g. "MIT", "Apache-2.0"). The identifier and url fields are mutually exclusive. For OpenAPI 3.1+, identifier is emitted as-is; for OpenAPI 3.0, it is emitted as the x-oai-license-identifier extension. Importing an OpenAPI document also supports reading back identifier (or x-oai-license-identifier for 3.0 documents).,> ,> typespec,> @info(#{,> license: #{ name: "MIT", identifier: "MIT" },,> }),> namespace MyService;,>

@typespec/openapi3 - feature ✏️

Add identifier field to the License model in @typespec/openapi. This is an SPDX license expression for the API (e.g. "MIT", "Apache-2.0"). The identifier and url fields are mutually exclusive. For OpenAPI 3.1+, identifier is emitted as-is; for OpenAPI 3.0, it is emitted as the x-oai-license-identifier extension. Importing an OpenAPI document also supports reading back identifier (or x-oai-license-identifier for 3.0 documents).,> ,> typespec,> @info(#{,> license: #{ name: "MIT", identifier: "MIT" },,> }),> namespace MyService;,>

@typespec/http-client-java - feature ✏️

Validate Java runtime version in dependency check

@typespec/compiler - internal ✏️

Replace the source-map-support dependency with the native Node.js process.setSourceMapsEnabled(true) API in the CLI entrypoints.

@typespec/tspd - internal ✏️

Replace the source-map-support dependency with the native Node.js process.setSourceMapsEnabled(true) API in the CLI entrypoints.

@typespec/spector - internal ✏️

Replace the source-map-support dependency with the native Node.js process.setSourceMapsEnabled(true) API in the CLI entrypoints.

@typespec/bundler - internal ✏️

Replace the source-map-support dependency with the native Node.js process.setSourceMapsEnabled(true) API in the CLI entrypoints.

@typespec/graphql - internal ✏️

Replace the source-map-support dependency with the native Node.js process.setSourceMapsEnabled(true) API in the CLI entrypoints.

@typespec/openapi3 - feature ✏️

Extend the enum-strategy: annotated emitter option to unions of literals. When set to annotated, a union whose variants are literals is emitted as a oneOf/anyOf of const subschemas with per-variant title/description taken from @summary and @doc, instead of collapsing to a single lossy enum. Supported for OpenAPI 3.1.0 and above; emitting with OpenAPI 3.0.0 falls back to the default form and reports a warning.,> ,> For example, the following TypeSpec:,> ,> typespec,> /** Set of known error types. */,> union ErrorType {,> /** Common error for a bad request. */,> @summary("CommonBadRequest"),> commonBadRequest: "https://example.com/errors/bad-request",,> ,> /** The request body could not be parsed. */,> @summary("InvalidBody"),> invalidBody: "https://example.com/errors/invalid-body",,> },> ,> ,> emits:,> ,> yaml,> ErrorType:,> description: Set of known error types.,> anyOf:,> - const: https://example.com/errors/bad-request,> title: CommonBadRequest,> description: Common error for a bad request.,> - const: https://example.com/errors/invalid-body,> title: InvalidBody,> description: The request body could not be parsed.,> ,> ,> Use @oneOf on the union to emit oneOf instead of anyOf.

@typespec/http - feature ✏️

Add scope support to OpenIdConnectAuth. The model now accepts an optional Scopes template parameter (OpenIdConnectAuth<ConnectUrl, Scopes>) and the OpenAPI3 emitter emits those scopes on each operation's openIdConnect security requirement. The scheme object itself remains unchanged (scopes are discovered via the openIdConnectUrl). Existing OpenIdConnectAuth<Url> usages are unaffected.

@typespec/openapi3 - feature ✏️

Add scope support to OpenIdConnectAuth. The model now accepts an optional Scopes template parameter (OpenIdConnectAuth<ConnectUrl, Scopes>) and the OpenAPI3 emitter emits those scopes on each operation's openIdConnect security requirement. The scheme object itself remains unchanged (scopes are discovered via the openIdConnectUrl). Existing OpenIdConnectAuth<Url> usages are unaffected.

@typespec/bundle-uploader - internal ✏️

Extend publish pipeline to upload emitter bundles to Playground storage account. Update Python emitter to be browser-compatible for use in the TypeSpec playground.

@typespec/http-client-python - fix ✏️

[Python] Generate model/client/config docstrings and targeted pylint suppressions that satisfy the updated azure-pylint-guidelines-checker docstring checks (docstring-keyword-should-match-keyword-only, docstring-missing-param)

@typespec/http-client-python - feature ✏️

Add mock API test coverage for @encode(string) on boolean properties (encode/boolean Spector scenarios). Fix Python generator to correctly serialize and deserialize boolean values encoded as strings (case-insensitive true/false)

typespec-vscode - internal ✏️

Reuse the compiler's UriTemplateSource.loadIndex() to load tsp init template indexes instead of the extension's own file/URL reading and JSON parsing, unifying how core and configured templates are loaded.

@typespec/compiler - feature ✏️

Add a docs field to linter rule and diagnostic definitions to provide extended reference documentation. The value can be an inline markdown string or a FileRef created with fileRef.fromPackageRoot("src/rules/my-rule.md"), which is read lazily by tooling so it stays safe to bundle for the browser.,> ,> ts,> export const myRule = createRule({,> name: "my-rule",,> severity: "warning",,> description: "Short description.",,> docs: fileRef.fromPackageRoot("src/rules/my-rule.md"),,> messages: {,> /* ... */,> },,> });,>

@typespec/tspd - feature ✏️

tspd doc now generates a documentation page per linter rule (reference/rules/<name>.md) and per diagnostic (reference/diagnostics/<code>.md), sourced from the docs field on the rule and diagnostic definitions. A documentation-missing warning is reported for any linter rule or diagnostic that does not provide documentation.

@typespec/http - internal ✏️

Provide extended documentation for the op-reference-container-route linter rule via a co-located markdown file.

@typespec/compiler - internal ✏️

Remove the unused backupPath fallback argument from the internal runScript helper

@typespec/spec-dashboard - internal ✏️

Add coverage overview component and emitter display name support

@typespec/http-specs - feature ✏️

Add SSE tests

@typespec/spec-api - feature ✏️

Add streamChunks support to MockBody for chunked SSE streaming in mock responses

@typespec/spector - feature ✏️

Support chunked streaming via streamChunks in mock response body

@typespec/compiler - feature ✏️

createTester now mounts each discovered library's tspconfig.yaml into the virtual file system, so experimental features a library opts into (e.g. auto-decorators) are honored when compiling against the tester.

@typespec/tspd - feature ✏️

tspd gen-extern-signature now also generates a typed setter (e.g. setMyFlag, setMyLabel) for each auto decorator, alongside the existing is*/get* readers.

@typespec/tspd - feature ✏️

Add a --rules-dir option (and rulesDir API option) to tspd doc to control where per-rule reference pages are written. Defaults to rules (relative to --output-dir); can be set to a path escaping the output dir (e.g. ../rules) to keep rule pages outside the generated reference folder.

@typespec/http-client-java - dependencies ✏️

Update js-yaml dependency to ^4.2.0

@typespec/http-client-python - dependencies ✏️

[Python] Bump tool version targets: pylint 4.0.6, mypy 2.1.0, pyright 1.1.411, azure-pylint-guidelines-checker 0.5.9

@iscai-msft
iscai-msft force-pushed the iscai-msft-linter-perf-improvements branch 5 times, most recently from 4dbfa12 to 8610112 Compare July 21, 2026 15:21
getHttpOperation() previously created a fresh empty Map() on every call,
so multiple callers (validators, linter rules, emitters) each recomputed
full HTTP operation details from scratch. On large specs like Compute RP
with ~8 linter rules calling getHttpOperation() per operation, this
resulted in massive redundant work.

This change uses the program's stateMap as a persistent cache, keyed by
Operation. The HTTP validator ($onValidate) naturally runs first and
populates the cache via getAllHttpServices() -> listHttpOperationsIn().
All subsequent callers (linter rules, emitters) get cached results for
free, with the resolution cost attributed to the validation phase rather
than any individual linter rule.

On Compute RP (66 tsp files, 31,831 types, 74 rules), this eliminates
~375ms of redundant per-rule HTTP operation resolution in the linter.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 71734702-1f81-447e-87e6-ff9f7040268a
@iscai-msft
iscai-msft force-pushed the iscai-msft-linter-perf-improvements branch from 8610112 to eff893e Compare July 21, 2026 15:21
@iscai-msft iscai-msft closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.