Remove unused method RemoteMirror#update_failed?

Summary

Removes the unused method RemoteMirror#update_failed? from app/models/remote_mirror.rb.

This predicate is redundant with the failed? method auto-generated by the state_machine :update_status declaration (which defines a :failed state), and nothing in the codebase calls it.

Related to #542966 (closed)

Verification

This method was verified as unused by:

  • keela --type methods flagged it as unused
  • Grep search found no callers (in app/, lib/, ee/app/, ee/lib/, or specs)
  • No metaprogramming patterns reference it (no :update_failed symbol usage, no send)
  • Not a Rails convention method
  • Not a callback

Cascade Removals

None - this was a standalone removal.

Metrics

Source File Complexity (flog)

Metric Before After Improvement
File flog total 305.9 303.5 -2.4 (0.8%)
Method flog score 2.4 N/A -2.4 removed

Spec File Complexity (flog)

Metric Before After Improvement
Spec file flog total unchanged unchanged 0 (no spec block for this method)
Spec block flog score 0 N/A 0 removed

Combined Flog Summary

File Flog Removed
app/models/remote_mirror.rb 2.4
spec/models/remote_mirror_spec.rb 0
Total 2.4

Test Suite Impact

  • Specs removed: 0 examples (no dedicated specs referenced this method)
  • Spec file: spec/models/remote_mirror_spec.rb (unchanged)
  • Time saved per run: 0.00 seconds

Estimated CI Savings

Estimate Pipelines/Month Time Saved Cost Saved/Month Cost Saved/Year
Pessimistic 15,000 0.00 hrs/month $0.00 $0.00
Moderate 30,000 0.00 hrs/month $0.00 $0.00
Optimistic 50,000 0.00 hrs/month $0.00 $0.00

Based on 0.00 seconds saved per pipeline × $0.03/minute (large runners: 3x cost factor on $10/1000 base minutes). No dedicated specs existed for this method, so the savings here are purely from reduced source complexity rather than test execution time.

Files Modified

  • app/models/remote_mirror.rb (method removed - 4 lines including blank line)
  • scripts/lint/keela_baseline.yml (entry removed - 2 lines)
  • Related to #542966 (closed) (Improve unused helper methods workflow)
  • Part of dead code cleanup effort
  • Method was listed in scripts/lint/keela_baseline.yml

Merge request reports

Loading
Loading