# ruff UP038: tool crashes

Internal evidence sheet generated by fixhunt. Not an issue text. A human re-verifies, checks the duplicates
below, and writes the upstream report in their own words following the project's AI policy.

- Tool: ruff ruff 0.17.1
- Rule: UP038 (tool labels the fix: unknown)
- Oracle: tool-crash
- Judge (Nemotron 3 Ultra, advisory): program-bug, severity low. The linter crashed because rule UP038 was removed from the codebase and cannot be selected, so no fix was actually applied to the program. The observed difference is a tool execution failure unrelated to the program's semantics or the rewrite itself.
- Program: minimized from 8 to 5 lines

## Reproducer

```python
class T:
    def __class_getitem__(cls, item):
        return super().__class_getitem__(item)
f = lambda: isinstance(1, (T[int],))
f()
```

## Commands

```sh
python3 prog.py
ruff check --preview --isolated --select UP038 --fix prog.py
python3 prog.py
```

## Observed

```
lint crashed: ruff failed
  Cause: Rule `UP038` was removed and cannot be selected.
```

## Diff applied by the fix

```diff

```

## Why the rewrite is not equivalent (model draft, verify before use)

The original program defines class T with `__class_getitem__`, enabling generic subscripting like `T[int]`. The lambda checks if integer 1 is an instance of `(T[int],)`, which evaluates to True because `isinstance` accepts type objects from such expressions. After applying the fix—which does nothing—the program remains unchanged but Ruff crashes due to attempting to use a removed rule (UP038). However, since no actual code transformation occurs, there is no semantic change in behavior; the observed crash is a tool failure, not a difference in program semantics. Thus, the rewritten (identical) program does not behave differently—it either runs successfully or fails due to the tool’s internal error, not altered logic. Any perceived difference stems from tool instability, not semantics preservation failure in the code itself.

## Upstream search

Queries: "UP038 fix", "ruff UP038 removal", "lambda isinstance tuple annotation", "super class getitem call"

- no duplicate or related report found among 0 hits

