Widen ParameterListSignalsMissingObject to count keys read from **opts #1448
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#1448
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/ParameterListSignalsMissingObjectcounts**optsas one parameter.A method can read many keys from
**optsand never fire.The real site that motivated the cop used this dodge for one commit's worth of growth.
Observed
Analysis:
docs/lint-lessons/analyses/sdlc-structural-parameter-list-signals-missing-object.md, option B.A probe of the widened rule over
plugins/(gate configplugins/os-sdlc/.rubocop.yml) on 2026-10-28 found 3 new hits, all true positives. They are fixed on main before this ticket runs:plugins/os-backlog/lib/backlog/issues.rb(Issues#createnow takes aBacklog::IssueDraft),plugins/os-backlog/tests/support/file_tracker_sandbox.rb, andplugins/os-sdlc/eval/ticket-takedown/test/run_support.rb(RunSupport::CritiqueReply).Three hits in
plugins/os-contextextensionless scripts exist on main before the widening; they are not part of this ticket.Reproduce
n/a: this is a widening of a cop; the matcher is
plugins/os-sdlc/lib/os_sdlc/cops/structural/parameter_list_signals_missing_object.rb.Approach
For a
def/defswhose args hold a named**restparameter, collect the distinct symbol keys read from it in the method body asrest[:key]orrest.fetch(:key, ...). The**restparameter then counts as the number of distinct keys read, minimum one (a**restthat only passes through still counts one).Rule from Jared: every new hit must be a true positive, and no Exclude lists. Carve-outs go in the matcher.
The cop message does not change. Update the lesson
signalinplugins/os-sdlc/lint-lessons/sdlc-structural-parameter-list-signals-missing-object.ymlto say a**restparameter counts as the keys the body reads from it.Required work:
**restparameter in the matcher — check: presentkwrestarginplugins/os-sdlc/lib/os_sdlc/cops/structural/parameter_list_signals_missing_object.rbAcceptance criteria
**optswhose body readsopts[:d]andopts[:e], when the cop runs, then it reports one offense that says 5 parameters.**optswhose body readsopts.fetch(:d)andopts.fetch(:e, nil), when the cop runs, then it reports one offense.Owner sketch
Origin
.cc-os/os/handoffs/2026-10-27-1542-lint-cops-track.md).**optsdodge ← cop counts**optsas one parameter ← DESIGN (docs/lint-lessons/analyses/sdlc-structural-parameter-list-signals-missing-object.md)Blocked by #1363 (FP carve-out on the same cop). Remove
waitingwhen #1363 closes.#1363 is closed (invalid: the two named hits were true positives, fixed on main by extraction in
51a91034and9914036d; the cop matcher did not change). #1448 is unblocked. The baseline sweep of Sdlc/Structural/ParameterListSignalsMissingObject over plugins/ on 2026-10-28 is 0 hits. The cop is at plugins/os-sdlc/lib/os_sdlc/cops/structural/parameter_list_signals_missing_object.rb (not cops/ as some older text says).Work started on branch ticket-1448 (worktree .claude/worktrees/ticket-1448). Three new hits of the widened rule were fixed on main first in
36b80f97(IssueDraft, sandbox helper, RunSupport::CritiqueReply).Resolution
Done: Widened ParameterListSignalsMissingObject: a **rest parameter counts as the distinct keys the body reads with rest[:key] or rest.fetch(:key), at least one (
8ecedb1f). Fixed the 3 new true-positive hits first by passing built value objects: Backlog::IssueDraft for Issues#create and the FileTrackerSandbox helper, RunSupport::CritiqueReply for the takedown critique fixture (36b80f97). Added must-not-fire cases (one distinct key; forward-only) and reflowed the lesson signal (5b80a126). Pipeline implementation 207 complete in 4 min 18 s, no retries.Evidence: Main
5b80a126pushed. os-sdlc suite 2869 runs 0 failures; os-backlog 344 runs 0 failures; takedown eval tests green. Cop over plugins/ with plugins/os-sdlc/.rubocop.yml: no new hits; only the 3 os-context hits that exist before the widening remain.Follow-ups: #1455 fix the 3 pre-existing os-context hits