Repository navigation
feat: Add the FDv2 cache initializer and per-context freshness to the client - #613
Merged
beekld merged 5 commits intoOct 5, 2026
Conversation
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
from
September 15, 2026 00:32
e05b5ed to
db55b09
Compare
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
from
September 16, 2026 20:19
db55b09 to
d2cdc4e
Compare
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
2 times, most recently
from
September 16, 2026 21:25
bd219dc to
e78670c
Compare
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
from
September 17, 2026 00:03
e78670c to
20d58d0
Compare
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
2 times, most recently
from
September 17, 2026 23:33
6146cea to
44884f9
Compare
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
from
September 24, 2026 21:15
44884f9 to
d675917
Compare
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
from
September 24, 2026 21:30
d675917 to
eb8ad4a
Compare
beekld
marked this pull request as ready for review
September 25, 2026 16:59
beekld
added this pull request to stack #608
September 25, 2026 17:01
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fc7d735. Configure here.
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
from
September 26, 2026 05:54
fc7d735 to
60b04ea
Compare
kinyoklion
approved these changes
Sep 29, 2026
kinyoklion
left a comment
Member
There was a problem hiding this comment.
Not directly related to this PR, but it seems like ValueAsOpt may need some hardening.
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
from
October 2, 2026 23:36
60b04ea to
a1f1bec
Compare
beekld
removed this pull request from stack #608
October 3, 2026 01:24
beekld
force-pushed
the
bklimt/SDK-3033/client-fdv2-cache-initializer
branch
from
October 5, 2026 18:00
14273b6 to
f45dfd4
Compare
beekld
added this pull request to stack #627
October 5, 2026 18:00
beekld
removed this pull request from stack #627
October 5, 2026 18:05
beekld
added this pull request to stack #628
October 5, 2026 18:10
beekld
removed this pull request from stack #628
October 5, 2026 19:18
beekld
added this pull request to stack #629
October 5, 2026 19:24
Contributor
Author
I filed a task to follow up on this. |
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.

Summary
Adds an FDv2 cache initializer so the client can begin evaluating from its local per-context cache before the network responds, and tracks how fresh each context's cached data is.
Design note: this client persists a per-context freshness timestamp keyed by a hash of the full context, matching Android. Flutter's FDv2 freshness is different -- an in-memory, per-synchronizer timestamp that is neither persisted nor keyed by context.
Internal only. Not user-selectable yet.
Note
Overview
Adds an FDv2 cache initializer so startup can apply locally persisted flags before the network responds. A cache hit yields a full changeset without a selector (so deltas cannot treat unverified cache as a basis); a miss yields a none intent and the initializer chain continues. Cache-sourced applies are marked
from_cacheand are not written back or treated as service-confirmed.Flag persistence now exposes
ReadCached/ReadFreshness, records per-context freshness (hashed full context attributes) when the service sends a payload or a none confirmation, prunes freshness with LRU limits, and refuses to report freshness after flag data is evicted or overwritten under the same canonical key.FlagManager::Cache()exposes the persistence layer for the initializer.Tests cover cache hit/miss behavior, freshness semantics, and eviction edge cases.
Reviewed by Cursor Bugbot for commit f45dfd4. Bugbot is set up for automated code reviews on this repo. Configure here.