Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
luismeyer
added this pull request to stack #512
September 23, 2026 08:05
luismeyer
commented
Sep 23, 2026
luismeyer
commented
Sep 23, 2026
luismeyer
commented
Sep 23, 2026
luismeyer
commented
Sep 23, 2026
luismeyer
commented
Sep 23, 2026
luismeyer
commented
Sep 23, 2026
luismeyer
commented
Sep 23, 2026
luismeyer
commented
Sep 23, 2026
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 #510.
Adds header-driven reads on Vercel, enabled by default when
VERCEL=1. Initialization loads provided or bundled definitions before selecting Vercel mode. Request headers identify newer configuration; an empty cache fetches on its first read.getDatafile()remains a snapshot read without header checks.The controller wires one source
getStatuscallback (fresh,stale,expired, orunknown) and an optionalfetchcallback into the shared cache. HeaderSource parses request timestamps and tracks the highest observed timestamp. The cache owns age, serving decisions, shared fetches, background work, cancellation, and stale-if-error.resolveDataWithFallbacks(), preserving the current cache before considering provided/bundled definitions. Concurrent reads share only pending startup work, and pending header refreshes are cancelled without losing cached data or resetting the failure deadline. Later headers do not switch the client back. Present malformed/unrelated headers retain cached-read behavior, subject to stale-if-error.fetchedAtinitializes age and remains the actual fetch timestamp; confirmations never rewrite it.primedor a datafile before pings. A later disconnect starts a new allowance.staleWhileRevalidatedefaults to 10 seconds andstaleIfErrorto Infinity. Public inputs use seconds, including fractions; zero disables the corresponding stale allowance.fetchedAt.Validation: 880 core package tests passed (19 suites; live-service integration suite excluded), TypeScript passed, and Biome passed on all TypeScript files changed since the previous push. Coverage includes freshness boundaries, confirmation without replacement, request isolation, shared/cancelled fetches, permanent stream/poll fallback, shutdown during startup, ping recovery, consecutive outage deadlines, retained cache data after startup timeout, and retry after failed fallback.