Skip to content

feat(progress): overflow sentinel and ir-chk prefix (D9/D10 parity)#4094

Merged
oferchen merged 3 commits into
masterfrom
feat/progress-overflow-sentinel-ir-chk-2203
May 15, 2026
Merged

feat(progress): overflow sentinel and ir-chk prefix (D9/D10 parity)#4094
oferchen merged 3 commits into
masterfrom
feat/progress-overflow-sentinel-ir-chk-2203

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

Close two upstream-parity gaps in --progress rendering:

  • Time overflow sentinel (Align xtask test command targets #2203): verify the ??:??:?? placeholder rendered by RemainingTimeEstimator::render is byte-for-byte equivalent to upstream's " ??:??:??" after the 10-wide right-aligned field padding applied at the call sites. Confirm the rate field has no overflow sentinel upstream (progress.c:108-116 only scales units up to GB/s, no placeholder), and document this in tests. Add boundary tests around the 9999 * 3600-second clamp.
  • ir-chk chk-prefix (Align --server fallback role handling #2204): plumb flist_eof through TransferProgressEvent and ClientProgressUpdate so the per-file trailer switches between to-chk=A/B and ir-chk=A/B, matching upstream's flist_eof ? "to" : "ir" selection (progress.c:79-82). The sender plumbs the live generator state (self.incremental.flist_eof_sent); the receiver and the local-copy forwarder set true because they collect the full file list before emitting progress events.

Closes #2203
Closes #2204

Test plan

  • CI: cargo fmt --check, clippy, nextest (Linux/macOS/Windows/musl).
  • cli::progress::format::remaining::tests::overflow_sentinel_matches_upstream_after_padding
  • cli::progress::format::remaining::tests::overflow_boundary_exact_vs_off_by_one
  • cli::progress::format::rate::tests::progress_rate_has_no_overflow_sentinel
  • cli::progress::format::rate::tests::progress_rate_unit_tiers_mirror_upstream
  • cli::progress::live::tests::per_file_renders_to_chk_when_flist_complete
  • cli::progress::live::tests::per_file_renders_ir_chk_when_flist_pending
  • core::client::progress::tests::flist_eof_default_true_matches_completed_list
  • core::client::progress::tests::flist_eof_can_be_false_for_inc_recurse

oferchen added 3 commits May 15, 2026 20:18
Tighten `--progress` rendering for two upstream-parity gaps:

- Verify the time-overflow sentinel renders byte-for-byte equivalent to
  upstream's `"  ??:??:??"` after the 10-wide right-aligned field
  padding. Confirm progress rate has no overflow sentinel upstream and
  document the GB/s cap. Add boundary tests around the
  `9999*3600`-second clamp.
- Plumb `flist_eof` through `TransferProgressEvent` and
  `ClientProgressUpdate` so the per-file trailer switches between
  `to-chk=A/B` (file list complete) and `ir-chk=A/B` (INC_RECURSE
  sub-lists still in flight), matching upstream's
  `flist_eof ? "to" : "ir"` selection. Sender plumbs the live
  generator state; receiver and local copy set `true` since they
  collect the full file list before emitting progress.

Tests cover the sentinel byte form, the clamp boundary, and the
chk-prefix toggle in `LiveProgress`.

upstream: progress.c rprint_progress / show_progress
@oferchen oferchen force-pushed the feat/progress-overflow-sentinel-ir-chk-2203 branch from 3681ec6 to db69fa2 Compare May 15, 2026 17:18
@oferchen oferchen merged commit 7ab1fa7 into master May 15, 2026
38 of 39 checks passed
@oferchen oferchen deleted the feat/progress-overflow-sentinel-ir-chk-2203 branch May 16, 2026 19:50
oferchen added a commit that referenced this pull request May 18, 2026
…4094)

* feat(progress): overflow sentinel and ir-chk prefix (D9/D10 parity)

Tighten `--progress` rendering for two upstream-parity gaps:

- Verify the time-overflow sentinel renders byte-for-byte equivalent to
  upstream's `"  ??:??:??"` after the 10-wide right-aligned field
  padding. Confirm progress rate has no overflow sentinel upstream and
  document the GB/s cap. Add boundary tests around the
  `9999*3600`-second clamp.
- Plumb `flist_eof` through `TransferProgressEvent` and
  `ClientProgressUpdate` so the per-file trailer switches between
  `to-chk=A/B` (file list complete) and `ir-chk=A/B` (INC_RECURSE
  sub-lists still in flight), matching upstream's
  `flist_eof ? "to" : "ir"` selection. Sender plumbs the live
  generator state; receiver and local copy set `true` since they
  collect the full file list before emitting progress.

Tests cover the sentinel byte form, the clamp boundary, and the
chk-prefix toggle in `LiveProgress`.

upstream: progress.c rprint_progress / show_progress

* style: apply rustfmt to progress test wrapping

* fix(core): expose ClientProgressUpdate::from_transfer_event for CLI tests
oferchen added a commit that referenced this pull request May 18, 2026
…4094)

* feat(progress): overflow sentinel and ir-chk prefix (D9/D10 parity)

Tighten `--progress` rendering for two upstream-parity gaps:

- Verify the time-overflow sentinel renders byte-for-byte equivalent to
  upstream's `"  ??:??:??"` after the 10-wide right-aligned field
  padding. Confirm progress rate has no overflow sentinel upstream and
  document the GB/s cap. Add boundary tests around the
  `9999*3600`-second clamp.
- Plumb `flist_eof` through `TransferProgressEvent` and
  `ClientProgressUpdate` so the per-file trailer switches between
  `to-chk=A/B` (file list complete) and `ir-chk=A/B` (INC_RECURSE
  sub-lists still in flight), matching upstream's
  `flist_eof ? "to" : "ir"` selection. Sender plumbs the live
  generator state; receiver and local copy set `true` since they
  collect the full file list before emitting progress.

Tests cover the sentinel byte form, the clamp boundary, and the
chk-prefix toggle in `LiveProgress`.

upstream: progress.c rprint_progress / show_progress

* style: apply rustfmt to progress test wrapping

* fix(core): expose ClientProgressUpdate::from_transfer_event for CLI tests
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