Remove unused constant Admin::ApplicationSettingsController::PARAM_JOB_ID_MAX_SIZE
Summary
Removes the unused constant Admin::ApplicationSettingsController::PARAM_JOB_ID_MAX_SIZE from app/controllers/admin/application_settings_controller.rb.
The constant was a bare integer (= 50) with a comment referencing a spec that "ensures that the constant value is more than the size of an actual jid." That spec no longer exists, and the constant has no callers anywhere, leaving both the constant and its comment orphaned.
Related to #542966
Verification
This constant was verified as unused by:
-
keela --type constantsflagged it as unused (listed inscripts/lint/keela_baseline.yml) - Grep search found no callers (only the definition itself, across
app/,lib/,ee/,spec/,ee/spec/,config/) - No metaprogramming patterns reference it (no
const_get, no:PARAM_JOB_ID_MAX_SIZEsymbol) - Not referenced in any view (
.haml/.erb) - Not referenced by any spec (the spec named in the stale comment no longer exists)
Cascade Removals
None - this was a standalone removal.
Metrics
Source File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| File flog total | 274.4 | 274.4 | -0.0 (0%) |
| Constant flog score | 0.0 | N/A | -0.0 removed |
A bare constant assignment is a literal, not a method, so flog assigns it no score. The complexity value of this removal is in eliminating dead code and a misleading comment, not in flog reduction.
Spec File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| Spec file flog total | 0.0 | 0.0 | -0.0 (0%) |
| Spec block flog score | 0.0 | N/A | -0.0 removed |
No spec referenced this constant, so there is no spec block to remove.
Combined Flog Summary
| File | Flog Removed |
|---|---|
app/controllers/admin/application_settings_controller.rb |
0.0 |
| (no spec file) | 0.0 |
| Total | 0.0 + 0.0 = 0.0 |
Test Suite Impact
- Specs removed: 0 examples (no spec existed for this constant)
- Spec file: none
- 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 spec existed, so there is no per-pipeline test time to save; the benefit here is removing dead code and a stale, misleading comment.
Files Modified
app/controllers/admin/application_settings_controller.rb(constant + 5-line comment removed - 7 lines)scripts/lint/keela_baseline.yml(entry removed - 2 lines)
Related
- Related to #542966 (Improve unused helper methods workflow)
- Part of dead code cleanup effort
- Constant was listed in
scripts/lint/keela_baseline.yml