Skip to content

fix(tools,agent-context): replace sync fs with tokio in FileExecutor, dedup box_err#4524

Merged
bug-ops merged 1 commit into
mainfrom
4507-sync-fs-box-err
May 28, 2026
Merged

fix(tools,agent-context): replace sync fs with tokio in FileExecutor, dedup box_err#4524
bug-ops merged 1 commit into
mainfrom
4507-sync-fs-box-err

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 28, 2026

Summary

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace -- -D warnings — zero warnings
  • cargo nextest run --workspace --lib --bins — 10054 tests passed, 0 failed
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked passes
  • Reviewer verified all 6 blocking call sites eliminated; spawn_blocking closures satisfy 'static + Send; box_err bounds correct for all 12 call sites

Closes #4507, #4511

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes bug Something isn't working size/M Medium PR (51-200 lines) labels May 28, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 28, 2026 15:33
@bug-ops bug-ops force-pushed the 4507-sync-fs-box-err branch from ee1ceae to 9f7655a Compare May 28, 2026 15:33
… dedup box_err

Replace the 6 remaining sync std::fs call sites in FileExecutor that were
missed in #4502:
- handle_create_directory, handle_delete_path, handle_move_path,
  handle_copy_path: converted to tokio::fs equivalents (make async).
- grep_recursive, copy_dir_recursive: wrapped in spawn_blocking since
  the recursive traversal loop cannot be trivially converted to async.
- execute_file_tool dispatcher: added .await to all newly-async handlers.

Extract a private box_err helper in memory_backend.rs and replace 12
identical map_err(|e| Box::new(e) as Box<dyn Error + Send + Sync>)
closures with map_err(box_err); no behavior change.

Closes #4507, #4511
@bug-ops bug-ops force-pushed the 4507-sync-fs-box-err branch from 9f7655a to ff2ef53 Compare May 28, 2026 15:48
@bug-ops bug-ops merged commit b9460b0 into main May 28, 2026
32 checks passed
@bug-ops bug-ops deleted the 4507-sync-fs-box-err branch May 28, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

1 participant