fix(flags): validate persisted route-gate values - #3351
Chris0Jeky wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9246b97441
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
7920993 to
e880496
Compare
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
e880496 to
48e325a
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48e325a4e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7668a30398
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
8161b04 to
ca7ade3
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
ca7ade3 to
a0cbf1c
Compare
Closes #3350.
Summary
Hardens the local feature-flag persistence boundary used during app startup, router gating and Profile Settings:
setFlagorresetAllresult;restore()calls;isEnabled()andallEnabledremain strictly boolean over declared flags.The storage key, public store API, defaults, valid payload behavior, router contract and settings UI remain unchanged. Feature flags remain local presentation/developer preferences, not a server authorization boundary.
Test-first evidence
Test-only head
a22c2acaa96a0db4736af0a56646687f15897307ran canonical Node 24 qualification. Ubuntu lint, typecheck, production build and PWA validation passed before JUnit recorded 7,158 tests, exactly 6 failures, 0 errors, exclusively the intended shape/storage-boundary cases. Initial corrected head9246b9744174b76b0b0418b1929d443b54bd154bthen passed Self-Test, Extended and the complete Required CI matrix.Fresh Codex review found that a failed write could leave an older payload readable, allowing a later route-triggered
restore()to silently revert the in-memory choice. Test-only headb49fccaf90e17d8a11ae8280a09f04088a1f0890adds regressions for both unsavedsetFlagand unsavedresetAll.A dependency-free runner transpiled and executed the actual production module:
setFlag(false)survived the write exception, thenrestore()reloaded staletrue;Supplemental execution does not replace hosted qualification.
Current head and remaining gates
Exact final head:
faac2a9ab22470b136197f8b3259a3e6f73e0fd4Keep draft until this exact head passes Smart CI, Extended and the complete Required CI matrix on Ubuntu and Windows, then receives repeat independent review. The Codex stale-restore thread remains unresolved until that evidence exists.
No backend, API, DTO, schema, migration, dependency, workflow or control-plane change. Green CI is qualification evidence, not merge authorization.