Retune Sdlc/Dry/DuplicatedStatementSequence: exclude assertion windows #380

Closed
opened 2026-08-14 20:12:00 +00:00 by jared · 2 comments
Owner

Parent #369.

Build: in plugins/os-sdlc/lib/os_sdlc/cops/duplicated_statement_sequence.rb

  • skip any candidate window in which any statement is (or contains) an assert_/refute_ send. Assertion recurrence is minitest house style, not logic duplication.
  • delete the dead SUGGESTED_EXTRACTIONS map (0/164 offenses matched it) and simplify message_for to the generic suggestion.
  • keep WINDOW_SIZE=2 for now; do NOT raise it in this ticket.

Acceptance:

  • cop unit tests cover: assertion-bearing window not flagged; pure-construction 2-statement duplication (FakeInvoker/Judge shape) still flagged.
  • report the residual repo-wide offense count (before 164) in a comment on #369. If residual is still dominated by noise, file a follow-up to raise WINDOW_SIZE to 3.
  • rubocop green on the plugin.

Blocked-by: none.

Parent #369. Build: in plugins/os-sdlc/lib/os_sdlc/cops/duplicated_statement_sequence.rb - skip any candidate window in which any statement is (or contains) an assert_*/refute_* send. Assertion recurrence is minitest house style, not logic duplication. - delete the dead SUGGESTED_EXTRACTIONS map (0/164 offenses matched it) and simplify message_for to the generic suggestion. - keep WINDOW_SIZE=2 for now; do NOT raise it in this ticket. Acceptance: - cop unit tests cover: assertion-bearing window not flagged; pure-construction 2-statement duplication (FakeInvoker/Judge shape) still flagged. - report the residual repo-wide offense count (before 164) in a comment on #369. If residual is still dominated by noise, file a follow-up to raise WINDOW_SIZE to 3. - rubocop green on the plugin. Blocked-by: none.
Author
Owner

Starting: retune DuplicatedStatementSequence per #378

Starting: retune DuplicatedStatementSequence per #378
Author
Owner

Resolution

Done: Retuned DuplicatedStatementSequence: assertion windows (assert_/refute_) excluded, dead SUGGESTED_EXTRACTIONS deleted, WINDOW_SIZE kept at 2; residual audited

Evidence: Commit a15988e; offenses 164 -> 20; os-sdlc suite 876 runs green; audit: 19/20 noise, WINDOW_SIZE=3 measured to 1

Follow-ups: Window bump captured as #389; config.rb extraction captured as #390

## Resolution **Done:** Retuned DuplicatedStatementSequence: assertion windows (assert_*/refute_*) excluded, dead SUGGESTED_EXTRACTIONS deleted, WINDOW_SIZE kept at 2; residual audited **Evidence:** Commit a15988e; offenses 164 -> 20; os-sdlc suite 876 runs green; audit: 19/20 noise, WINDOW_SIZE=3 measured to 1 **Follow-ups:** Window bump captured as #389; config.rb extraction captured as #390
jared closed this issue 2026-08-14 20:39:05 +00:00
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#380
No description provided.