⚠️ Potential issue | 🟠 Major
Implement retry logic or remove unused max_retries and retry_delay fields.
The RmOptions struct declares max_retries and retry_delay fields that are never used in the implementation. Users can pass these options, but they will be silently ignored, creating an API surface inconsistency with the promised functionality.
Either implement the retry logic (wrapping operations in a retry loop with exponential backoff based on these options) or remove these fields from RmOptions to avoid misleading users.
Implementation guidance
If implementing retry logic, wrap the operations in remove_recursive with a retry loop that:
- Catches transient filesystem errors (e.g.,
PermissionDenied, ResourceBusy)
- Retries up to
max_retries times with retry_delay milliseconds between attempts
- Only retries on errors that are likely transient, not permanent failures like
ENOENT
Originally posted by @coderabbitai[bot] in #2 (comment)
Implement retry logic or remove unused
max_retriesandretry_delayfields.The
RmOptionsstruct declaresmax_retriesandretry_delayfields that are never used in the implementation. Users can pass these options, but they will be silently ignored, creating an API surface inconsistency with the promised functionality.Either implement the retry logic (wrapping operations in a retry loop with exponential backoff based on these options) or remove these fields from
RmOptionsto avoid misleading users.Implementation guidance
If implementing retry logic, wrap the operations in
remove_recursivewith a retry loop that:PermissionDenied,ResourceBusy)max_retriestimes withretry_delaymilliseconds between attemptsENOENTOriginally posted by @coderabbitai[bot] in #2 (comment)