Skip to content

SC-10: progress reporting, transfer stats, verbose output - #12

Merged
iampryce merged 1 commit into
mainfrom
sc-10-progress-stats
Aug 1, 2026
Merged

SC-10: progress reporting, transfer stats, verbose output#12
iampryce merged 1 commit into
mainfrom
sc-10-progress-stats

Conversation

@iampryce

@iampryce iampryce commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

--progress via goroutine+buffered-channel reporter, non-blocking sends so a slow/absent consumer never stalls a transfer. Progress shown for the disk-write phase (chunked writes over 256KiB), not network transfer

  • a disclosed scope boundary, since ApplyDelta's delta frames arrive atomically per file with no observable partial-transfer point in the current architecture. Output format matches real rsync's man-page examples line-for-line.

--stats end-of-sync summary matching real rsync's field names/ structure, with the speedup ratio formula verified against rsync's actual main.c source, not just man-page prose. -v confirmed already correct from SC-11, no reimplementation needed.

Threaded through all transports (local, SSH, daemon GET/PUT) reusing SC-11's exact dryRun/itemize pattern.

Three bugs found in self-review:

  • Reporting() broadening leaked verbose-style lines when only --stats/--progress was requested without -v/-i
  • formatDuration omitted the hours component at zero, contradicting the man page's own examples
  • A new empty file was miscounted as unchanged in stats, since bytes.Equal(nil, nil) == true - fixed with a separate transferred check distinct from contentChanged

Clean on native Windows and cross-compiled Linux.

--progress via goroutine+buffered-channel reporter, non-blocking sends
so a slow/absent consumer never stalls a transfer. Progress shown for
the disk-write phase (chunked writes over 256KiB), not network transfer
- a disclosed scope boundary, since ApplyDelta's delta frames arrive
atomically per file with no observable partial-transfer point in the
current architecture. Output format matches real rsync's man-page
examples line-for-line.

--stats end-of-sync summary matching real rsync's field names/
structure, with the speedup ratio formula verified against rsync's
actual main.c source, not just man-page prose. -v confirmed already
correct from SC-11, no reimplementation needed.

Threaded through all transports (local, SSH, daemon GET/PUT) reusing
SC-11's exact dryRun/itemize pattern.

Three bugs found in self-review:
- Reporting() broadening leaked verbose-style lines when only
  --stats/--progress was requested without -v/-i
- formatDuration omitted the hours component at zero, contradicting the
  man page's own examples
- A new empty file was miscounted as unchanged in stats, since
  bytes.Equal(nil, nil) == true - fixed with a separate transferred
  check distinct from contentChanged

Clean on native Windows and cross-compiled Linux.
@iampryce
iampryce requested a review from jasonmiller-cc August 1, 2026 18:56
@iampryce
iampryce merged commit 969d0ec into main Aug 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant