Sdlc/Structural/ParameterListSignalsMissingObject: exempt value-object initializers and fixture builders by shape #1363
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#1363
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 cop
Sdlc/Structural/ParameterListSignalsMissingObjectflags any def or block with more than 4 parameters.It exempts only Struct/Data
initializeand lambda/proc args.The prescribed fix (extract a value object) is not always correct: a plain-class value-object
initializealready is the object.Found by the #1325 zero-false-positive audit (docs/plans/class-length-family/sdlc-cop-audit.md).
Observed
Counterexample 1:
plugins/os-sdlc/lib/os_sdlc/map/edge.rb:19.Edge#initialize(verdict:, to:, bound:, note:, progress_reset:)only assigns ivars. The fix would wrap a value object in a value object.Counterexample 2:
plugins/os-me/test/candidate_fakes.rb:24, a fixture-row builder whose body is one hash built from its parameters.The MSG hedge ("stop when no concept exists") admits the false positives. 22 hits.
Reproduce
n/a: the cop matcher is at
plugins/os-sdlc/lib/os_sdlc/cops/parameter_list_signals_missing_object.rb:28-36; run the cop onplugins/os-sdlc/lib/os_sdlc/map/edge.rb.Approach
Carve-outs go in the cop matcher, never in a config Exclude list or a test-path exclusion.
Skip an
initializewhose body is only@x = xassignments of its own parameters.Skip a def whose body is one hash or
newliteral built from its parameters.Remove the "stop and say so" hedge from the MSG once the carve-outs exist.
Required work:
stopinplugins/os-sdlc/lib/os_sdlc/cops/parameter_list_signals_missing_object.rbAcceptance criteria
initializewhose body only assigns its parameters to ivars, when the cop runs, then it reports no offense.Origin
VERDICT: CREATE
jared referenced this issue2026-10-27 21:57:24 +00:00
Resolution
Done: Closed as invalid, not implemented. The two hits the ticket names were true positives, not false positives. The cop's prescription (extract a value object) found a real object at each site. Ruling: predicted (os-me predict, band 80, confidence 75), judgment tier, AFK.
Evidence: edge.rb: commit
51a91034extracted LoopBound (bound and progress_reset travel together); Edge#initialize now takes 4 keywords. candidate_fakes.rb: commit9914036dmade RulingRow a Data.define (already exempt). Sweep of the cop over all 2664 .rb files under plugins/ on main 2026-10-28 with plugins/os-sdlc/.rubocop.yml: 0 hits. A synthetic probe (ivar-only initialize, hash-literal builder, call body, 5 params each) gives 3 offenses, so the cop is active. Carve-out 1 (ivar-only initialize) would also pass a service constructor that stores 5 collaborators, and it would have hidden the Edge clump; the smell analysis docs/lint-lessons/analyses/sdlc-structural-parameter-list-signals-missing-object.md step 8 warned about this. The ticket's cop path was also stale (now cops/structural/).Follow-ups: #1448 (count **opts keys) is unblocked. The MSG hedge ('stop and say so') stays; it has no effect on matching.