Xuanwo opened a new issue, #8852: URL: https://github.com/apache/opendal/issues/8852
> AI-authored issue from a read-only readability audit against `main` (`615a8f24f`), guided by the optimize-for-reading guidelines in #8847. ### Problem PRs #8641 and #8675 lifted capability validation (`check_*_args`, including `restore`'s `if_not_exists && version.is_none()`) to the top-level `Operator` / `Deleter` / `Composer` / `WriteContext` entrypoints so validation reflects the effective capability after user layers (such as `CapabilityOverrideLayer`). However, `pub(crate) CorrectnessCheckLayer` is still installed at the bottom of the default `Operator` stack (`core/core/src/types/operator/builder.rs:70`, below user layers): - Every normal `Operator` call traverses an extra `CorrectnessService` layer, wraps `Deleter` and `Composer` in `CheckWrapper`, and runs the same capability checks a second time. - The two validation layers have already drifted apart: `check_copy_metadata_args` (`core/core/src/layers/correctness_check.rs:75`) is called in `Operator::copy_with` (`core/core/src/types/operator/operator.rs:1605`), but is not called in `CorrectnessService::copy`. ### Decision Needed Clarify the intended contract for `CorrectnessCheckLayer`: 1. **Remove `CorrectnessCheckLayer` from the default `Operator` stack** if OpenDAL no longer needs a redundant bottom check layer for callers bypassing `Operator` via `into_parts()` (keeping the `check_*_args` helpers invoked at the `Operator` / handle boundary). 2. **Keep `CorrectnessCheckLayer` explicitly for direct `Servicer` callers**, document that contract clearly, and fix the `check_copy_metadata_args` asymmetry so both validation points stay consistent. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
