kovidgoyal/kitty · critical
The checksum was not received at the end of the delta data
Error message
The checksum was not received at the end of the delta data
What it means
FinishDelta requires a trailing checksum record in every delta stream. This error means the stream ended without the patcher having received its final checksum, so output integrity could not be verified.
Source
Thrown at tools/rsync/api.go:189
return err
}
self.unconsumed_delta_data = utils.ShiftLeft(self.unconsumed_delta_data, consumed)
return
}
// Finish applying delta data
func (self *Patcher) FinishDelta() (err error) {
if err = self.UpdateDelta([]byte{}); err != nil {
return err
}
if len(self.unconsumed_delta_data) > 0 {
return fmt.Errorf("There are %d leftover bytes in the delta", len(self.unconsumed_delta_data))
}
self.delta_input = nil
self.delta_output = nil
self.unconsumed_delta_data = nil
if !self.rsync.checksum_done {
return fmt.Errorf("The checksum was not received at the end of the delta data")
}
return
}
// Create a signature for the data source in src.
func (self *Patcher) CreateSignatureIterator(src io.Reader, output io.Writer) func() error {
var it func() (BlockHash, error)
finished := false
var b [BlockHashSize]byte
return func() error {
if finished {
return io.EOF
}
if it == nil { // write signature header
it = self.rsync.CreateSignatureIterator(src)
bin.PutUint16(b[:], 0)
bin.PutUint16(b[2:], uint16(self.Checksum_type))
bin.PutUint16(b[4:], uint16(self.Strong_hash_type))View on GitHub (pinned to 6d5d0c4406)
Solutions
- Confirm the sender's delta iterator ran to completion (its final checksum write included)
- Re-transfer the delta and apply again
- If generating deltas yourself, always emit the trailing checksum before finishing
Defensive patterns
Strategy: try-catch
Try / catch
if err := patcher.FinishDelta(); err != nil { do not trust output; restart transfer from a fresh signature } Prevention
- Never use patched output when FinishDelta errors — integrity is unverified
- Always let the sender flush the trailing checksum record
When it happens
Trigger: The delta was truncated before the final checksum operation, or a custom delta producer omitted the checksum terminator.
Common situations: Partial network transfer, a sender bug that doesn't emit the checksum, or calling FinishDelta before the last chunk arrived.
Related errors
- Invalid weak_hash in signature header: %d
- rsync signature header has zero block size
- rsync signature header has too large block size %d > %d
- There were %d leftover bytes in the signature data
- There are %d leftover bytes in the delta
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/ee298f1ce4fe60f8.
Report an issue: GitHub.