Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
When a stream disconnects or an update fails, keep serving the last accepted flag definitions for
staleIfErrorMsafter that first failure. A healthy stream can receive no new configuration all day and still get its full grace period when it disconnects.The controller keeps its existing cache and one
unhealthySincetimestamp. Repeated failures leave the timestamp unchanged; accepted updates and successful confirmations clear it. Streaming and polling reads only inspect the cache and grace period, without triggering extra polls or waiting for reconnection. After grace expires, evaluations use supplied defaults or throw, andgetDatafile()throws.Stacked on #498, targeting
flags-version-headeratea4d7de63567a232c27295ff048541c65b644530.staleIfErrorMsdefaults toInfinity; finite values measure milliseconds from the first failure/disconnect, and zero disables error fallback. Grace does not depend onfetchedAtor extend SWR. Provided/bundled definitions qualify even without a timestamp.staleWhileRevalidateMsretains its 10,000 ms default. Header reads share transport and background handling, validate each request's required version, and use the same error grace after a refresh failure. A satisfied reader is independent of a concurrent reader's version failure.Validation: 637 core tests across 17 files (live integration tests excluded), including 27 outage-grace public-API cases; 24 embedding tests; both package type checks; Biome for changed TypeScript and
git diff --check. Reviewed grace boundaries, repeated failures, recovery, concurrency and shutdown; no remaining substantive findings.Remaining transport limits: no automatic header catch-up/retry loop; later requests can retry. Stream reconnection stays in the existing transport, and cancellation depends on transport settlement. No new retry/backoff/deadline machinery is introduced.