Audit every Sdlc cop against the zero-false-positive standard #1325

Closed
opened 2026-10-25 16:44:44 +00:00 by jared · 3 comments
Owner

Problem

Jared's standard for a cop: "We want the solution to always be correct so we know the correction is warranted and we can reduce flags to zero. Otherwise we would always have unresolved violations. We need to know exactly what shape triggers that fix and that the fix is always correct for that shape, as well as exactly when the shape could trigger a false positive and why it is false so we can carve those out and avoid flagging them."
No one has checked the existing Sdlc/* cops against this standard. Example: the CollaboratorConstructionInInitialize lesson tells the agent to report composition-root false positives to the human. That is a known false positive that the cop does not carve out.

Reproduce

n/a: audit.

Approach

For every Sdlc/* cop, record four facts: the shape, the fix, whether the fix is always correct, and the known false positives with the reason each is false.
Carve-outs live in the cop matcher, by shape. No config Exclude lists. No test-path exclusions.
Output: one ticket per cop that fails the standard. Use /os-backlog:capture for each ticket.
The cop list: every RuboCop cop class defined under plugins/os-sdlc/lib/os_sdlc/cops/*.rb whose cop name starts with Sdlc/ (on 2026-10-25, about 45 cops in Sdlc/Structural, Sdlc/Dry, Sdlc/Minitest, Sdlc/Sequel). Do not count the base classes RecordingCop, ClassSiteCop, and CopSource. Recording cops (for example Sdlc/Structural/RescueSite) prescribe no fix; record that, and judge only their record.
The 2 cops that #1321 and #1322 add already have this record in their smell analyses (docs/plans/class-length-family/). Link those records; do not repeat them.
For each cop, read its source, its tests, and its lesson in plugins/os-sdlc/lint-lessons/ if one exists. A lesson that tells the agent to report a false positive to a human, or to file a false-positive ticket, names a known false positive.

Required work:

  1. Write the audit record file — check: present ## Records in docs/plans/class-length-family/sdlc-cop-audit.md
  2. File one ticket per failing cop with /os-backlog:capture, and put its number in the cop's record.

Acceptance criteria

  1. Given the list of Sdlc/* cops in plugins/os-sdlc, when the audit ends, then each cop has a record with shape, fix, fix-always-correct, and known false positives.
  2. Given a cop that fails the standard, when the audit ends, then one ticket exists for that cop.
  3. Given a cop that meets the standard, when the audit ends, then the record says so and no ticket exists.

Owner sketch

Investigation. No Ruby object changes. File written: docs/plans/class-length-family/sdlc-cop-audit.md, with a _Last updated:_ line and a ## Records table, one row per cop: cop name, source file, shape, fix, fix always correct (yes / no and why), known false positives with the reason each is false, verdict (meets / fails), ticket number.
Tools: read the cop sources; sample a cop's hits with rubocop --only <cop> --config plugins/os-sdlc/.rubocop.yml plugins (plugins/os-sdlc/bin/lint-sweep runs only the cops in .rubocop-sweep.yml); /os-backlog:capture for each ticket.

Origin

  • Trigger: Design of the ClassLength family in this session.
  • Improvised this session: none
  • Chain: Unknown false-positive rate ← no audit against the standard ← IMPROVISATION (lessons ask the agent to report false positives to the human)
  • Root candidate: none found; searched false positive, zero false, audit, cop, Sdlc/, carve, ClassLength, lint-lessons, #1091, #917, #1102, #1044, #1213
    VERDICT: CREATE
  • Where: plugins/os-sdlc/lib/os_sdlc/cops
  • Session: f4187368-5e7e-459d-80c6-ddf7620389cd
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/f4187368-5e7e-459d-80c6-ddf7620389cd.jsonl
## Problem Jared's standard for a cop: "We want the solution to always be correct so we know the correction is warranted and we can reduce flags to zero. Otherwise we would always have unresolved violations. We need to know exactly what shape triggers that fix and that the fix is always correct for that shape, as well as exactly when the shape could trigger a false positive and why it is false so we can carve those out and avoid flagging them." No one has checked the existing Sdlc/* cops against this standard. Example: the CollaboratorConstructionInInitialize lesson tells the agent to report composition-root false positives to the human. That is a known false positive that the cop does not carve out. ## Reproduce n/a: audit. ## Approach For every Sdlc/* cop, record four facts: the shape, the fix, whether the fix is always correct, and the known false positives with the reason each is false. Carve-outs live in the cop matcher, by shape. No config Exclude lists. No test-path exclusions. Output: one ticket per cop that fails the standard. Use /os-backlog:capture for each ticket. The cop list: every RuboCop cop class defined under plugins/os-sdlc/lib/os_sdlc/cops/*.rb whose cop name starts with `Sdlc/` (on 2026-10-25, about 45 cops in Sdlc/Structural, Sdlc/Dry, Sdlc/Minitest, Sdlc/Sequel). Do not count the base classes RecordingCop, ClassSiteCop, and CopSource. Recording cops (for example Sdlc/Structural/RescueSite) prescribe no fix; record that, and judge only their record. The 2 cops that #1321 and #1322 add already have this record in their smell analyses (docs/plans/class-length-family/). Link those records; do not repeat them. For each cop, read its source, its tests, and its lesson in plugins/os-sdlc/lint-lessons/ if one exists. A lesson that tells the agent to report a false positive to a human, or to file a false-positive ticket, names a known false positive. Required work: 1. Write the audit record file — check: present `## Records` in `docs/plans/class-length-family/sdlc-cop-audit.md` 2. File one ticket per failing cop with /os-backlog:capture, and put its number in the cop's record. ## Acceptance criteria 1. Given the list of Sdlc/* cops in plugins/os-sdlc, when the audit ends, then each cop has a record with shape, fix, fix-always-correct, and known false positives. 2. Given a cop that fails the standard, when the audit ends, then one ticket exists for that cop. 3. Given a cop that meets the standard, when the audit ends, then the record says so and no ticket exists. ## Owner sketch Investigation. No Ruby object changes. File written: docs/plans/class-length-family/sdlc-cop-audit.md, with a `_Last updated:_` line and a `## Records` table, one row per cop: cop name, source file, shape, fix, fix always correct (yes / no and why), known false positives with the reason each is false, verdict (meets / fails), ticket number. Tools: read the cop sources; sample a cop's hits with `rubocop --only <cop> --config plugins/os-sdlc/.rubocop.yml plugins` (plugins/os-sdlc/bin/lint-sweep runs only the cops in .rubocop-sweep.yml); /os-backlog:capture for each ticket. ## Origin - Trigger: Design of the ClassLength family in this session. - Improvised this session: none - Chain: Unknown false-positive rate ← no audit against the standard ← IMPROVISATION (lessons ask the agent to report false positives to the human) - Root candidate: none found; searched false positive, zero false, audit, cop, Sdlc/, carve, ClassLength, lint-lessons, #1091, #917, #1102, #1044, #1213 VERDICT: CREATE - Where: plugins/os-sdlc/lib/os_sdlc/cops - Session: f4187368-5e7e-459d-80c6-ddf7620389cd - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/f4187368-5e7e-459d-80c6-ddf7620389cd.jsonl
Author
Owner

Input for this audit (found 2026-10-25 during #1321): Sdlc/Structural/UnusedPrivateMethod reads one file only, so it flags a private method on a parent class that subclasses call. New hit: Backlog::CLI::Commands#tracker_command (plugins/os-backlog/lib/backlog/cli/commands.rb, called from IssueCommands and ProjectCommands). Same mechanism already on main in that file: issue_service, cli_options, require_issue_number!. Counts as a false positive under the zero-false-positive standard.

Input for this audit (found 2026-10-25 during #1321): Sdlc/Structural/UnusedPrivateMethod reads one file only, so it flags a private method on a parent class that subclasses call. New hit: Backlog::CLI::Commands#tracker_command (plugins/os-backlog/lib/backlog/cli/commands.rb, called from IssueCommands and ProjectCommands). Same mechanism already on main in that file: issue_service, cli_options, require_issue_number!. Counts as a false positive under the zero-false-positive standard.
Author
Owner

Work started on branch ticket-1325 (AFK run approved 2026-10-25).

Work started on branch ticket-1325 (AFK run approved 2026-10-25).
Author
Owner

Resolution

Done: Audited all 46 Sdlc cops against the zero-false-positive standard in docs/plans/class-length-family/sdlc-cop-audit.md (shape, fix, fix-always-correct, false positives, verdict, ticket). 2 meet, 44 fail; each failing cop has a ticket or an occurrence.

Evidence: Commit 7d251603 on ticket-1325. New tickets #1345-#1385 (41, filed-by/agent, each skeptic VERDICT: CREATE). Occurrences on #1008 (RawFileContentAssertion), #1091 (UnusedPrivateMethod), #1102 (BooleanControlParameter). 44 of 44 failing rows carry a ticket cell.

Follow-ups: Captured as the 41 per-cop tickets #1345-#1385. #1367 (RequireInMethod autocorrect deletes one-line methods) is P1. Dropped: cross-link #226 from #1354 and #917 from #1362; each new ticket's Origin block already names the related ticket. Note: the new tickets lack the Acceptance criteria and Owner sketch sections that implementation-open needs, so each needs /os-backlog:ticket-decompose before it is worked.

## Resolution **Done:** Audited all 46 Sdlc cops against the zero-false-positive standard in docs/plans/class-length-family/sdlc-cop-audit.md (shape, fix, fix-always-correct, false positives, verdict, ticket). 2 meet, 44 fail; each failing cop has a ticket or an occurrence. **Evidence:** Commit 7d251603 on ticket-1325. New tickets #1345-#1385 (41, filed-by/agent, each skeptic VERDICT: CREATE). Occurrences on #1008 (RawFileContentAssertion), #1091 (UnusedPrivateMethod), #1102 (BooleanControlParameter). 44 of 44 failing rows carry a ticket cell. **Follow-ups:** Captured as the 41 per-cop tickets #1345-#1385. #1367 (RequireInMethod autocorrect deletes one-line methods) is P1. Dropped: cross-link #226 from #1354 and #917 from #1362; each new ticket's Origin block already names the related ticket. Note: the new tickets lack the Acceptance criteria and Owner sketch sections that implementation-open needs, so each needs /os-backlog:ticket-decompose before it is worked.
jared closed this issue 2026-10-25 21:26:25 +00:00
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#1325
No description provided.