lint-worklist: run the autocorrect phase on the gate chain and move unsafe-autocorrect cops to batch #1441
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1441
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
bin/lint-worklistprints the autocorrect phase as a barerubocop -a --only <cops>command. The command does not use the gate's config chain (plugin config first, then the target config, ADR-0298). Run as printed, it fixes nothing. Also, two cops in the autocorrect phase have only unsafe autocorrect (Minitest/AssertTruthy,Minitest/RefuteFalse), so-anever fixes them and the phase never empties.Observed
fix-lints on os-me, 2026-10-27. The worklist reported 19 autocorrect offenses and printed:
From the repo root:
0 files inspected, no offenses detected. Fromplugins/os-sdlcwith-c .rubocop.yml ../os-me:228 files inspected, no offenses detected.OsSdlc::Lint::Run.new(only: cops).correct(files: ["plugins/os-me"], root: ...)fixed 14 of the 19. The other 5 (AssertTruthy,RefuteFalse) stayed in the autocorrect phase until they were fixed by hand. Their unsafe autocorrect (assert_equal false, xtorefute x) also weakens a test:refute xpasses when the key is missing.Reproduce
On a target with an autocorrect offense, run the printed command from the repo root; it inspects 0 files.
Approach
The worklist runs the autocorrect itself on the gate chain (
Lint::Run#correct), the same way it lints, and does not print a shell command. A cop whose autocorrect is unsafe goes to the batch phase (hand fix), not the autocorrect phase.Required work:
rubocop -a --onlyinplugins/os-sdlc/lib/os_sdlc/lint/worklist/listing.rbMinitest/AssertTruthyinplugins/os-sdlc/lib/os_sdlc/lint/worklist/cop_phase.rbRejected: print
-c <plugin config>in the command — the chain has two layers; one-cflag cannot express it.Acceptance criteria
Owner sketch
Origin
Lint::Run#correctfrom a Ruby one-liner instead of the printed command.VERDICT: CREATE