Move os-sdlc cop files into department folders so cops/ paths match their constants #1397
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#1397
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
plugins/os-sdlc/lib/os_sdlc/cops/ is a flat folder. Its 164 files define constants in five namespaces: RuboCop::Cop::Sdlc::Structural (128), Dry (18), Minitest (7), Sequel (6), and plain RuboCop::Cop::Sdlc (5). The file path does not carry the department. A Zeitwerk loader with namespace RuboCop::Cop::Sdlc cannot map these files, and #1393 needs that loader.
Files whose path does not name their constant:
Reproduce
n/a: structure change. Count with grep -rhoE 'module (Structural|Dry|Minitest|Sequel)' plugins/os-sdlc/lib/os_sdlc/cops | sort | uniq -c.
Approach
Move each cop file and its helper folder under cops//: structural/, dry/, minitest/, sequel/. The 5 plain-Sdlc cops stay at the cops/ top level. Fold each reopen file into a constant that its path names. Keep one constant per file. Constants and cop names (for example Sdlc/Structural/FeatureEnvy) do not change, so .rubocop.yml cop keys and rubocop:disable comments do not change.
Required work:
module Structuralinplugins/os-sdlc/lib/os_sdlc/cops/*.rbRejected: a glob entry file over the flat layout — it keeps the per-helper require_relative calls and the hidden LoadError rescues (Jared chose the department layout this session).
Acceptance criteria
Blocking edges
Blocks #1393.
Origin
VERDICT: CREATE
Resolution
Done: fast-batch-16 moved 159 cop files into cops/structural, dry, minitest and sequel; plain Sdlc cops stay at the top. Every require_relative, test path, .rubocop.yml and .rubocop-sweep.yml require/Exclude path, mine-lints cop path convention and ledger path cell follows. Constants and cop names unchanged.
Evidence: main
3ccd7a22(7d0646b4move,958eacc4Exclude paths), cost rows4a0fc41d. Full suite 2672 runs 0 failures; rubocop --show-cops Sdlc/ count 40 before and after; Zeitwerk eager_load of cops/ with namespace RuboCop::Cop::Sdlc: 164 files, 48 cops, no error (raised before the move). Stranger reviews: one spec finding fixed, five rulings in docs/crc/os-sdlc/fast-batch-16/rulings.tsv.Follow-ups: #1393 unblocked (loader; comment there notes 40 vs 48 registered cops). #1398 (92 missing ledger rows, pre-existing). jared/decision-model#10 (copied cop require: list breaks on moves).