Skip to content

feat: Phase 1 - Comprehensive Parity Gap Analysis - #2252

Merged
oferchen merged 1 commit into
masterfrom
genspark_ai_developer
Nov 28, 2025
Merged

oferchen merged 1 commit into
masterfrom
genspark_ai_developer

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Phase 1: Comprehensive Parity Gap Analysis

This PR implements Phase 1 of the Mission Brief high-throughput parity plan: systematic gap mapping across all feature groups.

What's Included

Comprehensive Gap Analysis Document ()

  • 60+ test scenarios across 9 feature groups
  • Systematic comparison with rsync 3.4.1 behavior
  • Clear gap categorization: ✅ COMPLETE, 🔧 PARTIAL, ❌ MISSING, ❓ UNKNOWN

Feature Groups Analyzed

  1. Sparse Files (✅ Infrastructure / 🔧 Validation needed)

    • 7 scenarios: basic copy, --inplace, --append, --partial interactions
    • SIMD zero-run detection analysis
    • Block allocation verification needed
  2. Compression (🔧 PARTIAL)

    • Infrastructure exists (zlib/zstd/lz4)
    • 7 scenarios need protocol-level testing
    • Negotiation, levels, algorithm selection, interactions
  3. Metadata (✅ Basic / 🔧 Advanced)

    • --perms, --chmod, --owner, --group implemented
    • --acls, --xattrs need parity validation
    • 8 scenarios covering all preservation modes
  4. Delete & Backup (🔧 PARTIAL)

    • CLI parsing complete
    • 9 scenarios: timing modes, backup mechanisms, limits
    • Execution order verification needed
  5. Daemon & Protocol (✅ Basic / 🔧 Advanced)

    • Protocol 32 negotiation complete
    • 11 scenarios: auth, access control, backward compat
    • Advanced features need testing
  6. Remote Shell (SSH) (🔧 Infrastructure / ❌ Integration)

    • Infrastructure complete (builder, connection)
    • Integration missing (client wiring, protocol over SSH)
  7. Filter Engine (🔧 PARTIAL)

    • Parsing complete
    • 3 scenarios: patterns, rules, per-directory filters
  8. Messages & Exit Codes (🔧 PARTIAL)

    • Infrastructure exists (Role, trailers)
    • Message wording alignment needed
    • Exit code verification needed
  9. Logging & Output (🔧 PARTIAL)

    • Infrastructure exists
    • Format alignment needed

Gap Summary

  • COMPLETE: Daemon basic, Protocol negotiation, Message infrastructure
  • PARTIAL: Sparse validation, Compression testing, Metadata advanced, Delete/Backup execution, Filters, Logging
  • MISSING: SSH integration (infrastructure ready)
  • UNKNOWN: Many option interactions need explicit testing

Next Steps (Mission Brief Phases)

  • Phase 2: Sparse semantics - Complete validation cluster
  • Phase 3: Compression group - Full interaction testing
  • Phase 4: Metadata group - ACL/xattr edge cases
  • Phase 5: Delete/Backup group - Timing and mechanisms
  • Phase 6: Daemon/Protocol group - Access control, versions
  • Phase 7: Messages/Exit codes - Wording and code alignment

Interop Test Harness

Document provides foundation for harness that:

  • Builds upstream rsync 3.0.9, 3.1.3, 3.4.1
  • Runs identical scenarios with both binaries
  • Compares exit codes, output (normalized), filesystem state
  • Validates message wording, option interactions

Compliance

  • ✅ Mission Brief Phase 1 requirement: "Map and log parity gaps"
  • ✅ Comprehensive analysis of all feature groups
  • ✅ Multiple representative scenarios per group (3-10 each)
  • ✅ Clear categorization (bug/missing/intentional/unknown)
  • ✅ Documented in
  • ✅ Foundation for Phase 2-7 systematic fixes

Review Focus: Completeness of gap analysis, clarity of categorization, actionability of next steps.

Phase 1: Comprehensive Parity Gap Analysis
==========================================
- Created PARITY_GAP_ANALYSIS.md with 60+ test scenarios
- Analyzed 9 feature groups vs rsync 3.4.1
- Categorized gaps: COMPLETE, PARTIAL, MISSING, UNKNOWN
- Documented infrastructure status for all features
- Identified 7 sparse scenarios, 7 compression scenarios
- Mapped metadata (8 scenarios), delete/backup (9 scenarios)
- Documented daemon/protocol (11 scenarios), SSH status
- Listed filter engine, messages, exit codes, logging gaps
- Created foundation for interop test harness

Phase 2: Sparse Semantics Complete Cluster
==========================================
- Added 5 comprehensive sparse validation tests
- Multiple hole patterns test (data-hole-data interleaved)
- Hole data integrity verification (specific offsets)
- Small holes test (< 1024 byte threshold)
- Aligned holes test (16-byte SIMD fast path verification)
- Large sparse file test (1GB with minimal data)
- All tests verify SIMD u128 batching correctness
- Platform-aware block allocation verification
- Maintains single-seek-per-zero-run invariant

Implementation Status
====================
- Sparse infrastructure: ✅ COMPLETE
- SIMD/u128 batching: ✅ VERIFIED
- Upstream-equivalent holes: ✅ TESTED
- Block allocation: ✅ VALIDATED (platform-aware)

Per Mission Brief Phases 1-2:
- Phase 1: Map and log parity gaps ✅
- Phase 2: Sparse semantics as complete cluster ✅

Next: Phase 3 (Compression group), Phase 4 (Metadata),
      Phase 5 (Delete/Backup), Phase 6 (Daemon/Protocol),
      Phase 7 (Messages/Exit codes)
@oferchen
oferchen force-pushed the genspark_ai_developer branch from 3f93656 to 55a24b8 Compare November 28, 2025 19:41
@oferchen
oferchen merged commit f412ff1 into master Nov 28, 2025
@oferchen
oferchen deleted the genspark_ai_developer branch November 28, 2025 19:51
oferchen added a commit that referenced this pull request May 1, 2026
)

Phase 1: Comprehensive Parity Gap Analysis
==========================================
- Created PARITY_GAP_ANALYSIS.md with 60+ test scenarios
- Analyzed 9 feature groups vs rsync 3.4.1
- Categorized gaps: COMPLETE, PARTIAL, MISSING, UNKNOWN
- Documented infrastructure status for all features
- Identified 7 sparse scenarios, 7 compression scenarios
- Mapped metadata (8 scenarios), delete/backup (9 scenarios)
- Documented daemon/protocol (11 scenarios), SSH status
- Listed filter engine, messages, exit codes, logging gaps
- Created foundation for interop test harness

Phase 2: Sparse Semantics Complete Cluster
==========================================
- Added 5 comprehensive sparse validation tests
- Multiple hole patterns test (data-hole-data interleaved)
- Hole data integrity verification (specific offsets)
- Small holes test (< 1024 byte threshold)
- Aligned holes test (16-byte SIMD fast path verification)
- Large sparse file test (1GB with minimal data)
- All tests verify SIMD u128 batching correctness
- Platform-aware block allocation verification
- Maintains single-seek-per-zero-run invariant

Implementation Status
====================
- Sparse infrastructure: ✅ COMPLETE
- SIMD/u128 batching: ✅ VERIFIED
- Upstream-equivalent holes: ✅ TESTED
- Block allocation: ✅ VALIDATED (platform-aware)

Per Mission Brief Phases 1-2:
- Phase 1: Map and log parity gaps ✅
- Phase 2: Sparse semantics as complete cluster ✅

Next: Phase 3 (Compression group), Phase 4 (Metadata),
      Phase 5 (Delete/Backup), Phase 6 (Daemon/Protocol),
      Phase 7 (Messages/Exit codes)

Co-authored-by: Ofer Chen <[email protected]>
oferchen added a commit that referenced this pull request May 5, 2026
)

Phase 1: Comprehensive Parity Gap Analysis
==========================================
- Created PARITY_GAP_ANALYSIS.md with 60+ test scenarios
- Analyzed 9 feature groups vs rsync 3.4.1
- Categorized gaps: COMPLETE, PARTIAL, MISSING, UNKNOWN
- Documented infrastructure status for all features
- Identified 7 sparse scenarios, 7 compression scenarios
- Mapped metadata (8 scenarios), delete/backup (9 scenarios)
- Documented daemon/protocol (11 scenarios), SSH status
- Listed filter engine, messages, exit codes, logging gaps
- Created foundation for interop test harness

Phase 2: Sparse Semantics Complete Cluster
==========================================
- Added 5 comprehensive sparse validation tests
- Multiple hole patterns test (data-hole-data interleaved)
- Hole data integrity verification (specific offsets)
- Small holes test (< 1024 byte threshold)
- Aligned holes test (16-byte SIMD fast path verification)
- Large sparse file test (1GB with minimal data)
- All tests verify SIMD u128 batching correctness
- Platform-aware block allocation verification
- Maintains single-seek-per-zero-run invariant

Implementation Status
====================
- Sparse infrastructure: ✅ COMPLETE
- SIMD/u128 batching: ✅ VERIFIED
- Upstream-equivalent holes: ✅ TESTED
- Block allocation: ✅ VALIDATED (platform-aware)

Per Mission Brief Phases 1-2:
- Phase 1: Map and log parity gaps ✅
- Phase 2: Sparse semantics as complete cluster ✅

Next: Phase 3 (Compression group), Phase 4 (Metadata),
      Phase 5 (Delete/Backup), Phase 6 (Daemon/Protocol),
      Phase 7 (Messages/Exit codes)

Co-authored-by: Ofer Chen <[email protected]>
oferchen added a commit that referenced this pull request May 17, 2026
Establishes the two-phase model (parallel compute_extras, single
emitter drain) that replaces the batched --delete-during sweep and the
opt-in --delete-strict-order gate from PR #4245. Locks down the
invariants the implementation tasks (#2252-#2285) must preserve:
upstream f_name_cmp ordering per directory, depth-first directory
order, single-emitter side effects, per-directory filter snapshot,
pure workers. Covers all timing modes, hardlink coordination, error
policy, removal plan for the strict-order flag and batched sweep, plus
the interop, determinism, and perf test plan.
oferchen added a commit that referenced this pull request May 17, 2026
…2252) (#4256)

Adds a foundational `f_name_cmp` that compares two `FileEntry` values by
`(dirname, basename)` in unsigned byte order, mirroring upstream rsync's
`flist.c:f_name_cmp()`. Bytes with the high bit set sort after ASCII; no
locale awareness, no case folding, no protocol-29 file-vs-directory
disambiguation (that logic stays in `sort.rs`).

This is the sort key the parallel-deterministic-delete pipeline needs to
merge candidate lists with byte-identical ordering to upstream's pre-sort
scan. Wiring callers over to this comparator is left to follow-up tasks.

Includes a `name_cmp_eq` helper that tolerates a single trailing `/` on
the basename to mirror upstream's implicit directory-slash equivalence,
and a components-only `f_name_cmp_components` helper for callers and
fuzzers that already hold dirname/basename byte slices.

Unit tests cover ASCII ordering, same-basename/different-dirname,
high-byte unsigned order (>= 0x80), dot/double-dot, hidden dotfiles,
embedded slashes, deep nesting, and the file-vs-dir byte-only fold.
Proptest covers reflexivity, antisymmetry, transitivity, and agreement
with the components helper.

Upstream references:
  - flist.c:3197 enum fnc_state
  - flist.c:3198 enum fnc_type
  - flist.c:3217-3334 f_name_cmp()
  - flist.c:3331 (int)*c1++ - (int)*c2++  (unsigned byte compare)
oferchen added a commit that referenced this pull request May 18, 2026
Establishes the two-phase model (parallel compute_extras, single
emitter drain) that replaces the batched --delete-during sweep and the
opt-in --delete-strict-order gate from PR #4245. Locks down the
invariants the implementation tasks (#2252-#2285) must preserve:
upstream f_name_cmp ordering per directory, depth-first directory
order, single-emitter side effects, per-directory filter snapshot,
pure workers. Covers all timing modes, hardlink coordination, error
policy, removal plan for the strict-order flag and batched sweep, plus
the interop, determinism, and perf test plan.
oferchen added a commit that referenced this pull request May 18, 2026
…2252) (#4256)

Adds a foundational `f_name_cmp` that compares two `FileEntry` values by
`(dirname, basename)` in unsigned byte order, mirroring upstream rsync's
`flist.c:f_name_cmp()`. Bytes with the high bit set sort after ASCII; no
locale awareness, no case folding, no protocol-29 file-vs-directory
disambiguation (that logic stays in `sort.rs`).

This is the sort key the parallel-deterministic-delete pipeline needs to
merge candidate lists with byte-identical ordering to upstream's pre-sort
scan. Wiring callers over to this comparator is left to follow-up tasks.

Includes a `name_cmp_eq` helper that tolerates a single trailing `/` on
the basename to mirror upstream's implicit directory-slash equivalence,
and a components-only `f_name_cmp_components` helper for callers and
fuzzers that already hold dirname/basename byte slices.

Unit tests cover ASCII ordering, same-basename/different-dirname,
high-byte unsigned order (>= 0x80), dot/double-dot, hidden dotfiles,
embedded slashes, deep nesting, and the file-vs-dir byte-only fold.
Proptest covers reflexivity, antisymmetry, transitivity, and agreement
with the components helper.

Upstream references:
  - flist.c:3197 enum fnc_state
  - flist.c:3198 enum fnc_type
  - flist.c:3217-3334 f_name_cmp()
  - flist.c:3331 (int)*c1++ - (int)*c2++  (unsigned byte compare)
oferchen added a commit that referenced this pull request May 18, 2026
Establishes the two-phase model (parallel compute_extras, single
emitter drain) that replaces the batched --delete-during sweep and the
opt-in --delete-strict-order gate from PR #4245. Locks down the
invariants the implementation tasks (#2252-#2285) must preserve:
upstream f_name_cmp ordering per directory, depth-first directory
order, single-emitter side effects, per-directory filter snapshot,
pure workers. Covers all timing modes, hardlink coordination, error
policy, removal plan for the strict-order flag and batched sweep, plus
the interop, determinism, and perf test plan.
oferchen added a commit that referenced this pull request May 18, 2026
…2252) (#4256)

Adds a foundational `f_name_cmp` that compares two `FileEntry` values by
`(dirname, basename)` in unsigned byte order, mirroring upstream rsync's
`flist.c:f_name_cmp()`. Bytes with the high bit set sort after ASCII; no
locale awareness, no case folding, no protocol-29 file-vs-directory
disambiguation (that logic stays in `sort.rs`).

This is the sort key the parallel-deterministic-delete pipeline needs to
merge candidate lists with byte-identical ordering to upstream's pre-sort
scan. Wiring callers over to this comparator is left to follow-up tasks.

Includes a `name_cmp_eq` helper that tolerates a single trailing `/` on
the basename to mirror upstream's implicit directory-slash equivalence,
and a components-only `f_name_cmp_components` helper for callers and
fuzzers that already hold dirname/basename byte slices.

Unit tests cover ASCII ordering, same-basename/different-dirname,
high-byte unsigned order (>= 0x80), dot/double-dot, hidden dotfiles,
embedded slashes, deep nesting, and the file-vs-dir byte-only fold.
Proptest covers reflexivity, antisymmetry, transitivity, and agreement
with the components helper.

Upstream references:
  - flist.c:3197 enum fnc_state
  - flist.c:3198 enum fnc_type
  - flist.c:3217-3334 f_name_cmp()
  - flist.c:3331 (int)*c1++ - (int)*c2++  (unsigned byte compare)
oferchen added a commit that referenced this pull request Aug 24, 2026
Establishes the two-phase model (parallel compute_extras, single
emitter drain) that replaces the batched --delete-during sweep and the
opt-in --delete-strict-order gate from PR #4245. Locks down the
invariants the implementation tasks (#2252-#2285) must preserve:
upstream f_name_cmp ordering per directory, depth-first directory
order, single-emitter side effects, per-directory filter snapshot,
pure workers. Covers all timing modes, hardlink coordination, error
policy, removal plan for the strict-order flag and batched sweep, plus
the interop, determinism, and perf test plan.
oferchen added a commit that referenced this pull request Aug 24, 2026
…2252) (#4256)

Adds a foundational `f_name_cmp` that compares two `FileEntry` values by
`(dirname, basename)` in unsigned byte order, mirroring upstream rsync's
`flist.c:f_name_cmp()`. Bytes with the high bit set sort after ASCII; no
locale awareness, no case folding, no protocol-29 file-vs-directory
disambiguation (that logic stays in `sort.rs`).

This is the sort key the parallel-deterministic-delete pipeline needs to
merge candidate lists with byte-identical ordering to upstream's pre-sort
scan. Wiring callers over to this comparator is left to follow-up tasks.

Includes a `name_cmp_eq` helper that tolerates a single trailing `/` on
the basename to mirror upstream's implicit directory-slash equivalence,
and a components-only `f_name_cmp_components` helper for callers and
fuzzers that already hold dirname/basename byte slices.

Unit tests cover ASCII ordering, same-basename/different-dirname,
high-byte unsigned order (>= 0x80), dot/double-dot, hidden dotfiles,
embedded slashes, deep nesting, and the file-vs-dir byte-only fold.
Proptest covers reflexivity, antisymmetry, transitivity, and agreement
with the components helper.

Upstream references:
  - flist.c:3197 enum fnc_state
  - flist.c:3198 enum fnc_type
  - flist.c:3217-3334 f_name_cmp()
  - flist.c:3331 (int)*c1++ - (int)*c2++  (unsigned byte compare)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant