GCS backend: copy_object builds both source and destination paths from `to`, making every copy a no-op
GCSBucket::copy_object (libs/remote_storage/src/gcs_bucket.rs:859) takes from and to, but both copy_from_path (line ~867) and copy_to_path (line ~875) are built from self.relative_path_to_gcs_object(to). The from parameter is never read — rustc flags it as unused.
The result is that RemoteStorage::copy on the GCS backend copies an object onto itself and returns Ok(()). Callers that copy A to B and then depend on B see a success they did not get.
Looks like a copy-paste slip rather than intent, given from is threaded all the way down to the function and then dropped. The S3 backend's copy uses both paths.
Noticed the unused-parameter warning while building locally; filing separately from the delete-batching issue since the severity is different.
Source: neondatabase/neon