1// Detects pinned function regions in vercel.json or per-route segment config.2// Provides the "configured region" signal for the region-misconfig gate when a TTFB3// breakdown by function_region isn't available (current state — see Phase 0 preflight4// in plans/wild-splashing-flamingo.md).5//6// Subtypes:7// vercel-json-single — vercel.json `regions: ["iad1"]` (single region, no failover)8// vercel-json-list — vercel.json `regions: [...]` (multi-region; informational)9// segment-preferred — `export const preferredRegion = 'iad1'` (or array)1011import { lineOf } from '../util.mjs';1213export const metadata
20 "vercel.json `regions` or per-route `preferredRegion` is set. If the pinned region is far from the dominant user geo (or far from a data source) p95 TTFB suffers. This scanner provides the configured-region signal so the region-misconfig gate can recommend an audit.",
21 fix:
22 "Audit the pinned region against traffic geography (Speed Insights or Web Analytics by country) and data-source location. Consider multi-region if data lives in a fixed location and users are global; consider relocating if users are concentrated in one geography.",