-
Notifications
You must be signed in to change notification settings - Fork 252
Closed
Labels
ai-generatedenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersplan
Description
Objective
Create a FeatureFlag type alias in the constants package to provide type safety and clearer intent for feature flag constants and function parameters.
Context
Feature flag constants like SafeInputsFeatureFlag are currently untyped strings. Adding a semantic type alias would:
- Provide compile-time type safety
- Make the API clearer
- Prevent typos and misuse
- Follow the pattern established by
LineLengthandVersiontypes
Implementation Steps
- Add type alias in
pkg/constants/constants.go:
// FeatureFlag represents a feature flag identifier
type FeatureFlag string- Update feature flag constant declarations:
const SafeInputsFeatureFlag FeatureFlag = "safe-inputs"
// Update other feature flag constants similarly- Update function signatures that accept feature flags to use the new type
- Grep for feature flag usage and update as needed:
grep -r "FeatureFlag" pkg/
Files to Modify
pkg/constants/constants.go- Add type alias and update constants- Functions that accept feature flags - Update parameter types
- Call sites - Ensure they use the typed constants
Acceptance Criteria
-
FeatureFlagtype alias defined - All feature flag constants use the new type
- Function signatures updated to accept
FeatureFlagtype - Code compiles without errors
- All tests pass (
make test) - Pattern documented for future feature flags
Estimated Effort
30 minutes
Priority
Very Low - Nice to have for consistency, minimal functional impact
Related to #6836
AI generated by Plan Command for discussion #6829
Reactions are currently unavailable
Metadata
Metadata
Labels
ai-generatedenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersplan