Make LargeItemCache writes atomic#7081
Merged
Merged
Conversation
d9de11a to
8950dab
Compare
f6a5f8a to
ba68e41
Compare
ab9985b to
a45b5e7
Compare
ajpallares
approved these changes
Jun 25, 2026
Member
|
Maybe it's easier if this PR goes into main @rickvdl |
0e55d5e to
caff100
Compare
Member
Author
That's indeed easier, will update! |
a45b5e7 to
ad2dff3
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes 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 ad2dff3. Configure here.
ad2dff3 to
a8ed23f
Compare
Member
Author
|
@RCGitBot please test |
ajpallares
approved these changes
Jun 25, 2026
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.

Additional context can be found in this comment. But basically we wanted to have the additional safety of atomic writes when integrating the
LargeItemCachefor theRemoteConfigurationmanifest cache.Since
LargeItemCacheis already used throughout the SDK we wanted to extract this into it's own (tiny) PR for proper review.Note
Medium Risk
Changes signature verification and signed-payload derivation for remote config (security-sensitive), though behavior is heavily covered by tests; atomic file writes are a low-risk infrastructure tweak.
Overview
Adds remote config persistence via
RemoteConfigDiskCache(remote_config.jsonmanifest/topic blob refs) on top ofSynchronizedLargeItemCache, with read/write error logging.Enables response signature verification for
.remoteConfig(and keeps it for reward verification): a pluggableResponseSignatureContextProviderlets verification use endpoint-specific signed bytes and request-body inputs. Remote config signs the first RC Container element’s stored checksum (not the full body), omits the POST body from signature params, and treats 204 as a nil response message.RCContainer.ElementParsersupports parsing only that first element before full decode. Failures to build the signed payload are logged and counted as verification failures.getRemoteConfignow returnsRemoteConfigFetchResult(optionalRCContainer+VerificationResult) instead of a bare container. SharedFileManager.saveDatasync writes use.atomicfor safer overwrites (relevant to manifest cache).Tests cover disk cache, atomic overwrite, HTTP path flags, backend fetch results, and extensive remote-config signature scenarios (including 204 and enforced mode).
Reviewed by Cursor Bugbot for commit ad2dff3. Bugbot is set up for automated code reviews on this repo. Configure here.