Review: Implement FeatureFlag model, rake task, super admin UI, and helpers
Verdict: READY
Re-review after refinements. Previous review (same slug, rev 1) returned NEEDS_REFINEMENT with 4 items. Items 1-2 were deferred as systemic; items 3-4 are now fixed. No new issues found.
Previous Findings Disposition
- [DEFERRED] story:auth user story missing from project-landscaping-assistant -- Systemic gap affecting many tickets, not #130-specific. Will be tracked separately.
- [DEFERRED] arch-rails-app note missing from pal-e-docs -- Systemic gap affecting many tickets, not #130-specific. Will be tracked separately.
- [x] SolidCache claim fixed -- Technical Notes now correctly state: "Rails.cache defaults to :file_store in production (SolidCache gem is in Gemfile but not configured -- cache_store is commented out, no solid_cache.yml)." Verified: production.rb has
config.cache_store = :mem_cache_storecommented out, noconfig/solid_cache.ymlexists, gem is in Gemfile but unconfigured. - [x] Issue reopened -- Forgejo issue #130 state is now
open(updated_at: 2026-06-07T02:15:18Z).
Template Completeness
- [x] Type -- Feature
- [x] Lineage -- References spike #129 and architecture doc
- [x] Repo -- ldraney/landscaping-assistant
- [x] User Story -- Present and well-formed
- [x] Context -- Thorough, includes current auth state with session hash detail
- [x] File Targets -- Detailed, split into create/modify
- [x] Acceptance Criteria -- 18 criteria across 5 groups (Model+Migration, Helpers, Rake Task, Super Admin UI, Tests)
- [x] Technical Notes -- Present with corrected cache store info and important caveats
- [x] Out of Scope -- Clearly enumerated (5 items)
- [x] Constraints -- CSS guide and no-Tailwind constraints stated
- [x] Enforcement -- Post-merge workflow for adding new flags documented
- [x] Checklist -- Present
- [x] Related -- Comprehensive cross-references (#129, #140, #125, #123, #107, #2)
Traceability
- [x] story:auth label -- Present on board item #1354
- [DEFERRED] story note -- No "auth" entry in project-landscaping-assistant user-stories section. Systemic gap, not blocking this ticket.
- [x] arch:rails-app label -- Present on board item #1354
- [DEFERRED] arch note -- No arch-rails-app note in pal-e-docs. Systemic gap, not blocking this ticket.
- [x] Forgejo issue -- ldraney/landscaping-assistant#130, state: open
File Targets
Files to create (all correctly do not exist yet):
- [x]
db/migrate/YYYYMMDD_create_feature_flags.rb-- no feature_flags migration exists - [x]
app/models/feature_flag.rb-- does not exist, no FeatureFlag references in codebase - [x]
app/controllers/platform/feature_flags_controller.rb-- platform/ directory does not exist yet - [x]
app/views/platform/feature_flags/index.html.erb-- platform/ view directory does not exist yet - [x]
lib/tasks/feature_flags.rake-- lib/tasks/ exists but empty - [x]
spec/support/feature_flags.rb-- spec/support/ exists with omniauth.rb only - [x]
spec/models/feature_flag_spec.rb-- spec/models/ exists, no feature_flag_spec - [x]
spec/requests/platform/feature_flags_spec.rb-- spec/requests/ exists, no platform/ subdirectory - [x]
spec/requests/feature_flag_gating_spec.rb-- does not exist
Files to modify (all verified):
- [x]
app/controllers/application_controller.rb-- exists, hashelper_method(line 8),current_user_has_role?(line 56), TAB_ROLES with super_admin (lines 73-78) - [x]
config/routes.rb-- exists, no platform namespace yet - [x]
app/views/layouts/application.html.erb-- exists, Person icon at nav slot 3 - [x]
app/assets/stylesheets/application.css-- exists
Repo Placement
Correct. All file targets are within ldraney/landscaping-assistant. Deploy initContainer change correctly tracked separately in #140 (pal-e-deployments).
Dependencies
- Upstream: Spike #129 (done), Auth/roles #107 (done). All prerequisites met.
- Downstream: #140 (deploy initContainer), #125 (Stripe), #123 (Client requests) -- all correctly documented in Related/Out of Scope.
Acceptance Criteria
18 criteria across 5 groups, all verifiable. Architecture doc at docs/feature-flags.md provides complete code snippets for every component. Two implementation notes from previous review remain relevant for the implementer:
- Person icon Platform link: follow docs/feature-flags.md pattern (third view option under Person icon)
- Test cache: test.rb uses :null_store, so cache model spec needs :memory_store swap or key-generation testing
Blast Radius
Greenfield feature. No existing code references FeatureFlag. Platform namespace is new and isolated.
feature_enabled? helper on ApplicationController is intentionally global. require_super_admin returning 404 (vs require_role's redirect) is an intentional design choice documented in the ticket.Decomposition Assessment
13 file touches, 18 AC, single repo. Architecture doc provides complete implementation guide with code snippets. No decomposition needed -- the doc reduces effective complexity to a guided implementation pass.
Recommendations
No action needed. All fixable items from previous review have been resolved. Deferred items (story note, arch note) are systemic and tracked separately.