ParameterListSignalsMissingObject counts Data.define and Struct.new members #1085

Open
opened 2026-10-17 15:24:19 +00:00 by jared · 0 comments
Owner

Problem

Sdlc/Structural/ParameterListSignalsMissingObject (Max 4, gate tier) only inspects def parameter lists. Data.define(:a, ...) and Struct.new(:a, ...) are send nodes with symbol arguments, so a Data with eight members passes. Nineteen Data or Struct definitions in plugins/os-sdlc/lib exceed four members; CrcCensus::Settings has eight and three factory methods. The cop that exists to flag a missing object misses the one shape where the missing object is a value holder.

Observed

bundle exec rubocop --only Sdlc/Structural/ParameterListSignalsMissingObject lib/os_sdlc/crc_census/settings.rb
1 file inspected, no offenses detected

Reproduce

bundle exec rubocop --only Sdlc/Structural/ParameterListSignalsMissingObject plugins/os-sdlc/lib/os_sdlc/crc_census/settings.rb

Approach

Count Data.define and Struct.new members against Max. Known hits: 19, so the change enters the sweep tier until lib is clean, then the gate. Add the shape to the cop's lint lesson. No Exclude list.

Required work: none beyond the acceptance criteria.

Acceptance criteria

  1. Given Data.define with five members and Max 4, when the cop runs, then it reports one offense on the define line.
  2. Given Struct.new with four members, when the cop runs, then it reports nothing.
  3. Given today's lib, when the cop runs in the sweep tier, then it reports the 19 known definitions and no file is excluded.

Origin

  • Trigger: collaborator pass analysis 2026-10-17; the root tally showed Settings with eight members passing the cop.
  • Improvised this session: none
  • Chain: Data members uncounted ← cop overrides on_args only ← DESIGN (plugins/os-sdlc/lib/os_sdlc/cops/parameter_list_signals_missing_object.rb)
  • Root candidate: this ticket
  • Where: plugins/os-sdlc/lib/os_sdlc/cops/parameter_list_signals_missing_object.rb
  • Session: f1eaf768-77b4-48c7-afde-b0344f519273
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/f1eaf768-77b4-48c7-afde-b0344f519273.jsonl
## Problem `Sdlc/Structural/ParameterListSignalsMissingObject` (Max 4, gate tier) only inspects `def` parameter lists. `Data.define(:a, ...)` and `Struct.new(:a, ...)` are send nodes with symbol arguments, so a Data with eight members passes. Nineteen Data or Struct definitions in `plugins/os-sdlc/lib` exceed four members; `CrcCensus::Settings` has eight and three factory methods. The cop that exists to flag a missing object misses the one shape where the missing object is a value holder. ## Observed ``` bundle exec rubocop --only Sdlc/Structural/ParameterListSignalsMissingObject lib/os_sdlc/crc_census/settings.rb ``` ``` 1 file inspected, no offenses detected ``` ## Reproduce ``` bundle exec rubocop --only Sdlc/Structural/ParameterListSignalsMissingObject plugins/os-sdlc/lib/os_sdlc/crc_census/settings.rb ``` ## Approach Count `Data.define` and `Struct.new` members against Max. Known hits: 19, so the change enters the sweep tier until lib is clean, then the gate. Add the shape to the cop's lint lesson. No Exclude list. Required work: none beyond the acceptance criteria. ## Acceptance criteria 1. Given `Data.define` with five members and Max 4, when the cop runs, then it reports one offense on the define line. 2. Given `Struct.new` with four members, when the cop runs, then it reports nothing. 3. Given today's lib, when the cop runs in the sweep tier, then it reports the 19 known definitions and no file is excluded. ## Origin - Trigger: collaborator pass analysis 2026-10-17; the `root` tally showed Settings with eight members passing the cop. - Improvised this session: none - Chain: Data members uncounted ← cop overrides on_args only ← DESIGN (plugins/os-sdlc/lib/os_sdlc/cops/parameter_list_signals_missing_object.rb) - Root candidate: this ticket - Where: plugins/os-sdlc/lib/os_sdlc/cops/parameter_list_signals_missing_object.rb - Session: f1eaf768-77b4-48c7-afde-b0344f519273 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/f1eaf768-77b4-48c7-afde-b0344f519273.jsonl
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1085
No description provided.