Skip to content

refactor: promote --delay-updates partial_dir at config build time - #4050

Merged
oferchen merged 1 commit into
masterfrom
feat/delay-updates-partial-dir-promote-2148
May 14, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/delay-updates-partial-dir-promote-2148

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Audit follow-up (tasks #2148 / #2149 / #2150): the --delay-updates
implicit partial_dir promotion to .~tmp~ previously lived in two
places - the LocalCopyOptions::delay_updates setter (engine struct)
and the LocalCopyOptionsBuilder::delay_updates setter. Once the
builder is the canonical construction path, the engine-layer promotion
is redundant and risks divergence if either copy drifts.

This change moves the rule into a single helper,
LocalCopyOptions::apply_delay_updates_partial_dir_default, and runs
it once as a finalisation step inside
LocalCopyOptionsBuilder::build_unchecked() so the promotion happens
deterministically before any engine code observes the options. The
builder setter is now a plain field setter.

The struct-level fluent setter continues to delegate to the same helper
so existing direct callers (engine integration tests) keep working
without churn.

upstream: options.c:2403 - if (delay_updates && !partial_dir) partial_dir = tmp_partialdir;

Test plan

  • CI: fmt + clippy
  • CI: nextest (stable) - Linux / macOS / Windows / musl
  • New builder tests delay_updates_finalisation_sets_default_partial_dir and delay_updates_finalisation_preserves_explicit_partial_dir pass
  • Existing delay_updates_enables_partial and the broader execute_delay_updates suite remain green

Centralise the `--delay-updates` implicit `partial_dir` promotion rule in
a single helper, `LocalCopyOptions::apply_delay_updates_partial_dir_default`,
and invoke it from `LocalCopyOptionsBuilder::build_unchecked()` as a
deterministic finalisation step. The builder setter no longer eagerly
promotes; the rule lives in one place and runs once before engine code
observes the options.

The struct-level `LocalCopyOptions::delay_updates` setter delegates to the
same helper to preserve the existing fluent-API behaviour relied on by
unit and integration tests.

upstream: options.c:2403 - `if (delay_updates && !partial_dir) partial_dir = tmp_partialdir;`
@oferchen
oferchen merged commit 6916b95 into master May 14, 2026
65 of 66 checks passed
@oferchen
oferchen deleted the feat/delay-updates-partial-dir-promote-2148 branch May 14, 2026 14:57
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 added a commit that referenced this pull request May 18, 2026
…4050)

Centralise the `--delay-updates` implicit `partial_dir` promotion rule in
a single helper, `LocalCopyOptions::apply_delay_updates_partial_dir_default`,
and invoke it from `LocalCopyOptionsBuilder::build_unchecked()` as a
deterministic finalisation step. The builder setter no longer eagerly
promotes; the rule lives in one place and runs once before engine code
observes the options.

The struct-level `LocalCopyOptions::delay_updates` setter delegates to the
same helper to preserve the existing fluent-API behaviour relied on by
unit and integration tests.

upstream: options.c:2403 - `if (delay_updates && !partial_dir) partial_dir = tmp_partialdir;`
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
…4050)

Centralise the `--delay-updates` implicit `partial_dir` promotion rule in
a single helper, `LocalCopyOptions::apply_delay_updates_partial_dir_default`,
and invoke it from `LocalCopyOptionsBuilder::build_unchecked()` as a
deterministic finalisation step. The builder setter no longer eagerly
promotes; the rule lives in one place and runs once before engine code
observes the options.

The struct-level `LocalCopyOptions::delay_updates` setter delegates to the
same helper to preserve the existing fluent-API behaviour relied on by
unit and integration tests.

upstream: options.c:2403 - `if (delay_updates && !partial_dir) partial_dir = tmp_partialdir;`
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
…4050)

Centralise the `--delay-updates` implicit `partial_dir` promotion rule in
a single helper, `LocalCopyOptions::apply_delay_updates_partial_dir_default`,
and invoke it from `LocalCopyOptionsBuilder::build_unchecked()` as a
deterministic finalisation step. The builder setter no longer eagerly
promotes; the rule lives in one place and runs once before engine code
observes the options.

The struct-level `LocalCopyOptions::delay_updates` setter delegates to the
same helper to preserve the existing fluent-API behaviour relied on by
unit and integration tests.

upstream: options.c:2403 - `if (delay_updates && !partial_dir) partial_dir = tmp_partialdir;`
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
…4050)

Centralise the `--delay-updates` implicit `partial_dir` promotion rule in
a single helper, `LocalCopyOptions::apply_delay_updates_partial_dir_default`,
and invoke it from `LocalCopyOptionsBuilder::build_unchecked()` as a
deterministic finalisation step. The builder setter no longer eagerly
promotes; the rule lives in one place and runs once before engine code
observes the options.

The struct-level `LocalCopyOptions::delay_updates` setter delegates to the
same helper to preserve the existing fluent-API behaviour relied on by
unit and integration tests.

upstream: options.c:2403 - `if (delay_updates && !partial_dir) partial_dir = tmp_partialdir;`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant