Immutable
release. Only release title and notes can be modified.
flags.tsreads Vercel Flags only in production. WhenVERCEL_ENV !== 'production',decidereturnsfalsewithout calling the adapter. Vercel Toolbar overrides andINTERACTIVE_REDESIGN=1work in every environment as before.- Production decisions are cached for 60 seconds per instance, keyed by entities. All anonymous visitors share one entry, so a page view's document, prefetches, and actions cost at most one read. Failed reads are not cached. The tradeoff is that a dashboard rule change can take up to a minute to show.
- An invalid
FLAGSvalue still can't 500 every page. Adapter construction is wrapped in a try/catch. A bad value is logged once and the flag falls back to its default. shouldSkipRedesignRewriteskips non-page paths before the flag is read: anything with a file extension (no page route has one) and anything underNEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH.MusicInfiniteScrollremembers a failed cursor and stops observing it instead of retrying every frame.auth/vercel/README.mdnotes that dashboard rules and Segments now apply only in production.
Before and after
| Surface | Before | After |
|---|---|---|
| Dev synthetic page view | 9 adapter decides, 18 outbound flags fetches | 0, 0 |
| Preview deployment | Every proxied request read the flags config | 0 reads |
Production /music visit |
6+ reads, plus analytics and vitals beacons | At most 1 per instance per 60s for anonymous visitors |
| Failed music page | A POST about every 16ms | 1 POST, then stops |
Verification
pnpm exec turbo check:ci check:types test: lint and types pass. The@dg/weband@dg/servicestest packages needDATABASE_URL_TEST, which the agent VM didn't have. With the DB global setup stubbed, all 266@dg/webtests pass, and the 5 skipped suites are the ones that need the database.- New tests:
flags.test.tscovers the non-production short-circuit, the TTL cache, not caching failures, and an invalidFLAGSvalue.proxy.test.tsandredesignRouting.test.tscover non-page paths.MusicInfiniteScroll.test.tsxhas a failure test, which fails on the old component. - In dev with
FLAGS=not-a-real-key,/.well-known/api-catalogreturns 200.