Repository navigation
feat(feature-flags): add weighted variants and evaluation hook - #353
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. 🎉 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
Bundle size7 of 194 bundles changed.
Measured 22 packed archives separately; full report includes their compressed bytes without installed dependencies. |
Summary
Closes #342. Add optional weighted variants to existing flag types, validate JSON payloads and 100% totals, and preserve boolean evaluation responses.
Dashboard controls author variants, preview saved assignments, and show variant history. Docs cover the API, public payloads, additive database migration, cache behavior, and reassignment after weight edits. Registry output is regenerated.
Evidence
Packed consumer correction: the existing typed fixture now supplies
variants: []; the focused npm packed-consumer check passes typechecking, runtime and browser behavior. CI runs both package managers.Before: definitions and evaluations supported boolean eligibility only; no weighted authoring, assignment hook, or variant history.
After: weighted authoring and deterministic key/payload assignment work through the dashboard and public operations; existing boolean browser flow still passes.
21 unit tests passed; plugin typecheck/build and Biome passed. Targeted tests cover distribution, repeatability, identity precedence, zero weights, JSON validation, authorization, history/hooks, and server/client cache invalidation.
Both
smoke.feature-flags.spec.tsbrowser tests passed against an isolated generated Next.js app on port 3504, including a 390px long-payload regression. Full local suite and full registry install matrix were not run; CI owns those checks.Docs production build passed. Ejected Feature Flags registry files compile in the generated app; repeated registry generation matches committed output.
Captioned demo (MP4) · All screenshots and verification. All five demo frames inspected; mobile light/dark and keyboard focus verified with no page errors.
These evidence URLs require the owner's website login and LAN/private Tailscale access.
Merge Danger
Door: two-way
Adds the serialized
flag.variantsstring field, default[]; SQL adapters need an additive migration. Existing rows without variants deserialize as empty lists. Code rollback can leave the added column in place.Blast Radius: FeatureFlags
Payloads are public to evaluation clients. Editing variant keys, order, or weights can reassign subjects. Logs remain bounded and instance-local; other processes observe definition changes after their existing cache TTL.