Skip to content

Lint and formatting growth warns and never blocks - #3173

Merged
trissim merged 1 commit into
mainfrom
ratchet/lint-warns
Oct 25, 2026
Merged

trissim merged 1 commit into
mainfrom
ratchet/lint-warns

Conversation

@trissim

@trissim trissim commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Lint and formatting growth now warns and never blocks a merge. Tristan: "it should be a warn not a block". Slop is a restated fact. "This exception name lacks an Error suffix" and "Black would reflow this" restate nothing, yet tonight they blocked #3168, the fix reviving the live bus (grew LintFindings +3, grew Unformatted +1).

Change

  • Advisory(Measure) (tools/debt_ratchet.py) is a capability parent. blocks() answers no, and grew() writes a GitHub ::warning file=PATH:: line instead of grew KEY +N. Unformatted and LintFindings inherit it, with no roster of names anywhere: the MRO decides.
  • Measure.grew() is the default growth line. main asks each measure for its own line, so ::warning:: lands on stderr. .github/run-step.sh:6 merges stderr into the step log, where Actions reads workflow commands. When advisory growth is the only growth, the step exits 0 and gets no ::error tail.
  • Both measures are still measured per file, still in the JSON report, and still cached. Nothing is deleted.
  • Rule text (commander/rules/tests-and-commands.md): "Lint, every commit … fix only the findings" becomes "Lint warns, never blocks … read the warnings on lines you changed; fix one when it names a real defect". The bans on whole-file ruff format and on renames that only quiet a rule stay.

Decided

  • Every ruff code warns, F821 and F401 included. A real undefined name dies in the touched tests, and dead imports go to the slop sweep (TIME-6) by owner. No gating lint measure.
  • TypeErrors keeps gating. A mypy error is code disagreeing with its own declared type, a fact stated twice where the copies disagree, so it is a restated fact.

Evidence

  • New test_advisory_growth_is_measured_and_warned_never_failed[Unformatted|LintFindings]: growth is in the delta, the comparison exits 0, and the line is a ::warning file= for that file. It fails against main's ratchet (see below).
  • test_per_file_increase_cannot_be_offset_or_moved keeps its gating rows. test_both_revisions_are_checked_under_the_head_configuration still passes: the advisory measures are still measured.
  • No separate ruff or black step exists in .github/workflows, so the ratchet was the only lint gate.
  • ruff: the one finding my change added (E501 on the warning line) is fixed. The other 30 in those files are main's.

Hold: lands after install #15, with #3166, #3170 and #3172.

🤖 Generated with Claude Code

Slop is a restated fact; a lint convention or Black's layout restates
none, yet both blocked merges. Advisory is a measure capability whose
blocks() answers no and whose grew() writes a GitHub ::warning:: on the
file. Unformatted and LintFindings inherit it and stay measured. The
commander lint rule now says to read the warnings, not to clear them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 01:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit a5006c0 into main Oct 25, 2026
8 checks passed
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.

2 participants