Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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
A device that bootstraps (has read nothing yet) took the newest snapshot of each link, and if one of that snapshot's blobs was missing or didn't verify or decrypt, the whole sync run failed and kept failing. spec/protocol.md "Reading a link from its snapshot" says to take the newest snapshot it can open, and store.md "Contain one bad item" says one bad item shouldn't stop the rest.
Session.bootstrapnow collects every covering snapshot manifest of each wanted link. It tries them newest first and keeps the first whose blobs, epoch key andvvhashes all open. A link with no usable snapshot is treated like a link with no snapshot (read from each log's first object, as before), and when no link has one, bootstrap returns null as before. Network errors still fail the run.Cost: bootstrap now verifies every log object it holds to find the older manifests, instead of stopping at the newest one per link. This happens once per new device.
No user-visible change worth a nightly note (it removes a sync failure that needed a corrupted store).
Related issue
None.
Change type
Validation
SnapshotsTest.a_new_device_falls_back_to_an_older_snapshot_when_a_blob_is_bad:It failed before the fix (
ProtocolException at SnapshotsTest.kt:182, withapp/src/mainstashed) and passes after../gradlew --offline -Dorg.gradle.jvmargs="..." :app:testGithubDebugUnitTest(full suite): 4876 tests, 0 failures, 46 skipped../gradlew --offline ... ktlintCheck: exit 0../gradlew :app:assembleGithubDebug: not run separately (the test task compiled the github debug sources).Test device and Android version: none yet.
Risk and compatibility
Bootstrap only. When the newest snapshot opens, the result is the same as before.