Skip to content

feat: promote whole_file=1 when --checksum-choice=none - #4066

Merged
oferchen merged 2 commits into
masterfrom
feat/checksum-choice-none-whole-file-2139
May 14, 2026
Merged

oferchen merged 2 commits into
masterfrom
feat/checksum-choice-none-whole-file-2139

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Closes G1 from the compatibility-flags mutual-exclusion audit.

  • Adds StrongChecksumAlgorithm::None and accepts --checksum-choice=none (case-insensitive, also via --cc=none), forwarding the value to remote peers.

  • ClientConfigBuilder::build now promotes whole_file to Some(true) whenever checksum_choice.transfer_is_none(), mirroring upstream target/interop/upstream-src/rsync-3.4.1/checksum.c:197-198:

    if (xfer_sum_nni->num == CSUM_NONE)
        whole_file = 1;

    The assignment is unconditional upstream, so an explicit --no-whole-file is silently overridden. The delta pipeline cannot run without a transfer checksum, so whole-file is the only valid mode.

Refs #2139, #2140, #2141.

Test plan

  • cargo fmt --all clean.
  • CI: fmt + clippy.
  • CI: nextest covers new unit tests in crates/core/src/client/config/builder/tests.rs (checksum_choice_none_promotes_whole_file, checksum_choice_none_overrides_explicit_no_whole_file, checksum_choice_md5_leaves_whole_file_untouched) and crates/core/src/client/config/enums/checksum.rs (parse_none, transfer_is_none_false_for_other_algorithms).
  • CI: nextest covers new CLI integration tests in crates/cli/tests/option_combinations_flags.rs (test_checksum_choice_none_parses, test_checksum_choice_none_via_cc_alias).
  • CI: cross-platform matrix (Linux musl, macOS, Windows).
  • CI: interop suite confirms --checksum-choice=none round-trips against upstream rsync 3.4.1.

Diff scope

8 files, +146 / -29.

Mirrors upstream rsync 3.4.1 behaviour at checksum.c:197-198 where
parse_checksum_choice unconditionally sets whole_file = 1 when the
negotiated transfer checksum is CSUM_NONE. The delta algorithm cannot
run without a transfer checksum, so whole-file transfer is the only
valid mode.

Changes:
- Add StrongChecksumAlgorithm::None and accept `none` (case-insensitive)
  via --checksum-choice/--cc, forwarding it to the remote peer.
- ClientConfigBuilder::build now promotes whole_file to Some(true)
  whenever checksum_choice.transfer_is_none(); explicit --no-whole-file
  is silently overridden (matching upstream's unconditional assignment).
- Regression tests at the builder layer
  (checksum_choice_none_promotes_whole_file,
  checksum_choice_none_overrides_explicit_no_whole_file) and at the CLI
  parser layer (test_checksum_choice_none_parses, _via_cc_alias).
- Refresh the mutual-exclusion audit matrix and oc-rsync(1) man page so
  `none` is documented; mark G1 RESOLVED.

Closes #2139, #2140, #2141.
@github-actions github-actions Bot added the enhancement New feature or request label May 14, 2026
…e-none-whole-file-2139

# Conflicts:
#	docs/audits/compatibility-flags-mutual-exclusion-matrix.md
@oferchen
oferchen merged commit eeb2821 into master May 14, 2026
45 checks passed
oferchen added a commit that referenced this pull request May 16, 2026
Convert the compatibility-flags mutual-exclusion audit from a
current-state inventory into a historical record. Each gap row (G1-G4)
now cites the PR that landed the remediation:

- G1: --checksum-choice=none promotes whole_file=1 (PR #4066)
- G2: --inplace --partial-dir gated on CF_INPLACE_PARTIAL_DIR (PR #4064)
- G3: --append --whole-file rejected at config build time (PR #4049)
- G4: --delay-updates partial_dir promotion centralised (PR #4050)

Section 5 is replaced with a resolution-summary table. Footnotes [g]
and [j] are updated to describe the current behaviour and reference
the resolving PRs. The divergence descriptions are preserved so the
audit remains a record of the upstream-vs-oc-rsync conflict matrix
prior to remediation.

Refs: #2151, #2106
oferchen added a commit that referenced this pull request May 16, 2026
)

Convert the compatibility-flags mutual-exclusion audit from a
current-state inventory into a historical record. Each gap row (G1-G4)
now cites the PR that landed the remediation:

- G1: --checksum-choice=none promotes whole_file=1 (PR #4066)
- G2: --inplace --partial-dir gated on CF_INPLACE_PARTIAL_DIR (PR #4064)
- G3: --append --whole-file rejected at config build time (PR #4049)
- G4: --delay-updates partial_dir promotion centralised (PR #4050)

Section 5 is replaced with a resolution-summary table. Footnotes [g]
and [j] are updated to describe the current behaviour and reference
the resolving PRs. The divergence descriptions are preserved so the
audit remains a record of the upstream-vs-oc-rsync conflict matrix
prior to remediation.

Refs: #2151, #2106
@oferchen
oferchen deleted the feat/checksum-choice-none-whole-file-2139 branch May 16, 2026 19:50
oferchen added a commit that referenced this pull request May 18, 2026
Mirrors upstream rsync 3.4.1 behaviour at checksum.c:197-198 where
parse_checksum_choice unconditionally sets whole_file = 1 when the
negotiated transfer checksum is CSUM_NONE. The delta algorithm cannot
run without a transfer checksum, so whole-file transfer is the only
valid mode.

Changes:
- Add StrongChecksumAlgorithm::None and accept `none` (case-insensitive)
  via --checksum-choice/--cc, forwarding it to the remote peer.
- ClientConfigBuilder::build now promotes whole_file to Some(true)
  whenever checksum_choice.transfer_is_none(); explicit --no-whole-file
  is silently overridden (matching upstream's unconditional assignment).
- Regression tests at the builder layer
  (checksum_choice_none_promotes_whole_file,
  checksum_choice_none_overrides_explicit_no_whole_file) and at the CLI
  parser layer (test_checksum_choice_none_parses, _via_cc_alias).
- Refresh the mutual-exclusion audit matrix and oc-rsync(1) man page so
  `none` is documented; mark G1 RESOLVED.

Closes #2139, #2140, #2141.
oferchen added a commit that referenced this pull request May 18, 2026
)

Convert the compatibility-flags mutual-exclusion audit from a
current-state inventory into a historical record. Each gap row (G1-G4)
now cites the PR that landed the remediation:

- G1: --checksum-choice=none promotes whole_file=1 (PR #4066)
- G2: --inplace --partial-dir gated on CF_INPLACE_PARTIAL_DIR (PR #4064)
- G3: --append --whole-file rejected at config build time (PR #4049)
- G4: --delay-updates partial_dir promotion centralised (PR #4050)

Section 5 is replaced with a resolution-summary table. Footnotes [g]
and [j] are updated to describe the current behaviour and reference
the resolving PRs. The divergence descriptions are preserved so the
audit remains a record of the upstream-vs-oc-rsync conflict matrix
prior to remediation.

Refs: #2151, #2106
oferchen added a commit that referenced this pull request May 18, 2026
Mirrors upstream rsync 3.4.1 behaviour at checksum.c:197-198 where
parse_checksum_choice unconditionally sets whole_file = 1 when the
negotiated transfer checksum is CSUM_NONE. The delta algorithm cannot
run without a transfer checksum, so whole-file transfer is the only
valid mode.

Changes:
- Add StrongChecksumAlgorithm::None and accept `none` (case-insensitive)
  via --checksum-choice/--cc, forwarding it to the remote peer.
- ClientConfigBuilder::build now promotes whole_file to Some(true)
  whenever checksum_choice.transfer_is_none(); explicit --no-whole-file
  is silently overridden (matching upstream's unconditional assignment).
- Regression tests at the builder layer
  (checksum_choice_none_promotes_whole_file,
  checksum_choice_none_overrides_explicit_no_whole_file) and at the CLI
  parser layer (test_checksum_choice_none_parses, _via_cc_alias).
- Refresh the mutual-exclusion audit matrix and oc-rsync(1) man page so
  `none` is documented; mark G1 RESOLVED.

Closes #2139, #2140, #2141.
oferchen added a commit that referenced this pull request May 18, 2026
)

Convert the compatibility-flags mutual-exclusion audit from a
current-state inventory into a historical record. Each gap row (G1-G4)
now cites the PR that landed the remediation:

- G1: --checksum-choice=none promotes whole_file=1 (PR #4066)
- G2: --inplace --partial-dir gated on CF_INPLACE_PARTIAL_DIR (PR #4064)
- G3: --append --whole-file rejected at config build time (PR #4049)
- G4: --delay-updates partial_dir promotion centralised (PR #4050)

Section 5 is replaced with a resolution-summary table. Footnotes [g]
and [j] are updated to describe the current behaviour and reference
the resolving PRs. The divergence descriptions are preserved so the
audit remains a record of the upstream-vs-oc-rsync conflict matrix
prior to remediation.

Refs: #2151, #2106
oferchen added a commit that referenced this pull request Aug 24, 2026
Mirrors upstream rsync 3.4.1 behaviour at checksum.c:197-198 where
parse_checksum_choice unconditionally sets whole_file = 1 when the
negotiated transfer checksum is CSUM_NONE. The delta algorithm cannot
run without a transfer checksum, so whole-file transfer is the only
valid mode.

Changes:
- Add StrongChecksumAlgorithm::None and accept `none` (case-insensitive)
  via --checksum-choice/--cc, forwarding it to the remote peer.
- ClientConfigBuilder::build now promotes whole_file to Some(true)
  whenever checksum_choice.transfer_is_none(); explicit --no-whole-file
  is silently overridden (matching upstream's unconditional assignment).
- Regression tests at the builder layer
  (checksum_choice_none_promotes_whole_file,
  checksum_choice_none_overrides_explicit_no_whole_file) and at the CLI
  parser layer (test_checksum_choice_none_parses, _via_cc_alias).
- Refresh the mutual-exclusion audit matrix and oc-rsync(1) man page so
  `none` is documented; mark G1 RESOLVED.

Closes #2139, #2140, #2141.
oferchen added a commit that referenced this pull request Aug 24, 2026
)

Convert the compatibility-flags mutual-exclusion audit from a
current-state inventory into a historical record. Each gap row (G1-G4)
now cites the PR that landed the remediation:

- G1: --checksum-choice=none promotes whole_file=1 (PR #4066)
- G2: --inplace --partial-dir gated on CF_INPLACE_PARTIAL_DIR (PR #4064)
- G3: --append --whole-file rejected at config build time (PR #4049)
- G4: --delay-updates partial_dir promotion centralised (PR #4050)

Section 5 is replaced with a resolution-summary table. Footnotes [g]
and [j] are updated to describe the current behaviour and reference
the resolving PRs. The divergence descriptions are preserved so the
audit remains a record of the upstream-vs-oc-rsync conflict matrix
prior to remediation.

Refs: #2151, #2106
oferchen added a commit that referenced this pull request Aug 24, 2026
Mirrors upstream rsync 3.4.1 behaviour at checksum.c:197-198 where
parse_checksum_choice unconditionally sets whole_file = 1 when the
negotiated transfer checksum is CSUM_NONE. The delta algorithm cannot
run without a transfer checksum, so whole-file transfer is the only
valid mode.

Changes:
- Add StrongChecksumAlgorithm::None and accept `none` (case-insensitive)
  via --checksum-choice/--cc, forwarding it to the remote peer.
- ClientConfigBuilder::build now promotes whole_file to Some(true)
  whenever checksum_choice.transfer_is_none(); explicit --no-whole-file
  is silently overridden (matching upstream's unconditional assignment).
- Regression tests at the builder layer
  (checksum_choice_none_promotes_whole_file,
  checksum_choice_none_overrides_explicit_no_whole_file) and at the CLI
  parser layer (test_checksum_choice_none_parses, _via_cc_alias).
- Refresh the mutual-exclusion audit matrix and oc-rsync(1) man page so
  `none` is documented; mark G1 RESOLVED.

Closes #2139, #2140, #2141.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant