Add lint lessons for Metrics/MethodLength and Minitest/TestMethodName #1440

Open
opened 2026-10-27 18:17:49 +00:00 by jared · 1 comment
Owner

Problem

Jared ruled on 2026-10-27 that every offense the AI acts on gets a lint lesson; only autocorrectable Layout and Style cops are exempt. Two cops that the gate enforces and that agents acted on in fix-lints today have no lesson file: Metrics/MethodLength and Minitest/TestMethodName. Agents got only the _no-lesson-yet default, which tells them to capture this ticket.

Observed

fix-lints on os-me, 2026-10-27, batch phase. Agents fixed 33 Metrics/MethodLength offenses and 4 Minitest/TestMethodName offenses with no lesson. Both agents reported the missing lesson.

Reproduce

ls plugins/os-sdlc/lint-lessons/ | grep -E 'metrics-method-length|minitest-test-method-name'

prints nothing.

Approach

Write one lesson file for each cop, with the same fields and shape as metrics-abc-size.yml, after a smell-analysis of one real offense from today's run for each cop.

Required work:

  1. Add the MethodLength lesson — check: present Metrics/MethodLength in plugins/os-sdlc/lint-lessons/metrics-method-length.yml
  2. Add the TestMethodName lesson — check: present Minitest/TestMethodName in plugins/os-sdlc/lint-lessons/minitest-test-method-name.yml

Rejected: rely on the default lesson — Jared ruled that the default is a stopgap that asks for a lesson.

Acceptance criteria

  1. Given a Metrics/MethodLength offense, when the relay renders lessons, then it shows the MethodLength lesson and not the default.
  2. Given a Minitest/TestMethodName offense, when the relay renders lessons, then it shows the TestMethodName lesson and not the default.

Owner sketch

class OsSdlc::Lesson::Catalog
  def lesson(key)
end

Origin

  • Trigger: fix-lints on os-me, lint-cops track, 2026-10-27; the _no-lesson-yet default asked for this ticket.
  • Improvised this session: none
  • Chain: agents act on offenses with no guidance ← no lesson file for the cop ← DESIGN (lesson coverage gap)
  • Root candidate: none found; searched lesson, MethodLength, TestMethodName, lint-lessons, _no-lesson-yet, seed lint-lesson
  • Where: plugins/os-sdlc/lint-lessons/
  • Session: 0b4d7950-df1c-4eba-a561-ccc19b386a9a
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/0b4d7950-df1c-4eba-a561-ccc19b386a9a.jsonl

VERDICT: CREATE

## Problem Jared ruled on 2026-10-27 that every offense the AI acts on gets a lint lesson; only autocorrectable Layout and Style cops are exempt. Two cops that the gate enforces and that agents acted on in fix-lints today have no lesson file: `Metrics/MethodLength` and `Minitest/TestMethodName`. Agents got only the `_no-lesson-yet` default, which tells them to capture this ticket. ## Observed fix-lints on os-me, 2026-10-27, batch phase. Agents fixed 33 `Metrics/MethodLength` offenses and 4 `Minitest/TestMethodName` offenses with no lesson. Both agents reported the missing lesson. ## Reproduce ``` ls plugins/os-sdlc/lint-lessons/ | grep -E 'metrics-method-length|minitest-test-method-name' ``` prints nothing. ## Approach Write one lesson file for each cop, with the same fields and shape as `metrics-abc-size.yml`, after a smell-analysis of one real offense from today's run for each cop. Required work: 1. Add the MethodLength lesson — check: present `Metrics/MethodLength` in `plugins/os-sdlc/lint-lessons/metrics-method-length.yml` 2. Add the TestMethodName lesson — check: present `Minitest/TestMethodName` in `plugins/os-sdlc/lint-lessons/minitest-test-method-name.yml` Rejected: rely on the default lesson — Jared ruled that the default is a stopgap that asks for a lesson. ## Acceptance criteria 1. Given a `Metrics/MethodLength` offense, when the relay renders lessons, then it shows the MethodLength lesson and not the default. 2. Given a `Minitest/TestMethodName` offense, when the relay renders lessons, then it shows the TestMethodName lesson and not the default. ## Owner sketch ```ruby class OsSdlc::Lesson::Catalog def lesson(key) end ``` ## Origin - Trigger: fix-lints on os-me, lint-cops track, 2026-10-27; the `_no-lesson-yet` default asked for this ticket. - Improvised this session: none - Chain: agents act on offenses with no guidance ← no lesson file for the cop ← DESIGN (lesson coverage gap) - Root candidate: none found; searched lesson, MethodLength, TestMethodName, lint-lessons, _no-lesson-yet, seed lint-lesson - Where: plugins/os-sdlc/lint-lessons/ - Session: 0b4d7950-df1c-4eba-a561-ccc19b386a9a - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/0b4d7950-df1c-4eba-a561-ccc19b386a9a.jsonl VERDICT: CREATE
Author
Owner

Occurrence: Lint/UnusedMethodArgument and Minitest/NoAssertions also have no lesson
Seen: fix-lints on os-backlog, 2026-10-27, batch group 1 (5 UnusedMethodArgument offenses, 1 NoAssertions offense). The _no-lesson-yet default named Metrics/MethodLength, Lint/UnusedMethodArgument, Minitest/NoAssertions.
Run: Session 0b4d7950-df1c-4eba-a561-ccc19b386a9a
Adds: Two more acted-on cops for this ticket's scope; same lesson shape. Each fix-lints target will likely add more; consider a test that every cop the batch and iterative phases list has a lesson.

Occurrence: Lint/UnusedMethodArgument and Minitest/NoAssertions also have no lesson Seen: fix-lints on os-backlog, 2026-10-27, batch group 1 (5 UnusedMethodArgument offenses, 1 NoAssertions offense). The _no-lesson-yet default named Metrics/MethodLength, Lint/UnusedMethodArgument, Minitest/NoAssertions. Run: Session 0b4d7950-df1c-4eba-a561-ccc19b386a9a Adds: Two more acted-on cops for this ticket's scope; same lesson shape. Each fix-lints target will likely add more; consider a test that every cop the batch and iterative phases list has a lesson.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1440
No description provided.