Detector::CopSites runner replaces the Commissioner loop in crc/holders/site_offenses.rb #1228
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#1228
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
Step 1 of Phase 1 in docs/crc/os-sdlc/detector-plan.md moves the RuboCop Commissioner loop out of the holders detector. Today crc/holders/site_offenses.rb owns that loop. No other detector can reuse it. Each detector that wants a cop must copy the loop.
Reproduce
n/a: design ticket
Approach
Create
plugins/os-sdlc/lib/os_sdlc/detector/cop_sites.rb. The contract isCopSites.new(cops, config).findings(path). It returns structs ofpath line cop keys. The runner reads each cop'sfindingslist afterRuboCop::Cop::Commissionerinvestigates the file. An os-sdlc cop records one finding struct beside eachadd_offensecall.Crc::Holderscalls the runner forsite_offenses. The holders TSV output does not change.Required work:
module Detectorinplugins/os-sdlc/lib/os_sdlc/detector/*.rbCommissionerinplugins/os-sdlc/lib/os_sdlc/crc/holders/**/*.rbAcceptance criteria
CopSites.new(cops, config).findings(path)runs on a file, then it returns one struct withpath line cop keysfor each recorded finding.site_offenses, then it calls the runner and the TSV output is the same as before.Origin
VERDICT: CREATE
Resolution
Done: Detector::CopSites (lib/os_sdlc/detector/cop_sites.rb) runs a cop list over one file through RuboCop::Cop::Commissioner and returns the Finding(path, line, cop, facts) rows each RecordingCop records through report(node, message:, **facts). Crc::Holders::SiteOffenses calls the runner; its output is byte-identical.
Evidence: fast-batch-7 merged to main
ae057ddd: commits1de2554fe14008512fbced02d8af9b2d3c1de83f; suite 2369 runs 0 failures; memo docs/crc/os-sdlc/fast-batch-7/finding-a-cop-sites-runner.md; tests tests/detector/cop_sites_test.rb tests/detector/recording_cop_test.rbFollow-ups: none