Repository navigation
Conversation
This was referenced Oct 25, 2026
This branch has not been 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.
Failure
After
backup.pystarts against a remote SocketBackend that is one uncommitted database write ahead,check_first_writeinvokesSocketBackend.rewind(). The socket server sends an ACK containing its resulting version, but the client discards that payload and retains its oldversionandprev_version.If the replacement write is interrupted before the server stores it,
add_change()reconnects and reads the correct rewound server version. It compares that version to the stale client baseline, raisesUnexpected backup version, and cannot retry the valid replacement. This is a backup availability/recovery bug during a real startup crash window; production incidence and funds exposure are not established.Change
Evidence and limits
A prospective source-level regression contract was recorded before editing. In an isolated Python transport-method replay using the inspected upstream
rewind,_request_metadata, andadd_changelogic, original handling failed after a successful rewind; with the candidate, both cases pass: (1) interrupted before server persistence and (2) server persisted but ACK was lost. A mismatched ACK is rejected and ordinary append bookkeeping remains correct.The PR includes 3 focused synthetic-transport pytest cases in
backup/test_socket_rewind.py. These and the full plugin test suite still require execution against the exact checked-out source; the isolated replay is not a full SocketServer/FileBackend, backup-cli, lightningd, durability or channel-recovery qualification. No production deployment or demonstrated funds loss. Please keep DRAFT pending native test and maintainer integration review.This is independent of submitted backup-file rewind #1018 and staged database restore #1019.