Repository navigation
Stop delegating --server to fallback binary - #2254
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:
|
|||||||||
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
…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.
…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.
…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.
…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.
User description
Summary
--serveris requested and surface a branded diagnostic instead--serverin the CLI module overviewTesting
[Codex Task](
PR Type
Enhancement
Description
Remove fallback binary delegation for
--servermodeSurface branded diagnostic indicating native server unavailability
Eliminate complex process spawning and stream forwarding logic
Update documentation and tests to reflect diagnostic-only behavior
Diagram Walkthrough
File Walkthrough
mod.rs
Update documentation for server mode behaviorcrates/cli/src/frontend/mod.rs
--serverOC_RSYNC_FALLBACKenvironment variable
--serversessions now surface branded diagnostics untilnative implementation is complete
server.rs
Remove fallback binary delegation logiccrates/cli/src/frontend/server.rs
process
utilities
run_server_modeto emit diagnostic and return exit code 1write_server_fallback_errortowrite_server_unavailable_errorserver.rs
Update tests for diagnostic-only server modecrates/cli/src/frontend/tests/server.rs
diagnostic output
--serverisrequested
override, missing binary, and recursive fallback scenarios
trailer presence