Skip to content

feat(lint): make canonical-check self-enforcing — add rules + fix the Make target #10577

Closed

Description

@mrveiss

Make canonical-check self-enforcing — add rules + fix the Make target

Part of umbrella #10569 · priority: high · the "self-enforcing" task

Problem

The runner tools/lint/canonical_check.py enforces only one rule
(py-print-smoke). The other canonical disciplines in this umbrella are not
detectable, so drift returns silently. Also, make canonical-audit calls
python (absent here — only python3), so the Make target fails outright.

What to do

  • Fix the Make target(s) to invoke python3 (or a resolved interpreter), so
    make canonical-audit runs.
  • Add new rules to canonical_check.py (and canonical_check_infra.py where
    relevant), each with fixtures under repo_tests/lint/canonical/fixtures/:
  • Wire the new rules into the pre-commit --files path and the weekly audit
    cron so regressions are blocked/surfaced.
  • The runner code must itself follow canonical style (dogfood).

Acceptance criteria

  • make canonical-audit runs without a python-not-found error.
  • New rules detect the seeded fixtures (positive) and pass clean fixtures
    (negative).
  • Rules run in pre-commit (--files) and in the audit (--all).
  • Severities set deliberately (BLOCK vs warn); # noqa escape honored.
  • Docs/skill note updated to list the new rules.

Activity

  1. github-actions commented on Jun 28, 2026

    @github-actions
    Contributor

    PR #10618 (merged to Dev_new_gui) references this issue with a close keyword.

    feat(lint): make canonical-check self-enforcing — add rules + fix Make target (#10577)

    If this issue is fully resolved, close it manually. If work remains, no action is needed.

  2. mrveiss commented on Jun 28, 2026

    @mrveiss
    OwnerAuthor

    Resolved in PR #10618. make canonical-audit now invokes python3 (Makefile + .pre-commit-config). Five new rules added (auto-discovered via the existing registry): py-banned-suffix-filename (BLOCK — 0 violations repo-wide after #10575, safe), py-adhoc-db-engine / py-hardcoded-url / py-sync-requests-in-async / py-duplicate-concept (warn — residual repo-wide counts documented, per spec, to avoid redding CI on debt outside the listed files). 15 fixtures + 28 passing tests; wired into pre-commit --files and the weekly --all audit; CANONICAL_RULES.md updated; runner dogfoods its own rules. Verified: canonical_check.py --all exits 0 (0 BLOCK violations). Closing.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions