## Summary
This PR splits `mismatched-type-name` into eight independently
configurable warnings for `NewType`, functional enums, `TypeVar`,
`ParamSpec`, `TypeVarTuple`, `namedtuple`/`NamedTuple`, `TypedDict`, and
`TypeAliasType`.
~~This PR is actually quite a bit less breaking for users than other
rule splits we've done over the last few days. Because
`mismatched-type-name` is no longer the canonical name for _any_ rule on
this branch, we're able to make it a deprecated alias for _all_ the new
rules, meaning that it will continue to work on the CLI, in ty
configuration files, and ty suppression comments (we'll just emit a
warning diagnostic telling users to upgrade their configuration
file/suppression comment).~~
~~A more specific rule takes precedence over the deprecated name if both
are given within the same configuration table. On the command line, the
last matching flag wins (e.g. `--error=mismatched-enum-name
--ignore=mismatched-type-name` will suppress diagnostics for mismatched
enum names).~~
(After review from @MichaReiser, I backed out these changes. It's now a
somewhat breaking change, because the rule is now marked as "removed"
rather than "deprecated".)
As well as splitting the rule into eight separate rules, it also cleans
up our error recovery for several of these type factories. For example,
in the following snippet, we fail to recognize `T` as a `TypeVar` due to
bad error recovery from the non-literal name. But we don't really need a
nonliteral name in this case to determine that it's a validly
constructed TypeVar. It's probably a mistake, but there's no _soundness_
issue here:
```py
from typing import TypeVar
def f(x: str):
# main emits an error: `invalid-typevar`
# this PR emits a warning: `mismatched-typevar-name`
T = TypeVar(x)
def g(x: T) -> T:
return x
reveal_type(g(42)) # main: Todo. This PR: `Literal[42]`.
```
## Motivation
The main motivation here is that having a namedtuple or enum with the
"wrong name", for example, just seems much less "obviously wrong" than
having a typevar or paramspec with the "wrong name". The [ecosystem
report](https://github.com/astral-sh/ruff/pull/29957#issuecomment-6603964612)
is evidence of this. namedtuples and enums define runtime classes that
can be used in runtime contexts and instantiated; these constructs
aren't _just_ for type checkers.
TypeVars/ParamSpecs/TypeVarTuples/NewTypes/TypedDicts are all _only_ for
type checkers and there's no plausible reason why you'd want to give the
type a different name to the variable it's assigned to.
`mismatched-namedtuple-name` and `mismatched-enum-name` are therefore
now disabled by default, matching the default severity we already
settled on for `mistmatched-sentinel-name` in
https://github.com/astral-sh/ruff/pull/27206. `mismatched-typevar-name`,
`mismatched-paramspec-name`, `mismatched-typevartuple-name`,
`mismatched-enum-name`, `mismatched-namedtuple-name` and
`mismatched-newtype-name` all remain enabled by default with `warning`
severity.
Use `--sync-script-dependencies` in the ecosystem workflow to preinstall
PEP 723 script dependencies before timing either revision. The analyzer
passes `project-manager.script = "uv"` to both ty binaries, so the
workflow can drop `TY_UV: scripts`.
Update `uv.lock` to the analyzer revision that introduced the flag.
[astral-sh/ecosystem-analyzer#260](https://github.com/astral-sh/ecosystem-analyzer/pull/260)
Enable uv integration for PEP 723 scripts in Ruff's root
`pyproject.toml` with `project-manager.script = "uv"`. The script
dogfood step picks up that setting when it runs the ty binary built from
the checkout, so it can drop `TY_UV=scripts`.
After each stable Ruff release, the downstream notifier starts
`ruff-vscode`’s `release-prepare.yml` with the released version and
`auto-promote=true`. The extension merges its version bump after CI and
waits for approval before marketplace publication.
Merge
[ruff-vscode#1256](https://github.com/astral-sh/ruff-vscode/pull/1256)
first.
<details>
<summary>Automated notes</summary>
Use Node.js 26.12.1 for the `setup-node` jobs affected by the eMudhra
intermediate CA compromise. [Node.js security
release](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases)
Use `^26.12.1` where the workflow previously selected a floating major.
This keeps selection within Node.js 26 and excludes vulnerable cached
releases.
</details>
## Summary
Follow [uv’s release
workflow](https://github.com/astral-sh/uv/pull/19477) and [ty’s release
workflow](https://github.com/astral-sh/ty/pull/5014) by deriving the
GitHub release tag from the checked-out version. Ruff reads the
Cargo-style version from `crates/ruff/Cargo.toml` so prerelease tags
retain their existing format.
## Summary
The workspace now uses Rust 1.100, but the Hawk CI job still runs Hawk
0.1.17 on Rust 1.99. We now use Hawk 0.1.18, which requires Rust 1.100,
and update the workspace cache action to release 2026.11.16.1.
Co-authored-by: Charlie Marsh <charliemarsh@openai.com>
## Summary
Pin the shared actions and reusable workflow to commit
`67dc9ee1ddc113eccd8116e7b949fb6cdcd89889` from [release
2026.11.16.0](https://github.com/astral-sh/github-actions/releases/tag/2026.11.16.0).
Add the release version beside each YAML pin. The token-service policy
matches the new security-review workflow SHA.
## Notes to reviewers
Parsed the changed YAML and JSON and verified that each referenced
action or reusable workflow exists at the pinned commit. The
repository’s changed-file prek hooks passed for all 15 files.
## Summary
The **Test Plan** heading prompts contributors to recap tests that
already run in CI. Replace it with an optional **Notes to reviewers**
section for additional context, such as how the change fits into a
larger effort. If contributors share manual results beyond what CI
covers, ask them to explain what they found and why the checks couldn't
be automated.
The ty 0.0.102 release mirror failed when R2 rejected
`CompleteMultipartUpload` with `InvalidPart` for a 17 MiB archive in the
[initial mirror
job](https://github.com/astral-sh/ty/actions/runs/43313189391/job/131528867907).
Its
[retry](https://github.com/astral-sh/ty/actions/runs/43313189391/job/131530133434)
uploaded the missing archive and reported `ObjectLockedByBucketPolicy`
for 17 previously published multipart artifacts. Ruff uses the same AWS
CLI 8 MiB default, which selects this multipart path even though
Cloudflare recommends single uploads below roughly 100 MB.
Raise `multipart_threshold` to 100 MiB so current Ruff artifacts avoid
`CompleteMultipartUpload`. `--no-overwrite` remains a list-based check
rather than an atomic write condition, so the change does not provide
general write idempotency. Artifacts larger than the threshold would
still use multipart uploads and require explicit reconciliation for
retries against immutable keys; Ruff does not currently produce an
artifact near that threshold.
## Summary
We see cases where the codspeed result differs based on the order in
which the benchmarks run, because they all run in the same process (and
use the same allocator). Newer codspeed versions run each benchmark in a
separate process, protecting them from "warm allocator" effects.
This PR updates `cargo-codspeed` to 6.0.0 and the CodSpeed action to
5.6.3. Each simulated Criterion or Divan benchmark now starts in a fresh
process, so allocations in one fixture can no longer change the
instruction count of the next.
## Test Plan
Verified that the linter fixture and all four module-resolution inputs
each ran in a separate process, and that the updated dependencies meet
the seven-day cooldown.
This PR contains the following updates:
| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [python](https://redirect.github.com/actions/python-versions) |
uses-with | minor | `3.14` → `3.15` | `3.15.2` (+1) |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.
---
### Release Notes
<details>
<summary>actions/python-versions (python)</summary>
###
[`v3.15.0`](https://redirect.github.com/actions/python-versions/releases/tag/3.15.0-38076878863):
3.15.0
[Compare
Source](https://redirect.github.com/actions/python-versions/compare/3.14.10-40336797752...3.15.0-38076878863)
Python 3.15.0
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- "before 4am on Wednesday"
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/ruff).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://redirect.github.com/astral-sh/uv) | patch |
`0.13.6` → `0.13.7` |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.
---
### Release Notes
<details>
<summary>astral-sh/uv</summary>
###
[`v0.13.7`](https://redirect.github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0137)
[Compare
Source](https://redirect.github.com/astral-sh/uv/compare/0.13.6...0.13.7)
Released on 2026-11-03.
##### Preview features
- Add `--output-version` to `uv workspace metadata` for requesting a
specific schema version
([#​22958](https://redirect.github.com/astral-sh/uv/pull/22958))
- Report aliased OSV records as a single vulnerability in `uv audit`
([#​22990](https://redirect.github.com/astral-sh/uv/pull/22990))
##### Bug fixes
- Treat workspace member paths added by `uv init` or `uv add` as
literals instead of glob patterns
([#​23008](https://redirect.github.com/astral-sh/uv/pull/23008))
- Prevent uv's Windows trampolines from closing handles they did not
inherit
([#​22977](https://redirect.github.com/astral-sh/uv/pull/22977))
- Allow `uvx` to run tools with CPython builds whose versions contain
local identifiers
([#​23013](https://redirect.github.com/astral-sh/uv/pull/23013))
- Generate valid module names when `uv init` creates packaged projects
whose names start with a digit
([#​23022](https://redirect.github.com/astral-sh/uv/pull/23022))
- Preserve comments around existing inline dependency groups when `uv
add` updates a group
([#​23017](https://redirect.github.com/astral-sh/uv/pull/23017))
- Allow `uv remove` with an empty inline `tool.uv.sources` table
([#​23012](https://redirect.github.com/astral-sh/uv/pull/23012))
##### Documentation
- Correct the `cache-keys` inline table example
([#​22984](https://redirect.github.com/astral-sh/uv/pull/22984))
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- "before 4am on Wednesday"
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/ruff).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
A mirror upload can fail after some files for a release have already
reached R2. Retrying then attempts to overwrite those immutable objects
and can fail again.
This change makes the versioned mirror upload skip existing keys and
upload only the missing files. It assumes a retry uses the same release
artifacts. An existing file is kept even if its local checksum differs.
Tested against a local S3 server with a partially uploaded release. The
first run preserved the existing file and uploaded the missing files. A
second run made zero writes.
Follow-up to #29972. On pull requests opened from a branch in this
repository, the report bot currently leaves its last fuzz failure
comment in place even after a later run finds no new ty panics or
timeouts. With this PR, a clean run now updates that comment with the
result. If the pull request has no fuzz report, a clean run stays
silent.
The CI workflow calls the reusable report publisher from `main`. Until
the publisher change in #30063 lands on `main`, GitHub Actions will
reject the caller because it passes the new `update-existing-only`
input.
When a ty fuzz run passes after an earlier failure on the same PR,
#30047 will update the failure comment to show that the latest run
passed. A PR with no earlier report should stay quiet. CI on #30047
calls the reusable report publisher from `main`, so the new input must
land on `main` before that PR can pass it.
Add an optional `update-existing-only` input to the publisher. When
enabled, the publisher updates the bot’s existing comment for that
report. If there is no stored comment ID or the comment has been
deleted, it skips publication. Callers that omit the input can still
create a comment.
Minimizing a new `ty` panic or timeout can keep the pull request fuzz
check running for minutes after it finds the failing input. Annotate
each failing seed when it is found, then fail the check after scanning
the full corpus. A separate job minimizes the saved inputs with the same
pull request and baseline binaries.
On same-repository pull requests, the report bot posts “Panic or timeout
detected. Minimization in progress…” when the scan finishes. It updates
that comment with the reproducers. Fork pull requests can download the
report from the workflow run.
[Sample report from
#29553](https://github.com/astral-sh/ruff/pull/29972#issuecomment-6615232776).
---------
Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
Move walltime benchmarks from six sharded Graviton jobs to one newly
enabled AMD Ryzen 9950X macro runner. Build the `ty_walltime`,
`ty_script`, and `ty_ide` binaries on x86_64 Ubuntu 24.04 and run the
complete artifact without filters, preserving benchmark coverage while
avoiding repeated setup.
Keep the existing triggers, permissions, artifact handoff, CodSpeed
action configuration, and walltime environment settings unchanged. A
previous five-run trial on this runner class reduced aggregate benchmark
runner time by 5.35× and visible benchmark-stage time by 1.40×.
---------
Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
Require crates.io releases in Ruff’s tracked `Cargo.lock` files to be at
least seven days old before a pull request can merge. The shared
`cargo-cooldowns` action covers both the workspace and fuzz lockfiles.
Co-authored-by: Zanie Blue <contact@zanie.dev>
## Summary
Caching Ruff's compiled crates and Hawk's graphs cut the `cargo hawk` CI
job by 39% on the ty subscript change (#29824), including restore. This
upgrades Hawk to 0.1.17 and caches both under `target/hawk`. PRs share
entries saved by `main`, at about 1 GB compressed per entry (112 MB more
than caching dependencies alone).
| What we timed | Before | After | Added cache (compressed) | Runs |
| --- | ---: | ---: | ---: | --- |
| Full job on 0.1.16, adding crates and graphs to the dependency cache |
6m 36s | 4m 30s, 3m 37s | 111.7 MB (885.7 → 997.4 MB) |
[Baseline](https://github.com/astral-sh/ruff/actions/runs/40990262689/job/123850805721)
· [Warm
1](https://github.com/astral-sh/ruff/actions/runs/41014762115/job/123928917090)
· [Warm
2](https://github.com/astral-sh/ruff/actions/runs/41014762115/job/123932651882)
|
| `cargo hawk check` on 0.1.17, adding `hawk-fragments/` to warm crates
| 7m 19s | 3m 05s | 89 MB | [Paired
runs](https://github.com/astral-sh/ruff/actions/runs/41068692068) |
The warm runs restored the PR's parent build. Two runners tried the
fragment comparison in opposite orders. The graphs saved 4m 14s (58%)
per check, or 4m 07s including local extraction and input validation.
Ruff ecosystem comments can omit details from large linter diffs.
Generate HTML reports alongside the Markdown results for linter and
formatter runs, with project filters, search, and paginated browsing.
Linter reports also support filtering by rule; formatter reports include
hunk context.
Link the available reports from the PR comment through the shared
publisher, retaining the downloadable artifact.
Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>