Sdlc/Dry/OwnedMessage: require typed receivers and treat casgn owners as inside the owner #1347
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#1347
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
Sdlc/Dry/OwnedMessageflags a call to a message that a configOwnersspec assigns to an owner. A bare spec matches any receiver, and the owner's own definition can count as outside the owner.Counterexamples:
full_name_parts(.rubocop.yml:394) matches any receiver.class Release; def full_name_parts = [owner, name]; def label = full_name_parts.join("/"); endfires, but the owner has no answer for Release.ConstantPath = Data.define do ... end) is a casgn, not a class node. The owner's own call fires.Found by the #1325 zero-false-positive audit (docs/plans/class-length-family/sdlc-cop-audit.md).
Approach
Fix in the cop matcher (plugins/os-sdlc/lib/os_sdlc/cops/owned_message.rb and owned_message/), never by config
Exclude. Require a receiver type for every spec: drop the bare form or narrow it to a typed receiver. Treat acasgnblock named for the owner as inside the owner.Required work:
casgnowners in the namespace check — check: presentcasgninplugins/os-sdlc/lib/os_sdlc/cops/owned_message.rbAcceptance criteria
Excludelist or test-path exclusion carries the carve-out.Owner sketch
The carve-out lives in the cop matcher.
Origin
VERDICT: CREATE