Repository navigation
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
flag-overrides is the cookie of the standard. The SDK still reads vercel-flag-overrides, the cookie of v4. If both are set, flag-overrides wins, and the overrides of the two cookies are not merged. Co-Authored-By: Claude <noreply@anthropic.com>
dferber90
force-pushed
the
flag-overrides-cookie
branch
from
November 27, 2026 11:05
fdc2aab to
6cd50c4
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #654 (
v5-runtime). Before this PR, the SDK read the overrides only fromvercel-flag-overrides. Now it also readsflag-overrides, the cookie of the standard. These are the rules of north-star (SPEC "Overrides", andOVERRIDES_COOKIESinoverrides/reader.ts):flag-overridesfirst, thenvercel-flag-overrides(the cookie of v4).flag-overrideswins. A cookie contains one token, so the overrides of the two cookies are never merged.Changes
lib/overrides.ts: the newOVERRIDES_COOKIESandfindOverridesToken(cookies).runtime.ts:readOverridesof the request scope usesfindOverridesToken.flagand ofsignOverridesnames both cookies.flag.test.ts: the cookie mock returned an error for every cookie exceptvercel-flag-overrides. Now it returnsundefinedfor a missing cookie, as the cookies of Next.js do.Tests
flags: 325 tests pass.findOverridesToken.flag-overrides, and when both cookies are set, onlyflag-overridesapplies (no merge).🤖 Generated with Claude Code