Provide guidance to discourage use of shared and not_owned feature categories
Summary
We should provide clear guidance discouraging the use of shared and not_owned feature categories, as these create ownership gaps and make it difficult to properly triage and prioritize work.
Problem Statement
Currently, the codebase allows and documents the use of shared and not_owned feature categories:
-
:shared- Used for gems/code used across different product groups (e.g.,rails) -
:not_owned- Used for code that cannot be tied to a specific feature category (e.g., some admin sections, cross-cutting concerns)
However, according to our handbook guidance on shared responsibility issues:
Shared responsibility is no responsibility. When multiple teams share responsibility for an issue, it often means no team takes ownership, leading to the issue being deprioritized or ignored.
The use of shared and not_owned feature categories creates exactly this problem:
- Lack of clear ownership - No single team is responsible for maintenance, bug fixes, or improvements
- Difficulty in triage - Issues cannot be properly routed to the right team
- Accumulation of technical debt - Code without clear owners tends to accumulate problems over time
- Support escalation confusion - Support tickets get shuffled between teams (as noted in #577893 (closed))
- Code review challenges - Reviewer Roulette cannot assign appropriate reviewers
Current State
From the feature categorization documentation:
Shared category usage:
# For gems that are used across different product groups we use
# feature_category: :shared. For example, `rails` is used through out the
# application and it's shared with multiple groups.
Not_owned category usage:
class SomeCrossCuttingConcernWorker
include ApplicationWorker
# Declares that this worker does not map to a feature category
feature_category :not_owned # rubocop:disable Gitlab/AvoidFeatureCategoryNotOwned
end
Note that :not_owned already requires a RuboCop disable comment, suggesting we recognize this as problematic.
Proposal
We should update our documentation to:
-
Explicitly discourage the use of
sharedandnot_ownedfeature categories -
Provide guidance on how to assign proper ownership instead:
- For cross-cutting concerns: Assign to the team that uses it most frequently or would be most impacted by issues
- For shared infrastructure: Assign to the team responsible for the underlying platform (e.g., Database, Scalability)
- For admin functionality: Assign based on the specific feature area (e.g., admin user management → Authentication & Authorization)
- Document the process for determining ownership when it's unclear
-
Create a migration plan for existing
sharedandnot_ownedcode to be assigned to specific teams
Recommended approach for unclear ownership:
When ownership is unclear, follow this decision tree:
-
Search existing usages, Controllers, API endpoints have
feature_category. The bounded context (config/bounded_contexts.yml) will also have relatedfeature_categories. - Which team would be most impacted if this broke? → Assign to that team
- Which team has the most domain expertise? → Assign to that team
- Which team touches this code most frequently? → Assign to that team
- Is this truly cross-cutting? → Assign to the platform/infrastructure team that owns the underlying layer
Benefits
- Improved accountability - Every piece of code has a clear owner
- Better triage - Issues can be properly routed and prioritized
- Reduced technical debt - Owned code gets maintained, e.g. #547252
- Clearer escalation paths - Support knows who to contact
- Better code review - Appropriate domain experts are assigned
Related Issues
- #577893 (closed) - Post-Reorganization Cleanup and Ownership Mapping (identified "Shared" or "not owned" categories as causing responsibility gaps)
- #216110 (closed) - DRI for "not_owned" category (attempted to find ownership for not_owned items)
Documentation to Update
-
Feature Categorization documentation - Add section discouraging
sharedandnot_owned, especially in https://docs.gitlab.com/development/feature_categorization/#shared-feature-category. - Feature Categorization documentation - Add decision tree for determining ownership
- RSpec feature category guidelines - Strengthen guidance against these categories
Acceptance Criteria
-
Documentation clearly states that
sharedandnot_ownedshould be avoided - Guidance is provided on how to determine proper ownership
-
Process is documented for migrating existing
shared/not_ownedcode - Examples are updated to show proper ownership assignment