Skip to content

feat(engine): DeleteEmitter dispatch + error policy + tests (#2260, #2261, #2262) - #4264

Merged
oferchen merged 1 commit into
masterfrom
feat/delete-emitter-dispatch-and-errors-2260
May 17, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/delete-emitter-dispatch-and-errors-2260

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • DDP-C2 (Stop delegating --server to system rsync #2260): full dispatch by entry kind matching upstream delete.c::delete_item. Directories try rmdir first; on ENOTEMPTY the emitter drains the nested DeletePlan if one was published and retries rmdir, or falls back to DeleteFs::remove_dir_all when no nested plan exists (upstream delete_dir_contents, delete.c:48-122). The DeleteFs trait gains remove_dir_all so the recording fake can observe the fallback.
  • DDP-C3 (Update internal docs to reflect native-only operation #2261): EmitterErrorPolicy { ignore_errors, continue_on_error } mirrors upstream's --ignore-errors and continue-on-error semantics (delete.c:178-207). Non-fatal failures set io_error (IOERR_GENERAL, or a vanished-only bit for NotFound) and the drain keeps going. Fatal classifications (PermissionDenied / EPERM-class) abort and surface Err. New exit_code() maps the accumulated io_error to RERR_PARTIAL (23) or RERR_VANISHED (24).
  • DDP-C4 (Remove legacy fallback invocation paths #2262): nine additional unit tests for synthetic plan sequences - mixed-kind dispatch order, ENOTEMPTY recursion via nested plan, ENOTEMPTY fallback to remove_dir_all, non-fatal mid-plan continuation, fatal EPERM abort, --ignore-errors suppression, vanished-only exit code mapping, continue_on_error=false abort, and plan-map exhaustion no-op.

Test plan

  • CI fmt + clippy
  • CI nextest (engine emitter tests)
  • CI cross-platform matrix (Linux musl, macOS, Windows)

DDP-C2 (#2260): full dispatch by entry kind matching upstream
delete.c::delete_item. Directories try rmdir first; on ENOTEMPTY the
emitter drains the nested DeletePlan (if published) and retries the
rmdir, or falls back to DeleteFs::remove_dir_all when no plan exists -
mirroring delete_dir_contents (delete.c:48-122). The DeleteFs trait
gains remove_dir_all so the recording fake can observe the fallback.

DDP-C3 (#2261): EmitterErrorPolicy { ignore_errors, continue_on_error }
mirrors upstream's --ignore-errors and continue-on-error semantics
(delete.c:178-207). Non-fatal failures set io_error (IOERR_GENERAL or a
vanished-only bit for NotFound) and the drain keeps going. Fatal
classifications (PermissionDenied / EPERM-class) abort and surface
Err. New exit_code() maps the accumulated io_error to RERR_PARTIAL
(23) or RERR_VANISHED (24).

DDP-C4 (#2262): nine new unit tests covering mixed-kind dispatch
order, ENOTEMPTY recursion via nested plan, ENOTEMPTY fallback to
remove_dir_all, non-fatal mid-plan continuation, fatal EPERM abort,
--ignore-errors suppression, vanished-only exit code mapping,
continue_on_error=false abort, and plan-map exhaustion no-op.
@oferchen
oferchen force-pushed the feat/delete-emitter-dispatch-and-errors-2260 branch from f4f84a9 to b7bf7fa Compare May 17, 2026 20:39
@oferchen
oferchen merged commit 5f9cb06 into master May 17, 2026
10 of 12 checks passed
@github-actions github-actions Bot added the enhancement New feature or request label May 17, 2026
oferchen added a commit that referenced this pull request May 18, 2026
DDP-C2 (#2260): full dispatch by entry kind matching upstream
delete.c::delete_item. Directories try rmdir first; on ENOTEMPTY the
emitter drains the nested DeletePlan (if published) and retries the
rmdir, or falls back to DeleteFs::remove_dir_all when no plan exists -
mirroring delete_dir_contents (delete.c:48-122). The DeleteFs trait
gains remove_dir_all so the recording fake can observe the fallback.

DDP-C3 (#2261): EmitterErrorPolicy { ignore_errors, continue_on_error }
mirrors upstream's --ignore-errors and continue-on-error semantics
(delete.c:178-207). Non-fatal failures set io_error (IOERR_GENERAL or a
vanished-only bit for NotFound) and the drain keeps going. Fatal
classifications (PermissionDenied / EPERM-class) abort and surface
Err. New exit_code() maps the accumulated io_error to RERR_PARTIAL
(23) or RERR_VANISHED (24).

DDP-C4 (#2262): nine new unit tests covering mixed-kind dispatch
order, ENOTEMPTY recursion via nested plan, ENOTEMPTY fallback to
remove_dir_all, non-fatal mid-plan continuation, fatal EPERM abort,
--ignore-errors suppression, vanished-only exit code mapping,
continue_on_error=false abort, and plan-map exhaustion no-op.
oferchen added a commit that referenced this pull request May 18, 2026
DDP-C2 (#2260): full dispatch by entry kind matching upstream
delete.c::delete_item. Directories try rmdir first; on ENOTEMPTY the
emitter drains the nested DeletePlan (if published) and retries the
rmdir, or falls back to DeleteFs::remove_dir_all when no plan exists -
mirroring delete_dir_contents (delete.c:48-122). The DeleteFs trait
gains remove_dir_all so the recording fake can observe the fallback.

DDP-C3 (#2261): EmitterErrorPolicy { ignore_errors, continue_on_error }
mirrors upstream's --ignore-errors and continue-on-error semantics
(delete.c:178-207). Non-fatal failures set io_error (IOERR_GENERAL or a
vanished-only bit for NotFound) and the drain keeps going. Fatal
classifications (PermissionDenied / EPERM-class) abort and surface
Err. New exit_code() maps the accumulated io_error to RERR_PARTIAL
(23) or RERR_VANISHED (24).

DDP-C4 (#2262): nine new unit tests covering mixed-kind dispatch
order, ENOTEMPTY recursion via nested plan, ENOTEMPTY fallback to
remove_dir_all, non-fatal mid-plan continuation, fatal EPERM abort,
--ignore-errors suppression, vanished-only exit code mapping,
continue_on_error=false abort, and plan-map exhaustion no-op.
@oferchen
oferchen deleted the feat/delete-emitter-dispatch-and-errors-2260 branch May 19, 2026 19:28
oferchen added a commit that referenced this pull request Aug 24, 2026
DDP-C2 (#2260): full dispatch by entry kind matching upstream
delete.c::delete_item. Directories try rmdir first; on ENOTEMPTY the
emitter drains the nested DeletePlan (if published) and retries the
rmdir, or falls back to DeleteFs::remove_dir_all when no plan exists -
mirroring delete_dir_contents (delete.c:48-122). The DeleteFs trait
gains remove_dir_all so the recording fake can observe the fallback.

DDP-C3 (#2261): EmitterErrorPolicy { ignore_errors, continue_on_error }
mirrors upstream's --ignore-errors and continue-on-error semantics
(delete.c:178-207). Non-fatal failures set io_error (IOERR_GENERAL or a
vanished-only bit for NotFound) and the drain keeps going. Fatal
classifications (PermissionDenied / EPERM-class) abort and surface
Err. New exit_code() maps the accumulated io_error to RERR_PARTIAL
(23) or RERR_VANISHED (24).

DDP-C4 (#2262): nine new unit tests covering mixed-kind dispatch
order, ENOTEMPTY recursion via nested plan, ENOTEMPTY fallback to
remove_dir_all, non-fatal mid-plan continuation, fatal EPERM abort,
--ignore-errors suppression, vanished-only exit code mapping,
continue_on_error=false abort, and plan-map exhaustion no-op.
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