os-sdlc lint gate ignores target lint_config and lints only code_path with root .rubocop.yml #215

Closed
opened 2026-08-01 15:54:30 +00:00 by jared · 2 comments
Owner

Problem

Surfaced running ticket #209 through /os-sdlc:implement. The lint gate (bin/os-sdlc lint_command -> OsSdlc::Lint) has two gaps:

  1. Lint#resolve_config_path prefers <root>/.rubocop.yml when it exists and falls back to <code_path>/.rubocop.yml — it never consults project.lint_config. In cc-os the root .rubocop.yml is just AllCops: NewCops: disable, so the gate ran stock cops and reported 530 offenses across 53 lib files, none related to the ticket. Setting lint_config: plugins/os-sdlc/.rubocop.yml on the target changed nothing.
  2. The gate lints all of code_path, not the ticket's delta — any pre-existing offense blocks every unrelated ticket (and a bin/-only change isn't linted at all when code_path is lib/).

Proposed fix

Honor project.lint_config first in resolve_config_path (root/code_path fallbacks after), and consider delta-scoping the gate to the run's changed files (the worktree diff is available to the caller). Add tests for both in plugins/os-sdlc/tests/lint_test.rb.

## Problem Surfaced running ticket #209 through /os-sdlc:implement. The `lint` gate (bin/os-sdlc lint_command -> OsSdlc::Lint) has two gaps: 1. `Lint#resolve_config_path` prefers `<root>/.rubocop.yml` when it exists and falls back to `<code_path>/.rubocop.yml` — it never consults `project.lint_config`. In cc-os the root .rubocop.yml is just `AllCops: NewCops: disable`, so the gate ran stock cops and reported 530 offenses across 53 lib files, none related to the ticket. Setting `lint_config: plugins/os-sdlc/.rubocop.yml` on the target changed nothing. 2. The gate lints all of `code_path`, not the ticket's delta — any pre-existing offense blocks every unrelated ticket (and a bin/-only change isn't linted at all when code_path is lib/). ## Proposed fix Honor `project.lint_config` first in resolve_config_path (root/code_path fallbacks after), and consider delta-scoping the gate to the run's changed files (the worktree diff is available to the caller). Add tests for both in plugins/os-sdlc/tests/lint_test.rb.
Author
Owner

Queued for the os-sdlc pipeline next session. Fix sketch: (1) reverse OsSdlc::Lint#resolve_config_path priority — honor project.lint_config first, root .rubocop.yml as fallback; (2) delta-scope the gate to the ticket's changed files instead of all of code_path. Tests: plugins/os-sdlc/tests/lint_test.rb.

Queued for the os-sdlc pipeline next session. Fix sketch: (1) reverse OsSdlc::Lint#resolve_config_path priority — honor project.lint_config first, root .rubocop.yml as fallback; (2) delta-scope the gate to the ticket's changed files instead of all of code_path. Tests: plugins/os-sdlc/tests/lint_test.rb.
Author
Owner

Confirmed fixed: lint.rb:33 Lint#call now takes lint_config: and threads it through LintWorklistRubocopConfig (shipped as ticket #235, see tests/lint_test.rb:77-80). Closing.

Confirmed fixed: lint.rb:33 Lint#call now takes lint_config: and threads it through LintWorklistRubocopConfig (shipped as ticket #235, see tests/lint_test.rb:77-80). Closing.
jared closed this issue 2026-08-13 18:15:59 +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#215
No description provided.