Skip to content

fix: clear lint debt, pin ruff, fix test-only breakage from deno_core bump - #14

Merged
imfing merged 1 commit into
mainfrom
fix/lint-debt
Oct 3, 2026
Merged

imfing merged 1 commit into
mainfrom
fix/lint-debt

Conversation

@imfing

@imfing imfing commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Why

The macOS CI job on main fails at make lint-python: the Makefile runs unpinned uv tool run ruff, so every new ruff release silently raises the bar — 187 violations accumulated since CI last passed. Same disease as the mutable Docker tag that broke the V8 builds: unpinned toolchains make CI rot.

Mechanism

Makefile:
    ruff_version = 0.16.10          # bump deliberately, not by accident
    uv tool run ruff@$(ruff_version) ...   # all 5 invocations

Then clear the debt so the pinned (current, strictest-yet) version passes.

Blast radius

Area Impact
Makefile ruff pinned to 0.16.10 (lint/format/fix targets)
_jsrun.pyi 90 autofixes — redundant ... after docstrings removed, F → _F TypeVar; docstrings untouched (mkdocstrings unaffected)
Test files autofix formatting/imports; pytest.raises(Exception) → RuntimeError (B017); nested with combined; one annotated noqa: BLE001 (thread-error collection is intentionally broad)
__main__.py one annotated noqa: BLE001 — CLI last-resort handler stays broad by design
src/runtime/error.rs test-only fix: JsStackFrame.is_wasm / JsError.stack_is_custom fields added by deno_core 0.412 — only compiled under clippy --tests, so #10 couldn't see it
src/runtime/runner.rs #[allow(clippy::result_large_err)] on a function-local cold-path Result (boxing not worth the indirection); needed because lint-rust uses -D warnings
Runtime behavior Unchanged — no production logic touched

Validation

make all (format, build, lint, test) passes end-to-end locally for the first time in a while: ruff clean, cargo fmt/clippy --tests -D warnings clean, 291 tests pass. This unblocks the macOS job — the rest of CI run 37118732820 was already green (Linux wheels in ~2.5 min on free runners, all 10 wheel-test matrix jobs passing).

…eno_core bump

- Pin ruff to 0.16.10 in the Makefile (uv tool run ruff@...) so lint
  results stop drifting as new ruff releases add rules; bump the pin
  deliberately. Unpinned 'latest ruff' is what broke CI on main.
- Apply autofixes for 182 violations (dominated by stub files:
  redundant '...' after docstrings in _jsrun.pyi).
- Manual fixes: rename stub TypeVar F -> _F (PYI001), assert the
  specific RuntimeError for bad-module eval (B017), combine nested
  with statements (SIM117), annotate the two deliberate catch-alls
  with noqa BLE001 (CLI last-resort handler; thread-error collection
  in concurrency test).
- Fix test-only Rust compile breakage from the deno_core 0.412 bump
  (JsStackFrame.is_wasm, JsError.stack_is_custom - only built under
  clippy --tests), and allow clippy::result_large_err on the
  function-local SyncCallError result (cold path; boxing not worth it).

make all (format, build, lint, test) now passes end to end: 291 tests.
@imfing
imfing merged commit 3325a01 into main Oct 3, 2026
@imfing
imfing deleted the fix/lint-debt branch October 3, 2026 11:22
imfing added a commit that referenced this pull request Oct 3, 2026
…ath (#15)

CI's dtolnay/rust-toolchain@stable floats to the newest stable, so its
clippy -D warnings gate drifts ahead of local toolchains - rustc 1.99
newly deprecates the std::f64 module constants, failing lint-rust on a
'use std::f64' in config.rs tests (local 1.97 was silent). Remove the
import so f64::INFINITY resolves to the associated constant.

Pin 1.99.0 in rust-toolchain.toml: rustup applies it automatically to
local builds, CI, and the V8 archive builder containers, making lint
results reproducible everywhere. Bump deliberately; same policy as the
ruff pin (#14).
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.

1 participant