Repository navigation
Stop delegating --server to external fallback - #2253
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
…lel deterministic delete (#2253, #2254) (#4259) * feat(engine): DeletePlan, DeletePlanMap, DirTraversalCursor (#2253, #2254) Adds the data-structure foundation for the parallel-deterministic-delete pipeline described in docs/design/parallel-deterministic-delete.md (PR #4257). Three new modules under crates/engine/src/delete/: - plan.rs: DeletePlan (sorted, frozen per-directory work item), DeleteEntry, DeleteEntryKind (mirrors DeleteStats buckets), and a HardlinkCohortId newtype. sort_by_name() uses upstream's f_name_cmp (PR #4256) ascending then reverses, matching delete_in_dir's loop at generator.c:320. - plan_map.rs: DeletePlanMap, the publish-once concurrent rendezvous between phase-1 workers and the phase-2 emitter. Backed by Mutex<HashMap> for now; bench-driven choice between Mutex, DashMap, and a sharded map is deferred to task DDP-B4 (see code comment). - traversal.rs: DirTraversalCursor, yields directories in upstream's depth-first f_name_cmp-ascending order. Tree built from observed flist segments via observe_segment(); next_ready() returns the next directory whose parent has been emitted. Pure data structures, no callers; phase-1 and phase-2 wiring lands in later tasks (#2255-#2278). Unit tests cover plan ordering, concurrent inserts and takes from 16 threads, out-of-order segment observation, non-directory filtering, duplicate observations, and high-byte basename ordering on Unix. * fix(engine): avoid borrow-checker conflict in DirTraversalCursor::next_ready Splits the frame inspection from the mutation so the mutable borrow of the top frame is released before pushing a new frame or popping the old one. Functionally equivalent.
#2259) Scaffolds the single-threaded emitter half of the parallel-deterministic delete pipeline (design: parallel-deterministic-delete.md). Lands the DeleteFs trait so the dispatch table per upstream entry kind (delete.c delete_item:144-176) is mockable in tests, a RealDeleteFs production impl backed by std::fs, a RecordingDeleteFs test fake that captures the syscall sequence, and the DeleteEmitter::emit_all drain loop that walks DirTraversalCursor in upstream traversal order and increments DeleteStats per planned entry. The DeletePlan, DeletePlanMap, and DirTraversalCursor types are declared as in-file placeholders (matching the names DDP-A3 #2253 and DDP-A4 #2254 will produce) so the scaffold is independently mergeable; the type substitution at merge is mechanical. Syscall hardening (DDP-C2 #2260) and upstream error policy (DDP-C3 #2261) come next. Tests cover the empty-map base case, the full File/Dir/Symlink/ Device/Special dispatch matrix, multi-directory cursor-order traversal with within-directory plan order, and the cursor-outpaces-plans gap where emit_all parks and resumes on a later call.
#2259) (#4260) Scaffolds the single-threaded emitter half of the parallel-deterministic delete pipeline (design: parallel-deterministic-delete.md). Lands the DeleteFs trait so the dispatch table per upstream entry kind (delete.c delete_item:144-176) is mockable in tests, a RealDeleteFs production impl backed by std::fs, a RecordingDeleteFs test fake that captures the syscall sequence, and the DeleteEmitter::emit_all drain loop that walks DirTraversalCursor in upstream traversal order and increments DeleteStats per planned entry. The DeletePlan, DeletePlanMap, and DirTraversalCursor types are declared as in-file placeholders (matching the names DDP-A3 #2253 and DDP-A4 #2254 will produce) so the scaffold is independently mergeable; the type substitution at merge is mechanical. Syscall hardening (DDP-C2 #2260) and upstream error policy (DDP-C3 #2261) come next. Tests cover the empty-map base case, the full File/Dir/Symlink/ Device/Special dispatch matrix, multi-directory cursor-order traversal with within-directory plan order, and the cursor-outpaces-plans gap where emit_all parks and resumes on a later call.
…2258) (#4261) Adds a Criterion micro-benchmark that pits the current `Mutex<HashMap<PathBuf, DeletePlan>>` backing store for `DeletePlanMap` against `dashmap::DashMap` and a 16-shard `Vec<Mutex<HashMap>>` variant. Workloads sweep single-thread, 4/8/16-thread inserts and a 50/50 insert/take mix at 8 threads with deterministic, reproducible keys. Output feeds the DDP-A3 (#2253) follow-up: if any alternative shows a >2x speedup at high thread counts, the engine swaps the backing store to the winner; otherwise the existing shape stays. dashmap is added only as a `[target.'cfg(unix)'.dev-dependencies]` entry pinned to the workspace version (6.1); no runtime dependency change. The bench file is `#![cfg(unix)]`-gated to match the existing criterion dev-dep gating in the engine crate.
…lel deterministic delete (#2253, #2254) (#4259) * feat(engine): DeletePlan, DeletePlanMap, DirTraversalCursor (#2253, #2254) Adds the data-structure foundation for the parallel-deterministic-delete pipeline described in docs/design/parallel-deterministic-delete.md (PR #4257). Three new modules under crates/engine/src/delete/: - plan.rs: DeletePlan (sorted, frozen per-directory work item), DeleteEntry, DeleteEntryKind (mirrors DeleteStats buckets), and a HardlinkCohortId newtype. sort_by_name() uses upstream's f_name_cmp (PR #4256) ascending then reverses, matching delete_in_dir's loop at generator.c:320. - plan_map.rs: DeletePlanMap, the publish-once concurrent rendezvous between phase-1 workers and the phase-2 emitter. Backed by Mutex<HashMap> for now; bench-driven choice between Mutex, DashMap, and a sharded map is deferred to task DDP-B4 (see code comment). - traversal.rs: DirTraversalCursor, yields directories in upstream's depth-first f_name_cmp-ascending order. Tree built from observed flist segments via observe_segment(); next_ready() returns the next directory whose parent has been emitted. Pure data structures, no callers; phase-1 and phase-2 wiring lands in later tasks (#2255-#2278). Unit tests cover plan ordering, concurrent inserts and takes from 16 threads, out-of-order segment observation, non-directory filtering, duplicate observations, and high-byte basename ordering on Unix. * fix(engine): avoid borrow-checker conflict in DirTraversalCursor::next_ready Splits the frame inspection from the mutation so the mutable borrow of the top frame is released before pushing a new frame or popping the old one. Functionally equivalent.
#2259) (#4260) Scaffolds the single-threaded emitter half of the parallel-deterministic delete pipeline (design: parallel-deterministic-delete.md). Lands the DeleteFs trait so the dispatch table per upstream entry kind (delete.c delete_item:144-176) is mockable in tests, a RealDeleteFs production impl backed by std::fs, a RecordingDeleteFs test fake that captures the syscall sequence, and the DeleteEmitter::emit_all drain loop that walks DirTraversalCursor in upstream traversal order and increments DeleteStats per planned entry. The DeletePlan, DeletePlanMap, and DirTraversalCursor types are declared as in-file placeholders (matching the names DDP-A3 #2253 and DDP-A4 #2254 will produce) so the scaffold is independently mergeable; the type substitution at merge is mechanical. Syscall hardening (DDP-C2 #2260) and upstream error policy (DDP-C3 #2261) come next. Tests cover the empty-map base case, the full File/Dir/Symlink/ Device/Special dispatch matrix, multi-directory cursor-order traversal with within-directory plan order, and the cursor-outpaces-plans gap where emit_all parks and resumes on a later call.
…2258) (#4261) Adds a Criterion micro-benchmark that pits the current `Mutex<HashMap<PathBuf, DeletePlan>>` backing store for `DeletePlanMap` against `dashmap::DashMap` and a 16-shard `Vec<Mutex<HashMap>>` variant. Workloads sweep single-thread, 4/8/16-thread inserts and a 50/50 insert/take mix at 8 threads with deterministic, reproducible keys. Output feeds the DDP-A3 (#2253) follow-up: if any alternative shows a >2x speedup at high thread counts, the engine swaps the backing store to the winner; otherwise the existing shape stays. dashmap is added only as a `[target.'cfg(unix)'.dev-dependencies]` entry pinned to the workspace version (6.1); no runtime dependency change. The bench file is `#![cfg(unix)]`-gated to match the existing criterion dev-dep gating in the engine crate.
…lel deterministic delete (#2253, #2254) (#4259) * feat(engine): DeletePlan, DeletePlanMap, DirTraversalCursor (#2253, #2254) Adds the data-structure foundation for the parallel-deterministic-delete pipeline described in docs/design/parallel-deterministic-delete.md (PR #4257). Three new modules under crates/engine/src/delete/: - plan.rs: DeletePlan (sorted, frozen per-directory work item), DeleteEntry, DeleteEntryKind (mirrors DeleteStats buckets), and a HardlinkCohortId newtype. sort_by_name() uses upstream's f_name_cmp (PR #4256) ascending then reverses, matching delete_in_dir's loop at generator.c:320. - plan_map.rs: DeletePlanMap, the publish-once concurrent rendezvous between phase-1 workers and the phase-2 emitter. Backed by Mutex<HashMap> for now; bench-driven choice between Mutex, DashMap, and a sharded map is deferred to task DDP-B4 (see code comment). - traversal.rs: DirTraversalCursor, yields directories in upstream's depth-first f_name_cmp-ascending order. Tree built from observed flist segments via observe_segment(); next_ready() returns the next directory whose parent has been emitted. Pure data structures, no callers; phase-1 and phase-2 wiring lands in later tasks (#2255-#2278). Unit tests cover plan ordering, concurrent inserts and takes from 16 threads, out-of-order segment observation, non-directory filtering, duplicate observations, and high-byte basename ordering on Unix. * fix(engine): avoid borrow-checker conflict in DirTraversalCursor::next_ready Splits the frame inspection from the mutation so the mutable borrow of the top frame is released before pushing a new frame or popping the old one. Functionally equivalent.
#2259) (#4260) Scaffolds the single-threaded emitter half of the parallel-deterministic delete pipeline (design: parallel-deterministic-delete.md). Lands the DeleteFs trait so the dispatch table per upstream entry kind (delete.c delete_item:144-176) is mockable in tests, a RealDeleteFs production impl backed by std::fs, a RecordingDeleteFs test fake that captures the syscall sequence, and the DeleteEmitter::emit_all drain loop that walks DirTraversalCursor in upstream traversal order and increments DeleteStats per planned entry. The DeletePlan, DeletePlanMap, and DirTraversalCursor types are declared as in-file placeholders (matching the names DDP-A3 #2253 and DDP-A4 #2254 will produce) so the scaffold is independently mergeable; the type substitution at merge is mechanical. Syscall hardening (DDP-C2 #2260) and upstream error policy (DDP-C3 #2261) come next. Tests cover the empty-map base case, the full File/Dir/Symlink/ Device/Special dispatch matrix, multi-directory cursor-order traversal with within-directory plan order, and the cursor-outpaces-plans gap where emit_all parks and resumes on a later call.
…2258) (#4261) Adds a Criterion micro-benchmark that pits the current `Mutex<HashMap<PathBuf, DeletePlan>>` backing store for `DeletePlanMap` against `dashmap::DashMap` and a 16-shard `Vec<Mutex<HashMap>>` variant. Workloads sweep single-thread, 4/8/16-thread inserts and a 50/50 insert/take mix at 8 threads with deterministic, reproducible keys. Output feeds the DDP-A3 (#2253) follow-up: if any alternative shows a >2x speedup at high thread counts, the engine swaps the backing store to the winner; otherwise the existing shape stays. dashmap is added only as a `[target.'cfg(unix)'.dev-dependencies]` entry pinned to the workspace version (6.1); no runtime dependency change. The bench file is `#![cfg(unix)]`-gated to match the existing criterion dev-dep gating in the engine crate.
…lel deterministic delete (#2253, #2254) (#4259) * feat(engine): DeletePlan, DeletePlanMap, DirTraversalCursor (#2253, #2254) Adds the data-structure foundation for the parallel-deterministic-delete pipeline described in docs/design/parallel-deterministic-delete.md (PR #4257). Three new modules under crates/engine/src/delete/: - plan.rs: DeletePlan (sorted, frozen per-directory work item), DeleteEntry, DeleteEntryKind (mirrors DeleteStats buckets), and a HardlinkCohortId newtype. sort_by_name() uses upstream's f_name_cmp (PR #4256) ascending then reverses, matching delete_in_dir's loop at generator.c:320. - plan_map.rs: DeletePlanMap, the publish-once concurrent rendezvous between phase-1 workers and the phase-2 emitter. Backed by Mutex<HashMap> for now; bench-driven choice between Mutex, DashMap, and a sharded map is deferred to task DDP-B4 (see code comment). - traversal.rs: DirTraversalCursor, yields directories in upstream's depth-first f_name_cmp-ascending order. Tree built from observed flist segments via observe_segment(); next_ready() returns the next directory whose parent has been emitted. Pure data structures, no callers; phase-1 and phase-2 wiring lands in later tasks (#2255-#2278). Unit tests cover plan ordering, concurrent inserts and takes from 16 threads, out-of-order segment observation, non-directory filtering, duplicate observations, and high-byte basename ordering on Unix. * fix(engine): avoid borrow-checker conflict in DirTraversalCursor::next_ready Splits the frame inspection from the mutation so the mutable borrow of the top frame is released before pushing a new frame or popping the old one. Functionally equivalent.
#2259) (#4260) Scaffolds the single-threaded emitter half of the parallel-deterministic delete pipeline (design: parallel-deterministic-delete.md). Lands the DeleteFs trait so the dispatch table per upstream entry kind (delete.c delete_item:144-176) is mockable in tests, a RealDeleteFs production impl backed by std::fs, a RecordingDeleteFs test fake that captures the syscall sequence, and the DeleteEmitter::emit_all drain loop that walks DirTraversalCursor in upstream traversal order and increments DeleteStats per planned entry. The DeletePlan, DeletePlanMap, and DirTraversalCursor types are declared as in-file placeholders (matching the names DDP-A3 #2253 and DDP-A4 #2254 will produce) so the scaffold is independently mergeable; the type substitution at merge is mechanical. Syscall hardening (DDP-C2 #2260) and upstream error policy (DDP-C3 #2261) come next. Tests cover the empty-map base case, the full File/Dir/Symlink/ Device/Special dispatch matrix, multi-directory cursor-order traversal with within-directory plan order, and the cursor-outpaces-plans gap where emit_all parks and resumes on a later call.
…2258) (#4261) Adds a Criterion micro-benchmark that pits the current `Mutex<HashMap<PathBuf, DeletePlan>>` backing store for `DeletePlanMap` against `dashmap::DashMap` and a 16-shard `Vec<Mutex<HashMap>>` variant. Workloads sweep single-thread, 4/8/16-thread inserts and a 50/50 insert/take mix at 8 threads with deterministic, reproducible keys. Output feeds the DDP-A3 (#2253) follow-up: if any alternative shows a >2x speedup at high thread counts, the engine swaps the backing store to the winner; otherwise the existing shape stays. dashmap is added only as a `[target.'cfg(unix)'.dev-dependencies]` entry pinned to the workspace version (6.1); no runtime dependency change. The bench file is `#![cfg(unix)]`-gated to match the existing criterion dev-dep gating in the engine crate.
User description
Summary
--serverinvocations from spawning an upstream rsync binary and instead emit a branded unavailability diagnosticTesting
[Codex Task](
PR Type
Enhancement
Description
Remove fallback delegation logic from server mode
Emit branded unavailability diagnostic instead of delegating
Simplify server mode to report native implementation status
Remove fallback-related test cases and environment handling
Diagram Walkthrough
File Walkthrough
server.rs
Eliminate server mode fallback delegation implementationcrates/cli/src/frontend/server.rs
write_server_fallback_errortowrite_server_unavailable_errorserver.rs
Consolidate server mode tests to verify no delegationcrates/cli/src/frontend/tests/server.rs
lib.rs
Update embedding tests for native server modecrates/embedding/src/lib.rs
OC_RSYNC_FALLBACKenvironment variable setup in testfallback diagnostics