Skip to content

ci: ruff check and mypy do not cover the compatibility consumer fixtures #393

Description

@codeforester

Problem

The authoritative style gate scopes ruff to four paths and excludes compatibility/
(tests/full_validate.sh:49-51):

ruff format --check lib/python/base_cli scripts examples tests
ruff check       lib/python/base_cli scripts examples tests

compatibility/consumers/ holds the three consumer fixtures — atlas_click, beacon_typer,
cinder_automation — that the project uses as its compatibility and adoption evidence, surfaced
through docs/compatibility-dashboard.md and scripts/validate_consumers.py. They are lint-exempt,
and there are real violations sitting in them today.

The typing gate has the same shape (tests/full_validate.sh:43-45): mypy --strict covers
lib/python/base_cli and the single file examples/typed_consumer.py. The example applications
under examples/*/src/** and all of compatibility/ are unchecked, even though they are the code
adopters copy.

This matters more than ordinary lint debt: these fixtures exist specifically to demonstrate what
good consumer code looks like.

Verified evidence

Reviewed 2026-09-30 at a58ec109349fa3f3d03eae5b0de078b39ea361a2.

$ ruff check .
Found 6 errors.
[*] 6 fixable with the `--fix` option.

I001 Import block is un-sorted or un-formatted
 --> compatibility/consumers/atlas_click/src/atlas_click/cli.py:3:1

All six are I001 in compatibility/consumers/**. ruff format --check compatibility passes
(13 files already formatted), so this is purely the un-run ruff check.

Proposal

  1. Add compatibility to both ruff invocations in tests/full_validate.sh and fix the six I001
    violations.
  2. Extend the typing gate to the example and compatibility consumer packages. If full --strict is
    not appropriate for them, run non-strict mypy and record why in the script, so the scope is a
    decision rather than an omission.
  3. Consider inverting the default: lint the repository (ruff check .) and list exclusions
    explicitly, so a new top-level directory is covered by default instead of silently exempt.

Acceptance criteria

  • ruff check and ruff format --check run over compatibility/ in CI and pass.
  • The gate's scope is either the whole repository with explicit exclusions, or a list with a comment
    explaining each omission.
  • Example and compatibility consumer packages are type-checked at a documented strictness.
  • A new top-level Python directory is covered by the gates without editing the path list, or the
    script fails loudly if it is not.

Non-goals

  • Do not change the ruff rule selection or line-length configuration in pyproject.toml.
  • Do not reformat lib/python/base_cli.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ciContinuous integration, tests, automation, or release workflows

Type

No type

Projects

  • Status
    In Review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions