Skip to content

Two plugin test suites fail on a clean main under the pinned ruff 0.16.0 #1972

Description

@kyle-sexton

What

A full bash scripts/run-plugin-tests.sh sweep on a clean main (cff36aa) fails
two suites. Neither failure involves the plugin's own logic — both are the suite's
ruff lint pass reporting findings under ruff 0.16.0, which is the version the
fleet pins (dotfiles/.chezmoidata/uv-tools.yaml:35ruff==0.16.0), so this is
not local version drift.

plugins/source-control/skills/babysit-prs/scripts/engine.test.sh — exit 1.
The unit tests all pass:

Ran 597 tests in 16.132s
OK

The exit code comes from the lint pass:

1460 |                 raise RuntimeError("association query did not return every watched PR")
TRY004 Prefer `TypeError` exception for invalid type
603 |             raise RuntimeError(f"Malformed review-thread page info for {repo}#{number}")
TRY004 Prefer `TypeError` exception for invalid type

plugins/ruff-format/hooks/ruff-format.test.sh — exit 1, on:

FAIL: E712 not reported:

The preceding cases pass, so the harness works; this one expectation does not
hold under 0.16.0.

Why this is worth a ticket rather than a quiet fix

TRY004 asks for TypeError where RuntimeError is raised. That is an exception
type change on two error paths in the babysit engine, not a formatting nit —
anything catching RuntimeError there changes behavior. It wants deciding on its
own merits: either the rule is right for these two sites and the raises change, or
the rule does not fit a "the API returned something structurally wrong" case and
the sites get a scoped noqa with the reason recorded.

The E712 expectation needs the opposite question asked: did ruff stop reporting
E712 in the shape the fixture builds, or did the fixture stop building that shape?

How this surfaced

Found while running the full sweep to verify an unrelated branch
(#1970). git diff --name-only origin/main...HEAD confirmed that branch touches
neither plugin, so these files were running main's version. Not folded into that
PR deliberately — changing another plugin's exception semantics inside a
worktree-detection change is the scope creep the repo's conventions warn about.

A third suite, plugins/claude-ops/skills/plugins/scripts/fleet-state.test.sh,
also fails on clean main with FAIL: home exclusion: $HOME with .claude is user scope, not project context. Different root cause, same sweep — worth confirming
whether CI sees it too, since a red suite on main is either a CI gap or a
local-environment dependency the suite does not declare.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions