Remove unused delegates Event#note_title and Event#design_title

Summary

Removes two unused prefixed delegates from app/models/event.rb:

  • Event#note_title (from delegate :title, to: :note, prefix: true, allow_nil: true)
  • Event#design_title (from delegate :title, to: :design, prefix: true, allow_nil: true)

The sibling delegates issue_title and merge_request_title remain in use and are kept.

Related to #542966 (closed)

Verification

These delegates were verified as unused by:

  • keela --type delegations flagged them as unused
  • Grep search found no production callers (note_title had none; design_title was referenced only by a spec asserting the delegate existed)
  • No metaprogramming patterns reference them (no send/public_send/symbol refs)
  • Not a Rails convention method
  • Not a callback, view, serializer, or presenter reference

The helper methods event_note_title_html / event_design_title_html are unrelated (coincidental substring match); they use event.target_title / event.note_target, not these delegates.

Cascade Removals

None - this was a standalone removal.

Metrics

Source File Complexity (flog)

Metric Before After Improvement
File flog total 550.4 548.2 -2.2 (0.4%)
Delegate lines flog score 2.2 N/A -2.2 removed

Spec File Complexity (flog)

Metric Before After Improvement
Spec file flog total 3666.4 3660.0 -6.4 (0.2%)
Spec line flog score 6.4 N/A -6.4 removed

Combined Flog Summary

File Flog Removed
app/models/event.rb 2.2
spec/models/event_spec.rb 6.4
Total 2.2 + 6.4 = 8.6

Test Suite Impact

  • Specs removed: 1 example (respond_to(:design_title))
  • Spec file: spec/models/event_spec.rb
  • Time saved per run: 0.09792 seconds

Estimated CI Savings

Estimate Pipelines/Month Time Saved Cost Saved/Month Cost Saved/Year
Pessimistic 15,000 0.41 hrs/month $0.73 $8.81
Moderate 30,000 0.82 hrs/month $1.47 $17.63
Optimistic 50,000 1.36 hrs/month $2.45 $29.38

Based on 0.09792 seconds saved per pipeline × $0.03/minute (large runners: 3x cost factor on $10/1000 base minutes)

Files Modified

  • app/models/event.rb (2 delegate lines removed)
  • spec/models/event_spec.rb (1 line removed, 1 example)
  • scripts/lint/keela_baseline.yml (entry removed)
  • Related to #542966 (closed) (Improve unused helper methods workflow)
  • Part of dead code cleanup effort
  • Delegates were listed in scripts/lint/keela_baseline.yml

Merge request reports

Loading
Loading