Gate: full-tree lint sweep as a hard suite-gate check #1418

Open
opened 2026-10-27 16:12:59 +00:00 by jared · 1 comment
Owner

Problem

The gate lints only changed files (Gate::Commands, diffed_ruby_files). An offense in a file that no ticket touches never surfaces. Example: 27 real Sdlc/Minitest/PackedArrayAssertion offenses in os-me were never reported. Jared ruled on 2026-10-27 that every cop the gate enforces is universal, and that a full-tree sweep on the same chain is a hard check. No ratchet and no baseline: the check counts every offense.

Reproduce

n/a: missing check; the 2026-10-27 full-tree run found 1076 offenses on the gate chain across 8 targets, none reported by the gate.

Approach

Add a suite-gate step that lints the whole target with the gate's own chain and fails on any offense.

# Gate::Commands#to_h
Name::SWEEP => sweep_command

# command body
Lint::Run.new(lint_config: target.lint.resolved_config(root))
         .call(files: [target.lint_path(root)], root: root)
# any offense -> exit 1, listing cop, file:line, message
  • Runs on the same chain as the gate's lint step (ADR-0298: plugin config first, then the target config; nothing written into the target).
  • Counts every enabled cop in the chain, not only Sdlc/* (Jared, 2026-10-27).
  • Runs in the suite gate (once per green increment), not per dispatch.

Required work:

  1. Add the sweep step to the gate command table — check: present SWEEP in plugins/os-sdlc/lib/os_sdlc/gate/commands.rb

Rejected: Sdlc-only sweep — the gate already enforces Metrics, Layout and Style on changed files; two standards for the same code (Jared ruled A, 2026-10-27).
Rejected: a ratchet or baseline count — a baseline is an exclusion list.

Acceptance criteria

  1. Given a target with one offense in a file the diff does not touch, when the suite gate runs, then the gate fails and names that cop and file:line.
  2. Given a target with zero offenses on the gate chain, when the suite gate runs, then the sweep step passes.
  3. Given a target with its own lint_config, when the sweep runs, then it uses the plugin config first and the target's own file second.

Owner sketch

class OsSdlc::Gate::Commands
  def to_h
end

Blocked by

#1417, then fix-lints must bring every .sdlc target to zero offenses on the gate chain first (os-me, os-backlog, os-aidd-lint, os-adr, cc-architect, os, os-sdlc, takedown). Otherwise this check fails every run.

Origin

  • Trigger: lint-cops track increment 3, rulings P3/P4 and the 2026-10-27 full-tree ruling (option A).
  • Improvised this session: none
  • Chain: real offenses never surface ← gate lints only diffed files (plugins/os-sdlc/lib/os_sdlc/gate/commands.rb:75-87) ← DESIGN (gate/commands.rb)
  • Root candidate: none found; searched full-tree, sweep, lint-sweep, baseline, ratchet, diffed_ruby_files, changed files only
  • Where: plugins/os-sdlc/lib/os_sdlc/gate/commands.rb
  • 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 The gate lints only changed files (`Gate::Commands`, `diffed_ruby_files`). An offense in a file that no ticket touches never surfaces. Example: 27 real `Sdlc/Minitest/PackedArrayAssertion` offenses in os-me were never reported. Jared ruled on 2026-10-27 that every cop the gate enforces is universal, and that a full-tree sweep on the same chain is a hard check. No ratchet and no baseline: the check counts every offense. ## Reproduce n/a: missing check; the 2026-10-27 full-tree run found 1076 offenses on the gate chain across 8 targets, none reported by the gate. ## Approach Add a suite-gate step that lints the whole target with the gate's own chain and fails on any offense. ```ruby # Gate::Commands#to_h Name::SWEEP => sweep_command # command body Lint::Run.new(lint_config: target.lint.resolved_config(root)) .call(files: [target.lint_path(root)], root: root) # any offense -> exit 1, listing cop, file:line, message ``` - Runs on the same chain as the gate's lint step (ADR-0298: plugin config first, then the target config; nothing written into the target). - Counts every enabled cop in the chain, not only `Sdlc/*` (Jared, 2026-10-27). - Runs in the suite gate (once per green increment), not per dispatch. Required work: 1. Add the sweep step to the gate command table — check: present `SWEEP` in `plugins/os-sdlc/lib/os_sdlc/gate/commands.rb` Rejected: Sdlc-only sweep — the gate already enforces Metrics, Layout and Style on changed files; two standards for the same code (Jared ruled A, 2026-10-27). Rejected: a ratchet or baseline count — a baseline is an exclusion list. ## Acceptance criteria 1. Given a target with one offense in a file the diff does not touch, when the suite gate runs, then the gate fails and names that cop and file:line. 2. Given a target with zero offenses on the gate chain, when the suite gate runs, then the sweep step passes. 3. Given a target with its own `lint_config`, when the sweep runs, then it uses the plugin config first and the target's own file second. ## Owner sketch ```ruby class OsSdlc::Gate::Commands def to_h end ``` ## Blocked by #1417, then fix-lints must bring every `.sdlc` target to zero offenses on the gate chain first (os-me, os-backlog, os-aidd-lint, os-adr, cc-architect, os, os-sdlc, takedown). Otherwise this check fails every run. ## Origin - Trigger: lint-cops track increment 3, rulings P3/P4 and the 2026-10-27 full-tree ruling (option A). - Improvised this session: none - Chain: real offenses never surface ← gate lints only diffed files (`plugins/os-sdlc/lib/os_sdlc/gate/commands.rb:75-87`) ← DESIGN (`gate/commands.rb`) - Root candidate: none found; searched full-tree, sweep, lint-sweep, baseline, ratchet, diffed_ruby_files, changed files only - Where: `plugins/os-sdlc/lib/os_sdlc/gate/commands.rb` - 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

Lint-worklist counts, 2026-10-28 (main, each target on its own gate chain; the worklist shows the first non-empty phase).

Target Autocorrect Batch Iterative
os-backlog 13 1 0
cc-architect 0 0 2
os-sdlc 0 0 5
takedown 0 0 0
os 0 0 2
os-aidd-lint 0 0 13
os-adr 0 0 22
os-me 0 0 1

Tickets that still block a zero full-tree check:

  • #1008 RawFileContentAssertion (os-aidd-lint 13, os-adr 21, os-me 1)
  • #1456 os-sdlc 5 RawFileContentAssertion offenses
  • #1356 StaticFactAssertion on assert_path_exists (os 2)
  • #1091 UnusedPrivateMethod (cc-architect operations/base.rb:27)
  • #1385 / Jared ADR ruling on RequireRelativeDensity (cc-architect plugin_config.rb:4)
  • #1348 CollaboratorConstructionInInitialize (os-adr record/challenge.rb:8)
  • os-backlog: no ticket needed; 13 autocorrect plus 1 PackedArrayAssertion (checkout_claimant_test.rb:15), fixable by fix-lints.

#1417 is closed. os-backlog on the gate chain gives 14 offenses, the same as the worklist (13 + 1).

Lint-worklist counts, 2026-10-28 (main, each target on its own gate chain; the worklist shows the first non-empty phase). | Target | Autocorrect | Batch | Iterative | |---|---|---|---| | os-backlog | 13 | 1 | 0 | | cc-architect | 0 | 0 | 2 | | os-sdlc | 0 | 0 | 5 | | takedown | 0 | 0 | 0 | | os | 0 | 0 | 2 | | os-aidd-lint | 0 | 0 | 13 | | os-adr | 0 | 0 | 22 | | os-me | 0 | 0 | 1 | Tickets that still block a zero full-tree check: - #1008 RawFileContentAssertion (os-aidd-lint 13, os-adr 21, os-me 1) - #1456 os-sdlc 5 RawFileContentAssertion offenses - #1356 StaticFactAssertion on assert_path_exists (os 2) - #1091 UnusedPrivateMethod (cc-architect operations/base.rb:27) - #1385 / Jared ADR ruling on RequireRelativeDensity (cc-architect plugin_config.rb:4) - #1348 CollaboratorConstructionInInitialize (os-adr record/challenge.rb:8) - os-backlog: no ticket needed; 13 autocorrect plus 1 PackedArrayAssertion (checkout_claimant_test.rb:15), fixable by fix-lints. #1417 is closed. os-backlog on the gate chain gives 14 offenses, the same as the worklist (13 + 1).
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#1418
No description provided.