fix(ecstore): avoid nested prefix listing amplification (#6473)

* fix(ecstore): avoid nested prefix listing probes

* fix(app): scope usage overlay import to tests

---------

Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com>
This commit is contained in:
Henry Guo
2026-08-24 14:29:35 +08:00
committed by GitHub
parent 170a4c7640
commit 60a0b1d6e7
7 changed files with 217 additions and 3 deletions
@@ -6911,7 +6911,7 @@ mod tests {
}
#[tokio::test]
async fn test_remote_disk_walk_dir_preserves_skip_total_timeout_option() {
async fn test_remote_disk_walk_dir_preserves_control_options() {
let transport = RecordingInternodeDataTransport::default();
let remote_disk = new_remote_disk_with_transport(Arc::new(transport.clone())).await;
let opts = WalkDirOptions {
@@ -6919,6 +6919,7 @@ mod tests {
base_dir: "prefix".to_string(),
recursive: true,
skip_total_timeout: true,
skip_hidden_prefix_check: true,
..Default::default()
};
let mut writer = Vec::new();
@@ -6935,6 +6936,7 @@ mod tests {
let sent_opts: WalkDirOptions =
serde_json::from_slice(&request.body).expect("walk_dir request body should deserialize");
assert!(sent_opts.skip_total_timeout);
assert!(sent_opts.skip_hidden_prefix_check);
assert_eq!(request.stall_timeout, Some(get_drive_walkdir_stall_timeout()));
}
other => panic!("expected walk-dir transport call, got {other:?}"),