Repository navigation
feat(engine): DeleteEmitter dispatch + error policy + tests (#2260, #2261, #2262) - #4264
Merged
Merged
Conversation
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
force-pushed
the
feat/delete-emitter-dispatch-and-errors-2260
branch
from
May 17, 2026 20:39
f4f84a9 to
b7bf7fa
Compare
Merged
7 of 9 tasks
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
delete.c::delete_item. Directories tryrmdirfirst; onENOTEMPTYthe emitter drains the nestedDeletePlanif one was published and retriesrmdir, or falls back toDeleteFs::remove_dir_allwhen no nested plan exists (upstreamdelete_dir_contents,delete.c:48-122). TheDeleteFstrait gainsremove_dir_allso the recording fake can observe the fallback.EmitterErrorPolicy { ignore_errors, continue_on_error }mirrors upstream's--ignore-errorsand continue-on-error semantics (delete.c:178-207). Non-fatal failures setio_error(IOERR_GENERAL, or a vanished-only bit forNotFound) and the drain keeps going. Fatal classifications (PermissionDenied/ EPERM-class) abort and surfaceErr. Newexit_code()maps the accumulatedio_errortoRERR_PARTIAL(23) orRERR_VANISHED(24).ENOTEMPTYrecursion via nested plan,ENOTEMPTYfallback toremove_dir_all, non-fatal mid-plan continuation, fatal EPERM abort,--ignore-errorssuppression, vanished-only exit code mapping,continue_on_error=falseabort, and plan-map exhaustion no-op.Test plan