Fix RSpec/FeatureCategory in _git_abuse_rate_limit.html.haml_spec
What does this MR do and why?
ee/spec/views/admin/application_settings/_git_abuse_rate_limit.html.haml_spec.rb declared no feature_category:, so RSpec/FeatureCategory rejects it. This MR sets feature_category: :insider_threat on its top-level RSpec.describe.
The change is metadata on that one node. No example body changes, and no test behaviour changes.
.rubocop_todo/rspec/feature_category.yml still lists this file. The entry is redundant now, and the scheduled Keeps::GenerateRubocopTodos run regenerates the todo files from a full rescan and drops entries whose offense is gone.
Design decisions
:insider_threat is a judgment call rather than a value copied from an authoritative source, so please confirm it is the right category before merging. Neither derived source was available:
- The class under test:
ee/app/views/admin/application_settings/_git_abuse_rate_limit.html.hamlis a view, so it declares no category of its own. - Sibling specs: the eight other specs in
ee/spec/views/admin/application_settings/that declare one share no value. Each covers a different settings section (_amazon_quses:ai_abstraction_layer,_elasticsearch_formuses:global_search,_security_policiesuses:security_policy_management, and so on).
That leaves the spec's own content. It asserts on the data attributes the partial renders from git_abuse_rate_limit_data, and that helper's own spec block in ee/spec/helpers/ee/application_settings_helper_spec.rb is tagged :insider_threat. The git abuse services under ee/spec/services/users/abuse/ and the group-level ee/spec/features/groups/settings/reporting_spec.rb use :insider_threat too. One signal points the other way: ee/spec/features/admin/settings/reporting_settings_spec.rb, which drives this same admin form, uses :instance_resiliency.
How to set up and validate locally
The file is still listed in the RuboCop todo, so a plain rubocop run reports no offenses whether or not this change is correct. REVEAL_RUBOCOP_TODO=1 is what makes the cop see it, which is why the pipeline cannot show this and a local run can.
- Confirm the cop is satisfied on this branch, which should report no offenses
REVEAL_RUBOCOP_TODO=1 bundle exec rubocop --only RSpec/FeatureCategory ee/spec/views/admin/application_settings/_git_abuse_rate_limit.html.haml_spec.rb- Confirm the new value is a real category, which should print the matching line
grep -x -- '- insider_threat' config/feature_categories.yml- Confirm the file still offends on
master, so the check above is meaningful. This should report the offense this MR removes
git show master:ee/spec/views/admin/application_settings/_git_abuse_rate_limit.html.haml_spec.rb | REVEAL_RUBOCOP_TODO=1 bundle exec rubocop --only RSpec/FeatureCategory --stdin ee/spec/views/admin/application_settings/_git_abuse_rate_limit.html.haml_spec.rbReferences
- Relates to #589138
- Feature categorization in RSpec examples: https://docs.gitlab.com/development/feature_categorization/#rspec-examples