Fix stale references in feature flags doc #141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/feature-flags-doc-accuracy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Feature flags architecture doc had 3 stale references from before auth shipped. Fixes them so the doc matches current implementation before #130 work begins.
Changes
keycloak_loginflag from rake task and planned flags table — Keycloak login shipped ungated (PR #134), gating it retroactively makes no sensecurrent_user.admin?→current_user_has_role?("admin")—current_useris a session hash, not an ActiveRecord modelcurrent_user&.super_admin?→current_user_has_role?("super_admin")— same reasonTest Plan
Review Checklist
Related Notes
docs/feature-flags.mdis the spec that the #130 dev agent will readPR #141 Review
DOMAIN REVIEW
Tech stack: Ruby on Rails documentation (Markdown). No executable code changed -- doc-only diff touching
docs/feature-flags.md.Correctness of the three changes:
Removed
keycloak_loginfrom rake seed and planned flags table -- Correct. Keycloak login shipped ungated in PR #134. Retroactively gating an already-shipped feature makes no sense. Both removal sites (rake task array at former line 155, planned flags table at former line 453) are addressed.current_user.admin?tocurrent_user_has_role?("admin")(lines 117, 219) -- Correct. Verified inapp/controllers/application_controller.rb:current_userreturnssession[:user]&.with_indifferent_access(a hash), not an ActiveRecord model. The.admin?method does not exist on it.current_user_has_role?is the real helper (line 56 of ApplicationController).current_user&.super_admin?tocurrent_user_has_role?("super_admin")(line 274) -- Correct. Same reason. The safe navigation operator&.was also misleading --current_user_has_role?already handles the nil case internally (return false unless logged_in?).Completeness check: No remaining
current_user.admin?,current_user&.super_admin?, orkeycloak_loginreferences remain in the code examples after this diff. The doc reads coherently.BLOCKERS
None. This is a doc-only accuracy fix with no code impact.
NITS
Stale reference on line 12 -- The Philosophy section still lists "Keycloak login switchover (#115) -- external auth service swap" as an example of what gets flagged. This is now misleading: the PR removes
keycloak_loginfrom both the rake seed and the planned flags table specifically because Keycloak login shipped ungated. Keeping it as a "what gets flagged" example contradicts the decision. Consider either removing it or rewording to past tense (e.g., "Keycloak login switchover (#115) -- would have been flagged, but shipped ungated").PR self-references as its own issue -- The PR body says "Fixes #141" but #141 is this PR itself (Forgejo shares issue/PR numbering). There is no standalone issue for this fix. This is fine for a trivial doc fix, but worth noting.
Branch naming -- Branch is
fix/feature-flags-doc-accuracywhich uses slash-delimited prefix style rather than the{issue-number}-{kebab-case-purpose}convention. Minor for a doc-only fix with no backing issue.SOP COMPLIANCE
fix/feature-flags-doc-accuracydoes not follow{issue-number}-{kebab-case}convention (no backing issue exists)## Relatedsection with plan slugPROCESS OBSERVATIONS
Low-risk, high-value change. Fixing doc accuracy before the #130 implementation begins prevents the dev agent from writing code against stale examples. The three corrections are all verifiable against the actual codebase. Change failure risk is zero (no executable code).
VERDICT: APPROVED