Skip to content

Ensure identical timestamp files are compared by content - #2063

Merged
oferchen merged 1 commit into
masterfrom
decompose-large-source-files-above-500-lines
Nov 8, 2025
Merged

oferchen merged 1 commit into
masterfrom
decompose-large-source-files-above-500-lines

Conversation

@oferchen

@oferchen oferchen commented Nov 8, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • avoid skipping local copies solely based on matching size and timestamps by verifying file contents when the modify window is zero
  • add a reusable helper for byte-wise comparisons and unit tests covering identical-timestamp scenarios

Testing

  • cargo test -p oc-rsync-core run_client_delete_removes_extraneous_entries

[Codex Task](

@oferchen
oferchen merged commit bd21ddf into master Nov 8, 2025
@oferchen
oferchen deleted the decompose-large-source-files-above-500-lines branch November 8, 2025 12:18
oferchen added a commit that referenced this pull request May 5, 2026
Translate zsync librcksum's bithash mechanism into oc-rsync without
touching the wire. Establish the bit-array shape and the
BITHASHBITS=3 sizing rationale, name the exact insertion points in
the existing index, fix the bit-mixing function on the 32-bit packed
rolling sum, restate the no-missed-match property invariant, and
list every layer the change must keep byte-identical to upstream
3.0.9 / 3.1.3 / 3.4.1.

Bench scaffolding is cfg-gated and never reaches a CLI flag.
Implementation is tracked in #2060/#2061; tests in #2062; bench in
#2063.
oferchen added a commit that referenced this pull request May 5, 2026
#3723)

Add design note for the canonical zsync-style insertion adversary at
docs/design/zsync-shifted-insertion-test.md, pinning the public-API
guard for the four pipeline optimizations enumerated in
docs/design/zsync-inspired-matching.md (#2053). Documents the
fixture parameters, expected match output for aligned vs unaligned
regimes, the upstream rsync --stats comparison oracle, CI integration
gated by SIMD parity (#2077), and the failure modes (signed-byte
regression #2076 class, off-by-one in seek, bithash false negative
#2061-#2063 class, want_i hint off-by-one, rolling-window reset bugs,
strong-checksum truncation drift, ring-buffer wrap bugs).

Cites the existing fixture at crates/match/tests/shifted_insertion_fixture.rs,
the sibling rsum-collision fixture from #2078, and the rolling
sign-extension fix from PR #3560 (commit 723a0a0).
oferchen added a commit that referenced this pull request May 16, 2026
…2067, #2071)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
oferchen added a commit that referenced this pull request May 16, 2026
…2067, #2071) (#4177)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
oferchen added a commit that referenced this pull request May 18, 2026
Translate zsync librcksum's bithash mechanism into oc-rsync without
touching the wire. Establish the bit-array shape and the
BITHASHBITS=3 sizing rationale, name the exact insertion points in
the existing index, fix the bit-mixing function on the 32-bit packed
rolling sum, restate the no-missed-match property invariant, and
list every layer the change must keep byte-identical to upstream
3.0.9 / 3.1.3 / 3.4.1.

Bench scaffolding is cfg-gated and never reaches a CLI flag.
Implementation is tracked in #2060/#2061; tests in #2062; bench in
#2063.
oferchen added a commit that referenced this pull request May 18, 2026
#3723)

Add design note for the canonical zsync-style insertion adversary at
docs/design/zsync-shifted-insertion-test.md, pinning the public-API
guard for the four pipeline optimizations enumerated in
docs/design/zsync-inspired-matching.md (#2053). Documents the
fixture parameters, expected match output for aligned vs unaligned
regimes, the upstream rsync --stats comparison oracle, CI integration
gated by SIMD parity (#2077), and the failure modes (signed-byte
regression #2076 class, off-by-one in seek, bithash false negative
#2061-#2063 class, want_i hint off-by-one, rolling-window reset bugs,
strong-checksum truncation drift, ring-buffer wrap bugs).

Cites the existing fixture at crates/match/tests/shifted_insertion_fixture.rs,
the sibling rsum-collision fixture from #2078, and the rolling
sign-extension fix from PR #3560 (commit 723a0a0).
oferchen added a commit that referenced this pull request May 18, 2026
…2067, #2071) (#4177)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
oferchen added a commit that referenced this pull request May 18, 2026
…2067, #2071) (#4177)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
oferchen added a commit that referenced this pull request Aug 24, 2026
Translate zsync librcksum's bithash mechanism into oc-rsync without
touching the wire. Establish the bit-array shape and the
BITHASHBITS=3 sizing rationale, name the exact insertion points in
the existing index, fix the bit-mixing function on the 32-bit packed
rolling sum, restate the no-missed-match property invariant, and
list every layer the change must keep byte-identical to upstream
3.0.9 / 3.1.3 / 3.4.1.

Bench scaffolding is cfg-gated and never reaches a CLI flag.
Implementation is tracked in #2060/#2061; tests in #2062; bench in
#2063.
oferchen added a commit that referenced this pull request Aug 24, 2026
#3723)

Add design note for the canonical zsync-style insertion adversary at
docs/design/zsync-shifted-insertion-test.md, pinning the public-API
guard for the four pipeline optimizations enumerated in
docs/design/zsync-inspired-matching.md (#2053). Documents the
fixture parameters, expected match output for aligned vs unaligned
regimes, the upstream rsync --stats comparison oracle, CI integration
gated by SIMD parity (#2077), and the failure modes (signed-byte
regression #2076 class, off-by-one in seek, bithash false negative
#2061-#2063 class, want_i hint off-by-one, rolling-window reset bugs,
strong-checksum truncation drift, ring-buffer wrap bugs).

Cites the existing fixture at crates/match/tests/shifted_insertion_fixture.rs,
the sibling rsum-collision fixture from #2078, and the rolling
sign-extension fix from PR #3560 (commit 723a0a0).
oferchen added a commit that referenced this pull request Aug 24, 2026
…2067, #2071) (#4177)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
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