Skip to content

fix: honour --update and --dry-run flags in daemon receiver - #2576

Merged
oferchen merged 3 commits into
masterfrom
feat/interop-quick-fixes
Mar 8, 2026
Merged

oferchen merged 3 commits into
masterfrom
feat/interop-quick-fixes

Conversation

@oferchen

@oferchen oferchen commented Mar 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add dest_mtime_newer() helper to compare destination vs source mtime, used by --update (-u) to skip files where the destination is already newer (upstream: generator.c:1709)
  • Skip all filesystem modifications in dry-run mode (-n): directory creation, symlink creation, hardlink creation, and file transfers (upstream: receiver.c:693)
  • Remove up:update and up:dry-run from KNOWN_FAILURES in interop test registry

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy -p transfer --all-features --no-deps passes clean
  • 80 flag-related unit tests pass
  • 4 quick-check/update unit tests pass
  • CI interop tests pass with up:update and up:dry-run no longer in KNOWN_FAILURES

- Add dest_mtime_newer() helper to compare destination vs source mtime
- Skip files with newer dest timestamps when update flag is set
  (upstream: generator.c:1709)
- Skip all filesystem modifications in dry-run mode: directory creation,
  symlink creation, hardlink creation, and file transfers
  (upstream: receiver.c:693)
- Remove up:update and up:dry-run from KNOWN_FAILURES
@github-actions github-actions Bot added the bug Something isn't working label Mar 8, 2026
oferchen added 2 commits March 8, 2026 08:54
Add backup file creation (--backup) to the receiver's file write path.
Before renaming a temp file to its destination, the receiver now renames
the existing destination to a backup path (default suffix '~'), mirroring
upstream backup.c:make_backup().

- Export compute_backup_path() from engine crate for shared path logic
- Add BackupConfig and make_backup() helper in disk_commit.rs
- Wire backup into both pipelined (disk_commit) and sync transfer paths
- Remove up:backup from KNOWN_FAILURES (17 remaining)
Upstream rsync sends backup as compact flag 'b' in the server args
string (options.c:2613), but our parse_transfer_flag() was missing
this case. This caused up:backup interop failures since the backup
flag was never set when receiving from upstream.
@oferchen
oferchen merged commit c56ce49 into master Mar 8, 2026
36 of 37 checks passed
@oferchen
oferchen deleted the feat/interop-quick-fixes branch March 8, 2026 09:54
oferchen added a commit that referenced this pull request May 1, 2026
* fix: honour --update and --dry-run flags in daemon receiver

- Add dest_mtime_newer() helper to compare destination vs source mtime
- Skip files with newer dest timestamps when update flag is set
  (upstream: generator.c:1709)
- Skip all filesystem modifications in dry-run mode: directory creation,
  symlink creation, hardlink creation, and file transfers
  (upstream: receiver.c:693)
- Remove up:update and up:dry-run from KNOWN_FAILURES

* fix: create backup files before overwriting in receiver

Add backup file creation (--backup) to the receiver's file write path.
Before renaming a temp file to its destination, the receiver now renames
the existing destination to a backup path (default suffix '~'), mirroring
upstream backup.c:make_backup().

- Export compute_backup_path() from engine crate for shared path logic
- Add BackupConfig and make_backup() helper in disk_commit.rs
- Wire backup into both pipelined (disk_commit) and sync transfer paths
- Remove up:backup from KNOWN_FAILURES (17 remaining)

* fix: handle backup 'b' compact flag from upstream rsync

Upstream rsync sends backup as compact flag 'b' in the server args
string (options.c:2613), but our parse_transfer_flag() was missing
this case. This caused up:backup interop failures since the backup
flag was never set when receiving from upstream.
oferchen added a commit that referenced this pull request May 5, 2026
* fix: honour --update and --dry-run flags in daemon receiver

- Add dest_mtime_newer() helper to compare destination vs source mtime
- Skip files with newer dest timestamps when update flag is set
  (upstream: generator.c:1709)
- Skip all filesystem modifications in dry-run mode: directory creation,
  symlink creation, hardlink creation, and file transfers
  (upstream: receiver.c:693)
- Remove up:update and up:dry-run from KNOWN_FAILURES

* fix: create backup files before overwriting in receiver

Add backup file creation (--backup) to the receiver's file write path.
Before renaming a temp file to its destination, the receiver now renames
the existing destination to a backup path (default suffix '~'), mirroring
upstream backup.c:make_backup().

- Export compute_backup_path() from engine crate for shared path logic
- Add BackupConfig and make_backup() helper in disk_commit.rs
- Wire backup into both pipelined (disk_commit) and sync transfer paths
- Remove up:backup from KNOWN_FAILURES (17 remaining)

* fix: handle backup 'b' compact flag from upstream rsync

Upstream rsync sends backup as compact flag 'b' in the server args
string (options.c:2613), but our parse_transfer_flag() was missing
this case. This caused up:backup interop failures since the backup
flag was never set when receiving from upstream.
oferchen added a commit that referenced this pull request May 21, 2026
…PIP-3+5 wire-up (#4677)

Combined closure note covering three trackers whose deliverables have
already shipped or were absorbed into existing design surface:

- PIP-2 (#2565): the design doc was supposed to describe the
  token_loop -> ParallelDeltaApplier migration. That document already
  exists as docs/design/parallel-receive-delta-default-on.md
  (shipped in PR #4319 scaffold, extended by PR #4666 default-on
  flip). Marked completed retroactively.
- FFB-3 (#2576): conditional task that only activated if FFB-1 chose
  Option A or B. FFB-1 (PR #4659) chose Option D - barrier baked into
  finish_file - so every existing caller already gets the barrier
  without callsite migration. Marked deferred N-A.
- FFB-4 (#2577): explicit flush_workers call at the PIP-3 wire-up
  site. PIP-3 + PIP-5 (PR #4666 merged) routes through finish_file,
  which already barriers via Option D. No explicit call needed.
  Marked satisfied-by-design.

Note: FFB-2 implementation (PR #4665, in CI) needed a spin-then-yield
fix around finish_file's try_unwrap to close a Windows release-race;
future work to restructure DecrementGuard would be FFB-5+ if filed.

No source changes.
oferchen added a commit that referenced this pull request Aug 24, 2026
…PIP-3+5 wire-up (#4677)

Combined closure note covering three trackers whose deliverables have
already shipped or were absorbed into existing design surface:

- PIP-2 (#2565): the design doc was supposed to describe the
  token_loop -> ParallelDeltaApplier migration. That document already
  exists as docs/design/parallel-receive-delta-default-on.md
  (shipped in PR #4319 scaffold, extended by PR #4666 default-on
  flip). Marked completed retroactively.
- FFB-3 (#2576): conditional task that only activated if FFB-1 chose
  Option A or B. FFB-1 (PR #4659) chose Option D - barrier baked into
  finish_file - so every existing caller already gets the barrier
  without callsite migration. Marked deferred N-A.
- FFB-4 (#2577): explicit flush_workers call at the PIP-3 wire-up
  site. PIP-3 + PIP-5 (PR #4666 merged) routes through finish_file,
  which already barriers via Option D. No explicit call needed.
  Marked satisfied-by-design.

Note: FFB-2 implementation (PR #4665, in CI) needed a spin-then-yield
fix around finish_file's try_unwrap to close a Windows release-race;
future work to restructure DecrementGuard would be FFB-5+ if filed.

No source changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant