Rename cop RegistryOutsideEntryPoint to match its lookup-by-id check #1684
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#1684
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
The Ruby cop
Sdlc/Sequel/RegistryOutsideEntryPointno longer checks a registry.Ruling 134 (2026-11-10,
docs/decisions/rulings.tsv) deleted its registry check and its path list.The cop now holds one check: a
Model[id]lookup outsideinitialize, with a test-path allowance.The name
RegistryOutsideEntryPointnames a check that is gone.The ruling says: "The cop name no longer fits the check."
Observed
The cop file is
plugins/os-sdlc/lib/os_sdlc/cops/sequel/registry_outside_entry_point.rb.Its offense message already describes the lookup check: "looks up a model row by id outside initialize. Receive the model you act on and walk its associations, or look the root row up one time in initialize."
Its allowance is
DEFAULT_ALLOWED_PATHS = %w[**/*_test.rb **/test/**/*].freeze(line 13).Its lint lesson
plugins/os-sdlc/lint-lessons/sdlc-sequel-registry-outside-entry-point.ymlalready describes the lookup check, and itskey:is the old name.These sites still carry the old name:
plugins/os-sdlc/.rubocop.yml:317(theSdlc/Sequel/RegistryOutsideEntryPoint:block, with a stale ratchet comment).plugins/os-sdlc/lint-lessons/sdlc-sequel-registry-outside-entry-point.yml(file name andkey:).plugins/os-sdlc/lint-lessons/sdlc-sequel-row-index-on-model.yml:32(related:entry).plugins/os-sdlc/test/cops/registry_outside_entry_point_test.rb(file name, class nameRegistryOutsideEntryPointTest,COPconstant)..claude/rules/os-sdlc-architecture.md:58("The copSdlc/Sequel/RegistryOutsideEntryPointenforces the lookup part of rule 3").plugins/os-sdlc/design/generated/*(generated; see the stale-text ticket).Reproduce
n/a: naming defect. Run
grep -rn RegistryOutsideEntryPoint plugins/os-sdlc/lib plugins/os-sdlc/lint-lessons plugins/os-sdlc/test plugins/os-sdlc/.rubocop.yml .claude/rulesto list the sites.Approach
Rename the cop to a name that states the check: a model row looked up by id outside
initialize.Pick the new name in the ticket decomposition, in the
Sdlc/Sequel/department (for exampleSdlc/Sequel/LookupByIdOutsideInitialize).Rename the Ruby class, the file, the test, the lint lesson file and its
key:, the.rubocop.ymlblock, therelated:entry, and the rules-file sentence.Delete the stale
Exclude: []ratchet comment in the.rubocop.ymlblock or keep it only if it is still true.Leave the cop behavior unchanged.
Use the structure fast path (
docs/sdlc-fast-path.md); a rename changes no behavior.Required work:
RegistryOutsideEntryPointinplugins/os-sdlc/lib/**/*.rbRegistryOutsideEntryPointinplugins/os-sdlc/.rubocop.ymlrelated:entry — check: absentRegistryOutsideEntryPointinplugins/os-sdlc/lint-lessons/*.ymlRegistryOutsideEntryPointinplugins/os-sdlc/test/**/*.rbOrchestrator work: update
.claude/rules/os-sdlc-architecture.md:58; ticket #1381 names the old cop and describes the deleted registry check, so close or rewrite it.Rejected: keep the name — it names a deleted check and misleads a reader of an offense line.
Non-goals (optional)
Any change to what the cop reports.
Origin
Boot(#1646).docs/decisions/rulings.tsv, row 134) ←Project#connect(:db)callsDb.connect_project!, which the registry check reportedVERDICT: CREATE
REASON: Ruling 134 left the cop with only the lookup-by-id check; the name is wrong. #1381 describes the deleted registry check and is not the same fault.
This ticket takes over the one remainder of #1381: replace the test globs in
DEFAULT_ALLOWED_PATHS(lib/os_sdlc/cops/sequel/registry_outside_entry_point.rb:13) by shape.Resolution
Done: Renamed the cop to Sdlc/Sequel/LookupByIdOutsideInitialize: class, file, test, lesson, .rubocop.yml block (stale ratchet comment removed), the related entry in sdlc-sequel-row-index-on-model.yml, and .claude/rules/os-sdlc-architecture.md. No behavior change.
Evidence: Commit
a2996eb8eon main. Suite: 5326 runs, 0 failures, 0 errors. The renamed cop reports 0 offenses over lib.Follow-ups: The #1381 remainder (replace the test globs in DEFAULT_ALLOWED_PATHS by shape) is not done; it needs a ruling on the shape (#1450 calls it a separate ruling). It stays on #1381, which is open with the review label. design/generated was regenerated under #1686.