Repository navigation
Log safe lastFailure fields when a CloudSync round fails - #8103
Merged
fastrepl-repo-automation[bot] merged 3 commits intoOct 21, 2026
Merged
Conversation
"CloudSync failed" logged only the error kind. A send carrying a server-reported lastFailure (an unclassified JSON payload) always showed as error_kind=Fatal with no clue why, so a two-minute burst of failures during a backlog upload on a user's Mac could not be diagnosed. Log code, stage, retryable and failedAt from the send and receive lastFailure. Only scalar values are kept, strings are capped at 64 characters, and the message, job ID and the full error string stay out of the log since they can carry server text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
🔍 Devin Review: 1 security issue
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
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
Intent: Explain failed CloudSync rounds without copying server-provided text into logs or telemetry.
Log only explicitly allowed failure codes (apply_conflict, check_failed), stages (apply, check), and a boolean retry flag. Unknown strings become unknown; timestamps, messages, identifiers, and malformed values are omitted. Truncating text is not a privacy boundary.
Recovery warnings now retain phase and generation without the error body. Sync test diagnostics retain counts, known statuses, and failure presence without server text.
Demo
N/A — diagnostic logging only; sync behavior and local error state are unchanged.
Verification